A simple todo application where a user can login, add todos, mark them as completed, and view all their todos. The project uses React for the front end, Express and Node.js for the backend, and MongoDB for the database.
- User authentication (login)
- Add todos
- View todo list
- Mark todos as completed
- Frontend: React
- Backend: Node.js, Express
- Database: MongoDB
- ORM: Mongoose
- Validation: Zod
- Node.js
- MongoDB
-
Navigate to the
backend-todo
directory:cd backend-todo
-
Install the dependencies: npm install
-
Start the backend server: node index.js
- Open a new terminal window and navigate to the frontend directory: cd frontend 2.Install the dependencies: npm i
- Start the frontend development server: npm run dev
The backend server will run on http://localhost:3000 by default. The following endpoints are available:
POST /todos: Create a new todo. GET /todos: Retrieve all todos for a user. PUT /todos/:id: Mark a todo as completed.
The frontend server will run on http://localhost:5173/ by default. You can access the user interface in your web browser and interact with the todo application.