- ⚡ SWC for blazing-fast builds compared to TSC
- 🔒 JWT tokens for user authentication and routes protection
- 📚 Ready-to-go user model, controller, sign up, and sign in routes
- ⚡ Optional websockets built with Socket.io
- 🖼️ Image uploads with Multer
- 🔧 Environment variables management with dotenv
- 💡 Error handling
- 📝 Asynchronous logging with Pino
- ☁️ Ready-to-go access to AWS Parameter Store
- Clone the repository:
git clone https://github.com/olegkron/node-ts-api-template.git
- Install dependencies:
npm install
- Create a .env file with your configurations.
- Start the development server with
npm start
. - The API will be running on the port specified in the .env file
The template includes a basic user model and routes for sign up and sign in. You can easily add more models and routes as needed.
All routes are protected by default and require a valid JWT token to be included in the Authorization
header of the request.
The template includes an optional implementation of websockets using Socket.io.
- Nodemailer for easy email sending
- Twilio for SMS verification
- Rate limiting
- Password reset functionality
- Support for different database types (PostgreSQL, MySQL)
- Caching (Redis)
- Password hashing with Argon
If you have any suggestions for improvements or find any bugs, feel free to open a pull request or an issue.
- Oleg Kron - olegkron
This project is licensed under the MIT License - see the LICENSE file for details.