Skip to content

API Routes

StarterStack includes several api routes to help you jumpstart your application with common functionality. Some routes are publicly accessible while others are protected requiring a JWT provided by login.

API RouteDescriptionProtected
GET /healthprovides server health monitoring functionalityNo
POST /loginprovides login functionalityNo
GET /logoutprovides logout functionalityNo
POST /reset-passwordprovides password reset functionalityNo
POST /change-passwordprovides forgot password functionalityNo
POST /userprovides create user functionalityYes
PUT /user/:idprovides update user functionalityYes
DELETE /user/:idprovides delete user functionalityYes
GET /user/:idprovides get user functionalityYes
GET /userprovides get all users functionalityYes
GET /productsprovides get all active stripe products and prices functionalityNo
GET /checkoutprovides stripe checkout functionalityNo
POST /webhook/stripeprovides stripe checkout webhook functionalityNo

API routes are located in the /backend/server.js file and follow the standard Express convention. Routes are mapped to middleware handlers to process the request and handle the response. Middleware handlers are located in /backend/middleware.