This repository contains the backend application for a Project Management system built using Node.js.
- Authentication: User authentication using JWT tokens.
- Hashing: Password encryption using bcrypt.
- Validation: Input validation and handling.
- Project Management: CRUD operations for managing projects.
- Task Management: CRUD operations for managing tasks within projects.
- User Management: CRUD operations for managing users.
- Role-based Access Control: Different roles (admin, project manager, team member) with varying permissions.
- Data Persistence: MySQL and Sequelize integration for storing project and user data.
- Node.js
- Express.js
- Sequelize
- MySQL
- JWT (JSON Web Tokens) for authentication
- bcrypt for password hashing
- node-input-validator
- dotenv for environment variables
- multer
Ensure you have the following installed:
- Node.js (v14 or higher)
- Sequelize
- MySQL
To run this application locally, you need to have Node.js, Sequelize and MySQL installed on your machine.
-
Clone this repository:
git clone https://github.com/satyansh-mittal/ProjectManagement-NodeJS.git
-
Install dependencies:
cd ProjectManagement-NodeJS npm install
-
Set up environment variables:
Create a
.env
file in the root directory and add the following variables:PORT=3000 TOKEN_HEADER_KEY='Authorization' JWT_SECRET=your_jwt_secret_key
-
Start the server:
npm start
The server should now be running at http://localhost:3000
.
- Ensure that the MySQL server is running and that the database specified in your /utils/index file is accessible or create a new database in MySQL.
- POST
/admin/signUp
: Create a new admin user. - GET
/admin/login
: Admin user login. - GET
/admin/users
: Retrieve all users (admin endpoint). - POST
/admin/addUser
: Add a new user (requires authentication). - GET
/admin/projects
: Retrieve all projects (admin endpoint). - POST
/admin/addProject
: Add a new project (requires authentication). - POST
/admin/assignProjects
: Assign projects to users (requires authentication). - GET
/admin/progress
: Get project progress (requires authentication).
- GET
/user/login
: User login. - GET
/user/profile
: Retrieve user profile (requires authentication). - PATCH
/user/edit
: Edit user profile (upload profile picture, requires authentication). - GET
/user/Projects
: Retrieve projects for a user (requires authentication). - POST
/user/addProgress
: Add progress to a project (requires authentication).
Contributions are welcome! Fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to customize it further based on specific functionalities or additional information you want to highlight about your project.