A clean, production-ready Express + Sequelize + TypeScript boilerplate for building scalable REST APIs with ease.
Includes modern tooling, structured architecture, and batteries-included setup for rapid backend development.
- ⚙️ Express 5 — Fast and minimalist web framework
- 🗄️ Sequelize ORM — Supports MySQL, PostgreSQL, SQLite
- 🔒 JWT Authentication — Secure token-based auth flow
- 🧠 TypeScript + Decorators — Strong typing with OOP-friendly patterns
- 🧩 Dependency Injection — Powered by
tsyringe - 🌐 i18n Localization — With
i18nextmiddleware and file-based translations - 📦 Migrations & Seeders — Managed via
sequelize-cli - 🧰 Zod Validation — Schema-based input validation
- 🪵 Winston Logger — With daily rotate logs
- 🧼 Linting & Formatting — ESLint + Prettier integration
- 🧪 Ready for Testing — Easily extendable for Jest or Supertest setup
├── package.json
├── pnpm-lock.yaml
├── README.md
├── src
│ ├── error
│ │ ├── api.badRequest.ts
│ │ ├── api.conflict.ts
│ │ ├── api.error.ts
│ │ ├── api.forbidden.ts
│ │ ├── api.notFound.ts
│ │ ├── api.server.ts
│ │ ├── api.unauthorized.ts
│ │ ├── api.validation.ts
│ │ └── index.ts
│ ├── index.ts
│ ├── lib
│ │ ├── config.ts
│ │ ├── index.ts
│ │ └── setup
│ │ ├── app.ts
│ │ └── db.ts
│ ├── middlewares
│ │ ├── error.middleware.ts
│ │ ├── index.ts
│ │ ├── logger.middleware.ts
│ │ └── transaction.middleware.ts
│ ├── misc
│ │ ├── index.ts
│ │ ├── logger.ts
│ │ └── transaction.ts
│ ├── models
│ │ └── index.ts
│ ├── modules
│ ├── response
│ │ ├── api.response.ts
│ │ └── index.ts
│ ├── router
│ │ └── index.ts
│ └── types
│ ├── config.types.ts
│ └── index.ts
└── tsconfig.json
git clone https://github.com/thenishantsapkota/express-sequelize-ts-template
cd express-sequelize-ts-templatepnpm iPlease look for .env.example file in the project root for example.
pnpm migrate
pnpm seedpnpm devpnpm build
pnpm start| Command | Description |
|---|---|
| npm run dev | Start development server (watch mode) |
| npm run build | Compile TypeScript to JavaScript |
| npm run migrate | Run all database migrations |
| npm run seed | Run all seeders |
| npm run lint | Run ESLint checks |
| npm run lint:fix | Auto-fix linting issues |
| npm run format | Check code formatting |
| npm run format:write | Auto-format code with Prettier |
- Backend Framework: Express 5
- ORM: Sequelize + Sequelize-Typescript
- Language: TypeScript
- Validation: Zod
- Auth: JSON Web Tokens (JWT)
- Dependency Injection: tsyringe
- Logging: Winston + Daily Rotate File
- Documentation: Swagger UI
- Supports both CommonJS and ESM-compatible setup.
- Easily adaptable for microservices or monolithic architectures.
- Preconfigured for clean code, consistency, and scalability.
This project is licensed under the MIT License — feel free to use it for your own projects.
Developed with ❤️ by thenishantsapkota using Express, Sequelize, and TypeScript