About | Features | Technologies | Requirements | Starting | License | Author
Robust and feature-rich backend API for a task management application with Node.js PostgreSQL & Postman. The API allows users to efficiently manage their tasks, collaborate with others, and stay organized. The design prioritizes functionality, performance, and scalability.
✔️ Set up a Node.js server to handle API requests
✔️ Assignment of Tasks to Users
✔️ Database Migrations/Seeds
✔️ RESTful CRUD Operations
✔️ Error handling and validation.
✔️ Implemented user-specific views for tasks.
✔️ Allow users to mark tasks as completed.
The following tools were used in this project:
Before starting 🏁, you need to have Git, Node, Docker & PostgreSQL installed.
- pg-pool : collection of database connections that can be reused.
- Nodemon : nodemon is a tool that helps develop Node.js based applications by automatically restarting the node application when file changes in the directory are detected.
- Express.js : framework that works on top of Node.js web server functionality to simplify its APIs.
- PostgreSQL : to connect VS Code to PostgreSQL
- GitHub : to connect GitHub account from VS Code
- Docker : simplifed view of containers.
- Express : Hosts current workspace with Express web server in Visual Studio Code.
- WSL : Linux-based tools, runtimes, and utilities.
# Clone this project
$ git clone https://github.com/theoneandonlyshadow/task-management-api
# Access
$ cd task-management-api
# Install dependencies
$ npm i
# Run the project with nodemon
$ nodemon index
# The server will initialize in the http://localhost:8070
-
Install Docker Desktop
-
Install VS Code
-
Install PostgreSQL
-
Install Postman
-
Create docker-compose.yml file.
-
Copy the same contents from this repo.
-
Open Docker Desktop and start.
-
(PowerShell) Type
docker compose up
-
Project container should be visible in the Docker Desktop.
-
Open pgAdmin 4 (PostgreSQL) and create a new database called "techcorp". Dont worry about creating tables, as both users and tasks table will initalize after running index.js.
-
Open VS Code, open Command Palette and type New Query (requires PostgreSQL extension) and type in credentials.
-
(WSL) Type
sudo systemctl status postgresql
to see if PostgreSQL is active. -
(WSL) Type
psql -U postgres -h localhost
orpsql -h 127.0.0.1 -p 5432 -U postgres
to connect to PostgreSQL. -
Open Postman and review my project according to the following endpoints:
-
Common Endpoints:
-
-> /displaytables: to display the tables
-
-> /displaydb: to display databases
-
-> /authenticate/{user_id}: authenticate user to see their tasks.
-
User Endpoints:
-
-> /users/create: Create a user (POST)
-
-> /users/display: Read users (display all users) (GET)
-
-> /users/update: Update a user (PUT)
-
-> /users/delete: Delete a user (DELETE)
-
-> /users/authenticate/{user_id}: "authenticate user's user_id to see their tasks. (GET)
-
Task Endpoints
-
-> /tasks/create: Create a task (POST)
-
-> /tasks/display: Read tasks (display all tasks) (GET)
-
-> /tasks/update: Update a task (PUT)
-
-> /tasks/delete: Delete a task (DELETE)
-
-> /tasks/assigntask/{user_id}: Assign Task to a User (POST)
-
-> /tasks/markcomplete: Write "Marked Complete" to a task. "Not Complete" by default when creating a task for a user (PUT).
If any feature is not working, please reinstall the tech and try again. If you would like a video of my screen recording about the full project, please let me know at madhavnair700@gmail.com or message me in WellFound.
This project is under license from MIT. For more details, see the LICENSE file.
Made with 3am efforts by Madhav Nair