This repository demonstrates my skills in building scalable, maintainable, and high-performance applications using Fastify, with TypeScript for robust type-checking, and seamless integration of MongoDB. It serves as a practical resource for developers and learners looking to explore modern backend architectures. Feel free to use, modify, and expand upon this project for personal or professional use.
- Clone this repository: Fastify-MongoDB
- An IDE or text editor like VS Code.
- Install Node.js (version 20.12.1 or higher).
- Use a package manager such as NPM or Yarn.
- Install MongoDB.
- Create an
.env
file based on the.env.sample
and update MongoDB credentials. - Use an API testing tool like Postman.
- Import the
Fastify-MongoDB.postman_collection.json
file in Postman. - Run
npm install
to install the necessary node packages.
- Run
npm run dev
to build the project and start the server.
This project covers the following topics:
- User and Product CRUD operations with MongoDB.
- Monolithic architecture.
- User Sign-Up and Login functionality.
- HTTP request methods: GET, POST, PUT, PATCH, DELETE.
- JWT authorization and authentication.
- Argon2 for password hashing and compare.
- Helmet for security.
- ESLint for code linting.
- Prettier for code formatting.
- Postman collection for API testing.
Fastify: | Fastify |
MongoDB: | MongoDB |
TypeScript: | TypeScriptLang |
- Website: rajneshwar.com
- LinkedIn: linkedin.com/in/rajneshwar-singh
- Email: rajneshwarthakur@gmail.com
© 2024 Rajneshwar Singh