A simple ToDo application that allows users to create, update, delete the tasks. Tech Stack used: React, Express, Node, PostgreSQL.
- Create new tasks and set their initial status
- Update task descriptions and status
- Delete tasks
- View all tasks
- Responsive and user-friendly interface
Here are some screenshots showcasing the application's interface:
-
Clone the repository:
git clone https://github.com/AnandKri/todo
-
Navigate into the project directory:
cd todo
-
Install dependencies:
# For backend (Node.js) cd server npm install # For frontend (React) cd ../client npm install
-
Set up environment variables:
- Create a
.env
file in the server folder specify database credentials, server port, etc.
Example .env
file for backend:
bash SERVER_PORT=5000 PG_SERVER=postgresServerURL PG_DATABASE=databaseName PG_PORT=5432 PG_USERNAME=postgresUsername PG_PASSWORD=postgresPassword PORT=5000
-
Run the application:
# Start backend server cd server node server # Start frontend cd ../client npm start
-
Access the application at http://localhost:3000.
- Open the application in your browser.
- Add tasks using the "Add" button.
- Update task descriptions by clicking on the "Edit" button.
- Delete tasks by clicking the "Delete" button next to the task.
- Description: Fetches all tasks
- Response:
[ { "todo_id": 1, "description": "Buy groceries", "status": "Pending" }, ... ]
- Description: Creates a new task
- Resquest Body:
{ "description": "Wash the car", "status": "In Progress" }
- Description: Deletes a task by id
- Description: Updates a task by id
- Request Body:
{
"description": "Updated task",
"status": "In Progress"
}