Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Management API

This is a RESTful API for managing projects, tasks, and users. It is built using Node.js, Express, and Prisma ORM with a PostgreSQL database.

Table of Contents

Video Demo

Watch the Demo

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/project-management-api.git
    cd project-management-api
  2. Install dependencies:

    npm install
  3. Install Prisma CLI (if not already installed):

    npm install -g prisma

Configuration

  1. Create a .env file in the root directory and add the following environment variables:

    DATABASE_URL=postgresql://user:password@localhost:5432/mydatabase
    JWT_SECRET=your_jwt_secret
    PORT=5000
    

    Replace user, password, localhost, 5432, and mydatabase with your PostgreSQL credentials and database name.

  2. Set up the database:

    Run the following command to apply the Prisma schema to your database:

    npx prisma migrate dev --name init

Running the Application

  1. Start the development server:

    npm run dev

    The server will start on the port specified in your .env file (default is 5000).

API Endpoints

  • User Endpoints:

    • POST /users: Create a new user
    • POST /users/getToken: Authenticate user and get a token
    • GET /users: Get all users
    • PUT /users/:id: Update a user
    • DELETE /users/:id: Delete a user
  • Project Endpoints:

    • POST /projects: Create a new project
    • GET /projects: Get all projects
    • PUT /projects/:id: Update a project
    • DELETE /projects/:id: Delete a project
  • Task Endpoints:

    • POST /projects/:projectId/tasks: Create a new task under a project
    • GET /projects/:projectId/tasks: Get all tasks for a specific project
    • PUT /tasks/:taskId: Update a task
    • DELETE /tasks/:taskId: Delete a task
  • Filter Endpoints:

    • GET /tasks: Filter tasks by status and assigned user

Testing

To test the API endpoints, you can use Postman or any other API testing tool. Ensure your server is running and use the endpoints listed above to interact with the API.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages