A production-oriented starting point for authenticated TypeScript APIs that can run locally or on AWS Lambda.
The template combines Express, TypeScript, ESM, MongoDB/Mongoose, JWT authentication, HTTP-only cookies, refresh-token sessions, request validation, CRUD routes, Swagger/OpenAPI, and Serverless Framework deployment.
- Registration, login, logout, refresh-token rotation, and current-user endpoint.
- News CRUD with pagination, sorting, and filtering.
celebrate/Joirequest validation and centralized middleware.- Swagger UI at
/docsand OpenAPI JSON at/docs.json. - Local HTTP server and AWS Lambda handler through
serverless-http.
Node.js 22, npm, MongoDB, and AWS CLI/Serverless Framework for deployment.
Create .env with MongoDB connection settings and JWT_ACCESS_SECRET.
npm install
npm run devAPI: http://localhost:3000 · Swagger: http://localhost:3000/docs · OpenAPI: http://localhost:3000/docs.json
Configure an AWS profile and run npm run deploy. The current Serverless configuration uses Node.js 22 and dist/index.handler.
npm run dev— development server.npm run build— compile TypeScript.npm start— build and start the compiled server.npm run deploy— build and deploy with Serverless Framework.
Ukrainian documentation: README-uk.md.
Volodymyr Pashchenko, Full-stack Developer · GitHub · LinkedIn