A full-stack To-Do List application built using React, Node.js, Express, and PostgreSQL.
Frontend:
- React (TypeScript)
- Tailwind CSS
Backend:
- Node.js
- Express.js
Database:
- PostgreSQL
- ✅ Add new tasks
- ✏️ Edit existing tasks
- 🗑️ Delete tasks
- ✅ Mark tasks as completed
- 🧹 Clear all tasks
ToDo-App/
│
├── client/ # React frontend
│ ├── public/
│ └── src/
│ └── App.tsx
│
├── server/ # Node.js + Express backend
│ ├── db.js
│ └── index.js
│
├── .gitignore
└── README.md
git clone https://github.com/keyabist/ToDo-App.git
cd ToDo-App- Create a PostgreSQL database.
- Create a
todostable:
CREATE TABLE todos (
todo_id SERIAL PRIMARY KEY,
todo_desc VARCHAR(255),
todo_completed BOOLEAN DEFAULT false
);Update server/db.js with your PostgreSQL credentials:
const pool = new Pool({
user: 'your_pg_username',
password: 'your_pg_password',
host: 'localhost',
port: 5432,
database: 'your_database_name'
});cd server
npm installcd ../client
npm installcd server
npm startcd ../client
npm start- Frontend runs at: http://localhost:3000
- Backend runs at: http://localhost:3001
In the client/ folder:
npm start # Run React development server
npm run build # Build production assetsIn the server/ folder:
npm start # Start Express server| Method | Endpoint | Description |
|---|---|---|
| GET | /todos |
Fetch all todos |
| POST | /todos |
Add a new todo |
| PUT | /todos/:id |
Update a todo |
| DELETE | /todos/:id |
Delete a todo |
| DELETE | /delete |
Clear all todos |
Built as a hands-on project to learn full-stack development using modern web technologies.
This project is licensed under the MIT License.