A clean and modular starter template for building secure authentication APIs using Node.js, Express, TypeScript, and JWT (JSON Web Tokens).
├── config/ # Database & environment configurations
├── controllers/ # Authentication and user controllers
├── models/ # Database models (e.g., User schema)
├── routes/ # Route definitions for authentication
├── App.ts # Main application entry point
├── package.json # Project dependencies
├── tsconfig.json # TypeScript configuration
└── .gitignore
- 🔑 JWT-based authentication (login, register, verify)
- 🧱 Modular folder structure
- 🛡️ Secure password hashing with bcrypt
- 🌐 Environment variable support via dotenv
- 💡 Written fully in TypeScript
- 🧩 Ready to integrate with MongoDB or any database
git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>npm installCreate a .env file in the root directory:
PORT=6000
MONGODB_URI=your_mongo_uri
JWT_SECRET=your_secret_key
npm startServer will start on: 👉 http://localhost:6000
- Node.js
- Express.js
- TypeScript
- MongoDB
- JWT
- bcrypt
This project is open-source and available under the MIT License.