This is a Fullstack To-Do List Application that allows users to create an account, authenticate using tokens, and perform CRUD operations on their to-do items.
- Node.js
- Express.js
- React
- PostgreSQL
- Docker
To run this project locally, follow these steps:
- Node.js installed
- Docker installed and running (for database)
- npm or yarn installed
- Clone the repository:
git clone https://github.com/yabad-codes/todo-fullstack.git
- Change into the project directory:
cd todo-fullstack
- Install server dependencies:
cd server && npm i
- Install client dependencies:
cd ../client && npm i
- Create a PostgreSQL database and update the configuration in
cd database && make
then access the database docker container usingdocker exec -it postgres sh
and runpsql -U postgres
then select todoapp database\c todoapp
then create your tables using SQL queries indata.sql
file. - Modify .env values with the right ones before launching the server and client.
- Update packages for server using
npm update
. - Run the server:
npm run server
- Run the client:
npm run client
- Users can create an account by providing email and password.
- Authentication is handled using tokens generated by the server (JWT).
- Once authenticated, users can perform CRUD operations on their to-do items.
- Create: Add new to-do items.
- Read: Fetch and display existing to-do items.
- Update: Modify the content or status of to-do items.
- Delete: Remove to-do items.
POST /signup
: Register a new user.POST /login
: Log in and receive an authentication token.GET /todos/:userEmail
: Get all to-do items for the authenticated user.POST /todos
: Create a new to-do item.PUT /todos/:id
: Update a specific to-do item.DELETE /todos/:id
: Delete a specific to-do item.
- Server configuration can be found in
server/server.js
. - Client configuration can be found in
client/App.js
.
- The authentication mechanism is built using jsonwebtoken.
- The React application is bootstrapped with vite.
For questions or issues, contact me in discord [yabad#8007].