Skip to content

MirrorInfo_shopApp project is a RESTful API built using Node.js and Express for managing tasks. It allows users to perform basic CRUD operations on tasks with attributes such as title, description, status, and timestamps. The API is designed to facilitate task management functionalities with MongoDB storage, and validation/error handling.

Notifications You must be signed in to change notification settings

jivakys/mirrorInfo_shopApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

MirrorInfo_shopApp

DESCRIPTION

MirrorInfo_shopApp project is a RESTful API built using Node.js and Express for managing tasks. It allows users to perform basic CRUD operations on tasks with attributes such as title, description, status, and timestamps. The API is designed to facilitate task management functionalities with MongoDB storage, and validation/error handling.

Table of Contents

Installation

Follow these steps to install and run the project:

  1. Clone the repository:

    git clone https://github.com/jivakys/mirrorInfo_shopApp.git
  2. Navigate to the project directory:

    cd mirrorInfo_shopApp
  3. Set up your environment variables by creating a .env file in the root directory. Example content:

    MONGODB_URL=your server url
  4. Start your application:

    npm run start
  5. Open the app in your browser at http://localhost:4000.

Configuration

Before running the application, make sure to configure the necessary environment variables in the .env file.

Demo

FRONTEND - VERCEL LINK

BACKEND - CYCLIC LINK

Endpoints

1.User Router (userRouter)

  1. Signup
URL: /users/register
Method: POST
  • Adds a new user to the database.
  • Allows users registration with name, email, and password.
  1. Login
URL: /users/login
Method: POST
  • Allows user login with email and password, generates a JWT token for authentication.

2.Task Router (taskRouter)

  1. Fetch All Tasks
URL: tasks/dashboard
Method: GET
  • Fetches all Tasks from the Database.
  • Returns an array of tasks objects with properties: id, title, description, status, timestamp
  1. Create Task
URL: /tasks/addTask
Method: POST
  • Adds a new task to the database.
  • Expects a JSON object with Task information in the request body.
  • Returns a success message upon successful addition.
  1. Update Task
URL: /update/:id
Method: PUT
  • Updates an existing task with the specified ID using the provided details.
  • Returns a success message upon successful Update.
  1. Delete Task
URL: /delete/:id
Method: DELETE
  • Deletes the task with the specified ID from the database.
  • Returns a success message upon successful Delete.
FEATURES
  • Authentication: The project includes JWT-based authentication to secure user data.
  • Hashing: User passwords are securely hashed to protect against unauthorized access.
  • dotenv: The project uses dotenv to manage environment variables and sensitive configuration data.
  • Relationship: The project includes database schema relationships between collections to support complex data structures.
  • Aggregation: The project uses MongoDB's aggregation framework to perform advanced queries and data manipulations.
TECHSTACKS USED

html CSS js nodejs express mongo npm


NPM PACKAGES

bcrypt.png cors dotenv jwt mongoose.png nodemon.png

File Structure
mirrorInfo_shopApp
|
|----- Backend/
|         |----- Config/
|         |         |----- db.js
|         |----- Middlewares/
|         |         |----- authenticate.js
|         |----- Models/
|         |         |----- taskModel.js
|         |         |----- userModel.js
|         |----- Routes/
|         |         |----- taskRoute.js
|         |         |----- userRoute.js   
|         |----- .gitignore
|         |----- .env
|         |----- index.js
|         |----- pakage-lock.json
|         |----- package.json
|  
|----- Frontend/
|         |         |----- index.html
|         |         |----- login.html
|         |         |----- signup.html
|         |         |----- tasks.html
|         |----- CSS/
|         |         |----- index.css
|         |         |----- login.css
|         |         |----- signup.css
|         |         |----- tasks.css
|         |----- IMAGES/
|         |----- JS/
|         |         |----- index.js
|         |         |----- login.js
|         |         |----- signup.js
|         |         |----- tasks.js
|----- README.md/

About

MirrorInfo_shopApp project is a RESTful API built using Node.js and Express for managing tasks. It allows users to perform basic CRUD operations on tasks with attributes such as title, description, status, and timestamps. The API is designed to facilitate task management functionalities with MongoDB storage, and validation/error handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages