In this repository, I practiced building REST APIs using Node.js, Express, and MongoDB. Here's a brief overview of tasks completed in each homework assignment:
Homework 1:
- Implemented a command-line interface (CLI) for managing a contact list using the commander package.
- Validated user input and interacted with a JSON file to store contact data.
Homework 2:
- Extended the project to create a REST API for managing contacts.
- Integrated Express.js for handling HTTP requests and responses.
- Implemented endpoints for listing, adding, removing, and updating contacts.
- Utilized Joi for request body validation and organized the codebase into controllers, services, and schemas.
Homework 3:
- Set up MongoDB Atlas, created a database, and imported data using MongoDB Compass.
- Integrated Mongoose to interact with MongoDB and replaced file storage with database storage.
- Implemented additional functionality to update the favorite status of contacts.
Homework 4:
- Implemented user authentication and authorization using JSON Web Tokens (JWT).
- Added registration and login endpoints, password hashing, and token verification.
- Implemented middleware for token verification and added routes for user logout and getting current user data.
Homework 5:
- Added email verification for user registration using the SendGrid service.
- Integrated the SendGrid API for sending emails with verification tokens.
- Implemented an endpoint for verifying user emails and functionality for resending verification emails.
Homework 6:
- Integrated image upload functionality using Multer for user avatars.
- Created endpoints for uploading and updating user avatars, processing images with Jimp, and saving them in a public directory.
- Implemented email confirmation after user registration using SendGrid or nodemailer as an alternative.
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT (JSON Web Tokens)
- Joi
- Multer
- SendGrid
- Jimp