Skip to content

feat:implemented register api endpoint - #10

Merged
HARSHVARANDANI merged 1 commit into
devlup-labs:mainfrom
aaravpanchalijs-code:feature/register-api
Aug 6, 2026
Merged

feat:implemented register api endpoint#10
HARSHVARANDANI merged 1 commit into
devlup-labs:mainfrom
aaravpanchalijs-code:feature/register-api

Conversation

@aaravpanchalijs-code

@aaravpanchalijs-code aaravpanchalijs-code commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Implemented the skeleton for the Register API endpoint in the coordination server.

What this PR does

  • Adds RegisterHandler
  • Parses and validates incoming JSON requests
  • Verifies OAuth token using a dummy implementation
  • Checks for existing users using dummy data
  • Checks for existing devices using dummy data
  • Allocates a dummy virtual IP
  • Generates a dummy allowlist
  • Returns appropriate HTTP status codes and JSON responses

Related issue

Closes #6

Component(s) touched

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

Testing

Tested using Postman.

Verified the following scenarios:

  • Successful registration (201 Created)
  • Invalid JSON body (400 Bad Request)
  • Missing required fields (400 Bad Request)
  • Invalid OAuth token (401 Unauthorized)
  • User awaiting admin approval (403 Forbidden)
  • Device already registered (409 Conflict)

Checklist

  • Code follows style standards
  • Tests performed manually
  • No unrelated files changed

Notes

This implementation currently uses dummy data. Database integration, OAuth verification, and allowlist generation will be connected to the actual backend in future iterations.

API Testing Screenshots

201 Created

Screenshot From 2026-08-04 13-11-06

400 Bad request

Screenshot From 2026-08-04 13-11-17

409 Conflict

Screenshot From 2026-08-04 13-12-14

401 Unauthorized

image

@HARSHVARANDANI
HARSHVARANDANI merged commit 6d21885 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-Register API

2 participants