A production-grade task management application built with React.js, Node.js, Express, and MongoDB with Firebase authentication.
- User authentication with email verification via Firebase
- Create and manage multiple boards
- Full CRUD operations on boards and todos
- Status tracking (Pending, In Progress, Completed)
- Priority levels (Low, Medium, High)
- Due date management
- Real-time statistics dashboard
- Responsive design with Tailwind CSS
- React.js with Vite
- React Router for navigation
- Axios for API requests
- Firebase Authentication
- Tailwind CSS (CDN)
- Node.js with Express
- MongoDB with Mongoose ODM
- Firebase Admin SDK
- JWT authentication via Firebase tokens
- MVC architecture
Todo Manager/
├── server/
│ ├── config/
│ │ ├── database.js
│ │ └── firebase.js
│ ├── controllers/
│ │ ├── auth.controller.js
│ │ ├── board.controller.js
│ │ └── todo.controller.js
│ ├── middleware/
│ │ └── auth.middleware.js
│ ├── models/
│ │ ├── User.js
│ │ ├── Board.js
│ │ └── Todo.js
│ ├── routes/
│ │ ├── auth.routes.js
│ │ ├── board.routes.js
│ │ └── todo.routes.js
│ ├── .env.example
│ ├── package.json
│ └── server.js
│
└── client/
├── src/
│ ├── components/
│ │ ├── Navbar.jsx
│ │ ├── PrivateRoute.jsx
│ │ ├── BoardCard.jsx
│ │ ├── BoardModal.jsx
│ │ ├── TodoCard.jsx
│ │ └── TodoModal.jsx
│ ├── config/
│ │ └── firebase.js
│ ├── context/
│ │ └── AuthContext.jsx
│ ├── pages/
│ │ ├── Login.jsx
│ │ ├── Register.jsx
│ │ ├── Dashboard.jsx
│ │ └── BoardView.jsx
│ ├── services/
│ │ ├── api.js
│ │ └── dataService.js
│ ├── App.jsx
│ └── main.jsx
├── index.html
├── vite.config.js
├── .env.example
└── package.json
- Node.js (v16 or higher)
- MongoDB installed and running locally or MongoDB Atlas account
- Firebase project created in Firebase Console
- Navigate to the backend directory:
cd backend- Install dependencies:
npm install- Create a
.envfile based on.env.example:
cp .env.example .env- Configure environment variables in
.env:
PORT=5002
MONGODB_URI=your-mongodb-uri
NODE_ENV=development
FIREBASE_PROJECT_ID=your-project-id
FIREBASE_PRIVATE_KEY=your-private-key
- Start the backend server:
npm run devThe backend will run on http://localhost:5002
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Create a
.envfile based on.env.example:
cp .env.example .env- Configure environment variables in
.env:
VITE_API_URL=http://localhost:5002/api
VITE_FIREBASE_API_KEY=your-api-key
VITE_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
VITE_FIREBASE_APP_ID=your-app-id
- Start the frontend development server:
npm run devThe frontend will run on http://localhost:5173
GET /api/auth/me- Get current userPUT /api/auth/profile- Update user profile
GET /api/boards- Get all boardsGET /api/boards/:id- Get board by IDPOST /api/boards- Create new boardPUT /api/boards/:id- Update boardDELETE /api/boards/:id- Delete board
GET /api/todos/board/:boardId- Get todos by boardGET /api/todos/:id- Get todo by IDPOST /api/todos- Create new todoPUT /api/todos/:id- Update todoDELETE /api/todos/:id- Delete todo
All endpoints except health check require Bearer token authentication.
- Register a new account with email and password
- Check your email for verification link
- Verify your email address
- Login with your credentials
- Create boards to organize your tasks
- Add todos to your boards
- Manage todo status, priority, and due dates
- Track progress with the dashboard statistics
- firebaseUid: String (unique)
- email: String (unique)
- displayName: String
- createdAt: Date
- lastLogin: Date
- title: String (required)
- description: String
- userId: ObjectId (ref: User)
- color: String
- createdAt: Date
- updatedAt: Date
- title: String (required)
- description: String
- boardId: ObjectId (ref: Board)
- userId: ObjectId (ref: User)
- status: String (pending/in-progress/completed)
- priority: String (low/medium/high)
- dueDate: Date
- createdAt: Date
- updatedAt: Date
The application follows MVC (Model-View-Controller) architecture:
- Models: Define data structure and database schemas
- Controllers: Handle business logic and request processing
- Routes: Define API endpoints and link to controllers
- Middleware: Handle authentication and request validation
- Config: Database and Firebase configuration
- Components: Reusable UI components
- Pages: Main application views
- Context: Global state management (Auth)
- Services: API communication layer
- Config: Firebase client configuration
- Firebase Authentication with email verification
- JWT token validation on every API request
- Protected routes on frontend
- User-specific data access control
- Environment variable for sensitive data
- CORS configuration
cd backend
npm run devUses nodemon for auto-restart on file changes.
cd frontend
npm run devcd backend
npm startcd frontend
npm run build
npm run previewThe build output will be in the dist directory.
- Ensure MongoDB is running before starting the backend
- Firebase credentials must be properly configured for authentication to work
- The frontend expects the backend to be running on port 5002
- Email verification is required before accessing the dashboard
- All todos are automatically deleted when their parent board is deleted