Skip to content

This Node.js REST API, developed through my 2nd to 6th homework assignments, is a hands-on showcase of my learning journey. Explore diverse features, RESTful endpoints of this project.

Notifications You must be signed in to change notification settings

kuciapakrystian/rest-api-goit-NodeJS

 
 

Repository files navigation

Node.js, MongoDB, Mongoose, and JWT Authentication with Extended Contact Management

GitHub last commit Node.js Version Express.js Version MongoDB Mongoose Version JWT

Homework4: Node.js, MongoDB, Mongoose, and JWT Authentication with Extended Contact Management

This is the fourth homework assignment in the Fullstack Bootcamp, building upon the previous projects that focused on HTTP requests, JSON contact management, and MongoDB integration. This module introduces authentication with JSON Web Token (JWT) and enhances the contact management system with additional features.

API Endpoints

Contact endpoints

  • (GET) /api/contacts: Retrieve a list of all contacts.
  • (GET) /api/contacts/:contactId: Retrieve a specific contact by ID.
  • (POST) /api/contacts: Add a new contact to the list.
  • (PUT) /api/contacts/:contactId: Update an existing contact's information.
  • (PATCH) /api/contacts/:contactId/favorite: Partially update an existing contact's information.
  • (DELETE) /api/contacts/:contactId: Delete an existing contact from the list.

User endpoints

  • (POST) /api/users/signup: Register a new user.
  • (POST) /api/users/signin: Login and obtain a JWT.
  • (POST) /api/users/logout: Logout the user.
  • (GET) /api/users/current: Retrieve information about the currently logged-in user.

Additional Endpoints

  • (GET) /api/contacts?page=<page_number>&limit=<page_size>: Retrieve paginated contacts.
  • (GET) /api/contacts?favorite=true: Retrieve contacts marked as favorites.
  • (PATCH) /api/users: Update the user's subscription level.

Technologies Used

  • Node.js: The runtime environment for executing the application.
  • MongoDB: A NoSQL database for data persistence.
  • Mongoose: An ODM (Object Data Modeling) library for MongoDB and Node.js.
  • JSON Web Token: Used for user authentication.
  • Express.js: A web application framework for building RESTful APIs.
  • JSON: Data interchange format used in the project.

Issues

If you encounter any issues or have suggestions, please open an issue.

Feedback

I welcome feedback and suggestions from users to improve the application's functionality and user experience.

Languages and Tools:

About

This Node.js REST API, developed through my 2nd to 6th homework assignments, is a hands-on showcase of my learning journey. Explore diverse features, RESTful endpoints of this project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 100.0%