Skip to content

keyabist/ToDo-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

📝 ToDo-App

A full-stack To-Do List application built using React, Node.js, Express, and PostgreSQL.


📦 Tech Stack

Frontend:

  • React (TypeScript)
  • Tailwind CSS

Backend:

  • Node.js
  • Express.js

Database:

  • PostgreSQL

🚀 Features

  • ✅ Add new tasks
  • ✏️ Edit existing tasks
  • 🗑️ Delete tasks
  • ✅ Mark tasks as completed
  • 🧹 Clear all tasks

📂 Project Structure


ToDo-App/
│
├── client/         # React frontend
│   ├── public/
│   └── src/
│       └── App.tsx
│
├── server/         # Node.js + Express backend
│   ├── db.js
│   └── index.js
│
├── .gitignore
└── README.md


⚙️ Installation

1. Clone the Repository

git clone https://github.com/keyabist/ToDo-App.git
cd ToDo-App

2. Setup PostgreSQL

  • Create a PostgreSQL database.
  • Create a todos table:
CREATE TABLE todos (
  todo_id SERIAL PRIMARY KEY,
  todo_desc VARCHAR(255),
  todo_completed BOOLEAN DEFAULT false
);

3. Configure Backend

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'
});

4. Install Dependencies

Backend:

cd server
npm install

Frontend:

cd ../client
npm install

🧪 Running the App

Start Backend

cd server
npm start

Start Frontend

cd ../client
npm start

🛠️ Available Scripts

In the client/ folder:

npm start       # Run React development server
npm run build   # Build production assets

In the server/ folder:

npm start       # Start Express server

🌐 API Endpoints

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

🙌 Acknowledgments

Built as a hands-on project to learn full-stack development using modern web technologies.


📄 License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published