Skip to content

Implemented Connect API - #11

Merged
HARSHVARANDANI merged 1 commit into
devlup-labs:mainfrom
numair03:9-implement-connect-API
Aug 6, 2026
Merged

Implemented Connect API #11
HARSHVARANDANI merged 1 commit into
devlup-labs:mainfrom
numair03:9-implement-connect-API

Conversation

@numair03

@numair03 numair03 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Implemented the connect API for the co-ordination server.

What this PR does

  • Adds ConnectHandler
  • Analyzes and validates incoming JSON requests
  • Verifies request method
  • Validates required request fields (deviceId, isHealthy)
  • Retrieves device configuration from a dummy in-memory database
  • Returns GhostWire IP, WireGuard port, allowlist, and blocklist
  • Returns appropriate HTTP status codes and JSON responses

Related issue

Closes #9

Component(s) touched

  • Coordination server
  • Clientside Agent (WireGuard / NAT / CLI)
  • Desktop client (Frontend)
  • Docs / infra

Testing

Tested using Postman. Test screenshots have been included in the PR.
Verified the following scenarios:

  • Successful device connection (200 OK)
  • Unknown device ID (404 Not Found)
  • Missing required field deviceId (400 Bad Request)
  • Device reported unhealthy (406 Not Acceptable)
  • Invalid JSON body (400 Bad Request)

Checklist

  • Tests added or updated for the change
  • Tests passes locally
  • Code follows style standards
  • No unrelated files changed
  • Docs/comments updated if behavior changed

Screenshots

200 OK

Screenshot 2026-08-04 at 1 46 48 PM Screenshot 2026-08-04 at 1 52 21 PM

404 Not Found

Screenshot 2026-08-04 at 1 52 45 PM

400 Bad Request

Screenshot 2026-08-04 at 1 53 08 PM

406 Not Acceptable

Screenshot 2026-08-04 at 1 53 46 PM

400 Bad Request (Invalid JSON)

Screenshot 2026-08-04 at 3 39 08 PM

@HARSHVARANDANI
HARSHVARANDANI merged commit 8873dd5 into devlup-labs:main Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🛠️ [Feature]: Co-ordination server- Connect API

2 participants