A full-stack todo application built with React, Node.js, and PostgreSQL.
- User authentication (signup/login)
- Create, read, update, and delete todos
- Progress tracking for each todo
- Responsive design
- React
- Vite
- React Cookie for state management
- CSS for styling
- Node.js
- Express.js
- PostgreSQL
- bcrypt for password hashing
- jsonwebtoken for authentication
GET /todos
: Fetch all todosGET /todos/:userEmail
: Fetch todos for a specific userPOST /todos
: Create a new todoPUT /todos/:id
: Update an existing todoDELETE /todos/:id
: Delete a todoPOST /signup
: Register a new userPOST /login
: Authenticate a user
server/
: Contains the server-side codeclient/
: Contains the client-side code and assetssrc/
: Source filescomponents/
: React components
package.json
: Project dependencies and scriptsREADME.md
: Project documentation
- Node.js
- PostgreSQL
-
Clone the repository
git clone https://github.com/your-username/react-todo-app.git cd react-todo-app
-
Install dependencies
Install server dependencies
cd server
npm install
Install client dependencies
cd ../client
npm install
-
Set up environment variables
- Create a
.env
file in the client directory
VITE_APP_SERVERURL=http://localhost:8001
- Create a
.env
file in the server directory - Add the following variables:
DB_USERNAME=your_db_username DB_PASSWORD=your_db_password DB_HOST=localhost DB_PORT=5432 DB_DATABASE=todoreactapp
- Create a
-
Set up the database
- Create a PostgreSQL database named
todoreactapp
- Run the SQL commands in
server/data.sql
to create the necessary tables
- Create a PostgreSQL database named
-
Start the server
cd server
npm run dev
-
Start the client
cd client
npm start
-
Open your browser and navigate to
http://localhost:5173
Contributions are welcome! If you find any bugs or have suggestions for improvements, please open a issue or submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE.md file for details. Contact If you have any questions or inquiries, please contact Sanjay Khati Chhetri, social can be found at Github Profile under Where to find me section.