Skip to content

add user registration and verification handlers - #4

Merged
vidhipec27 merged 8 commits into
vidhi/backendstufffrom
savy/backend
Jan 4, 2026
Merged

add user registration and verification handlers#4
vidhipec27 merged 8 commits into
vidhi/backendstufffrom
savy/backend

Conversation

@Savy011

@Savy011Savy011 commented Jan 4, 2026

Copy link
Copy Markdown
Collaborator

what does this do?

This PR adds the ability to register new users and verify them via email token to the API.

type

  • ✨ feature
  • 🐛 bug fix / hot fix
  • 🔧 refactor / folder restructure
  • 📝 reliability / test / docs
  • 💄 styling / components / ui / ux
  • 🤓 typo / readability

how to test this

Important

The /api/auth/register route requires additional env-vars and backend setup, which aren't documented yet.
So, test the routes please set the following env-vars on your machine, then reach out to me for further instructions.

  1. BACKEND_BASE_URL
  2. SMTP_HOST
  3. SMTP_PORT
  4. SMTP_EMAIL
  5. SMTP_PASS
  1. make a POST request with appropiate data to /api/auth/register route to create a new user.
  2. make a GET request to /api/auth/verify-email/:token route to verify the newly created user.

standard compliance

  • semantic HTML
  • keyboard navigation works
  • screen reader friendly
  • N/A / no UI changes

oath taking

  • i tested it
  • doesn't break existing stuff
  • this is genuinely the smallest useful piece

