Skip to content

rajneshwarsingh/Fastify-MongoDB

Repository files navigation

Fastify with MongoDB

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.

What will you need

  • 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.

How to Run the Project

  • Run npm run dev to build the project and start the server.

Key Features

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.

Helpful Links

Fastify: Fastify
MongoDB: MongoDB
TypeScript: TypeScriptLang

Connect with me


© 2024 Rajneshwar Singh