@vidhipec27
vidhipec27 merged commit 85466fa into vidhi/backendstuffJan 4, 2026
Savy011 added a commit that referenced this pull request Feb 5, 2026
* branch commit lesgo
* fix env module and import alias
* migrate /v1/user/login route/
* better api docs
* migrate api health routes
* update schema defn for user login handler
* update documentation tags
* install email deps
* add favicons and related assets
* create verify email template
* change email dev server port
* rename `user` handler to `auth`
* add user registration and verification handlers (#4)
* add branch names constants
* add nodemailer
* update verify email templ, update api docs path
* add smtp env vars
* add email import alias
* add user registration hanlder
* complete user verification handler
* add todo comments
* Updated Docs for user registration and verification handlers
* Change tags from 'Registration' to 'Authentication'
* add `requireAuth` macro (#6)
* implemented assign role api
* `getEvent` and `createEvent` implemented
* renamed `assign.ts` to `user.ts` + fixed urls
* slight fix
* more small fixes!
* no more boilerplate (#8)
* refactor constants and api schemas
* delete health handler
* move macros to api utils
* move and update error type guard
* create helper functions to reduce handler boiler plate
* refactor handlers to use new helper functions
* add jsdocs to helpers functions.
they really need them....
* fix imports and minor docs
* fix styling for email
---------
Co-authored-by: Savy <savy.novachez011@proton.me>
Co-authored-by: KD <keshavdham2005@gmail.com>
vidhipec27 added a commit that referenced this pull request Feb 21, 2026
* proxy server canvas set up + some apis (#7)
* branch commit lesgo
* fix env module and import alias
* migrate /v1/user/login route/
* better api docs
* migrate api health routes
* update schema defn for user login handler
* update documentation tags
* install email deps
* add favicons and related assets
* create verify email template
* change email dev server port
* rename `user` handler to `auth`
* add user registration and verification handlers (#4)
* add branch names constants
* add nodemailer
* update verify email templ, update api docs path
* add smtp env vars
* add email import alias
* add user registration hanlder
* complete user verification handler
* add todo comments
* Updated Docs for user registration and verification handlers
* Change tags from 'Registration' to 'Authentication'
* add `requireAuth` macro (#6)
* implemented assign role api
* `getEvent` and `createEvent` implemented
* renamed `assign.ts` to `user.ts` + fixed urls
* slight fix
* more small fixes!
* no more boilerplate (#8)
* refactor constants and api schemas
* delete health handler
* move macros to api utils
* move and update error type guard
* create helper functions to reduce handler boiler plate
* refactor handlers to use new helper functions
* add jsdocs to helpers functions.
they really need them....
* fix imports and minor docs
* fix styling for email
---------
Co-authored-by: Savy <savy.novachez011@proton.me>
Co-authored-by: KD <keshavdham2005@gmail.com>
* setup tailwind, remove sass
* add markup for `sign-in` route
* update biome config
* update check:write script, add deps
* update env lib
* rename schemas, format imports
* add projects scripts
* update require-auth macro to include role based filtering
* update sign-in api route, add sign-out and me api handlers
* setup logger
* move types around
* add session related functions
* setup signin route, and auth checks
* dont need session secret
* resolve un-resolved merge conflicts
---------
Co-authored-by: Vidhi <151131126+vidhipec27@users.noreply.github.com>
Co-authored-by: KD <keshavdham2005@gmail.com>
GURMEHAR-PEC pushed a commit that referenced this pull request Apr 18, 2026
* branch commit lesgo
* fix env module and import alias
* migrate /v1/user/login route/
* better api docs
* migrate api health routes
* update schema defn for user login handler
* update documentation tags
* install email deps
* add favicons and related assets
* create verify email template
* change email dev server port
* rename `user` handler to `auth`
* add user registration and verification handlers (#4)
* add branch names constants
* add nodemailer
* update verify email templ, update api docs path
* add smtp env vars
* add email import alias
* add user registration hanlder
* complete user verification handler
* add todo comments
* Updated Docs for user registration and verification handlers
* Change tags from 'Registration' to 'Authentication'
* add `requireAuth` macro (#6)
* implemented assign role api
* `getEvent` and `createEvent` implemented
* renamed `assign.ts` to `user.ts` + fixed urls
* slight fix
* more small fixes!
* no more boilerplate (#8)
* refactor constants and api schemas
* delete health handler
* move macros to api utils
* move and update error type guard
* create helper functions to reduce handler boiler plate
* refactor handlers to use new helper functions
* add jsdocs to helpers functions.
they really need them....
* fix imports and minor docs
* fix styling for email
* `event` route implementation completed, testing to be done
* auth stuff :P (#10)
* proxy server canvas set up + some apis (#7)
* branch commit lesgo
* fix env module and import alias
* migrate /v1/user/login route/
* better api docs
* migrate api health routes
* update schema defn for user login handler
* update documentation tags
* install email deps
* add favicons and related assets
* create verify email template
* change email dev server port
* rename `user` handler to `auth`
* add user registration and verification handlers (#4)
* add branch names constants
* add nodemailer
* update verify email templ, update api docs path
* add smtp env vars
* add email import alias
* add user registration hanlder
* complete user verification handler
* add todo comments
* Updated Docs for user registration and verification handlers
* Change tags from 'Registration' to 'Authentication'
* add `requireAuth` macro (#6)
* implemented assign role api
* `getEvent` and `createEvent` implemented
* renamed `assign.ts` to `user.ts` + fixed urls
* slight fix
* more small fixes!
* no more boilerplate (#8)
* refactor constants and api schemas
* delete health handler
* move macros to api utils
* move and update error type guard
* create helper functions to reduce handler boiler plate
* refactor handlers to use new helper functions
* add jsdocs to helpers functions.
they really need them....
* fix imports and minor docs
* fix styling for email
---------
Co-authored-by: Savy <savy.novachez011@proton.me>
Co-authored-by: KD <keshavdham2005@gmail.com>
* setup tailwind, remove sass
* add markup for `sign-in` route
* update biome config
* update check:write script, add deps
* update env lib
* rename schemas, format imports
* add projects scripts
* update require-auth macro to include role based filtering
* update sign-in api route, add sign-out and me api handlers
* setup logger
* move types around
* add session related functions
* setup signin route, and auth checks
* dont need session secret
* resolve un-resolved merge conflicts
---------
Co-authored-by: Vidhi <151131126+vidhipec27@users.noreply.github.com>
Co-authored-by: KD <keshavdham2005@gmail.com>
* fix biome schema mismatch
* refactor base cookie object into constants
* implementing a common search api in
---------
Co-authored-by: Savy <savy.novachez011@proton.me>
Co-authored-by: KD <keshavdham2005@gmail.com>
Sign up for freeto 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.

2 participants

@Savy011@vidhipec27