| Feature | Description |
|---|---|
| π Light/Dark Theme | Toggle between light and dark modes with persistent preference |
| π JWT Authentication | Secure user authentication with JSON Web Tokens |
| π Dashboard Analytics | Visual stats cards showing task completion metrics |
| π Smart Date Display | Relative dates (Today, Tomorrow, Overdue) with color coding |
| π Advanced Filtering | Filter tasks by date range, status, and search text |
| π± Responsive Design | Optimized for desktop, tablet, and mobile devices |
| π PDF Export | Download your task list as a formatted PDF |
| β‘ Real-time Updates | Instant feedback with themed notifications |
| Feature | Description |
|---|---|
| π‘οΈ Rate Limiting | Protection against brute force attacks (100 req/min general, 10 req/15min for auth) |
| π Security Headers | X-Frame-Options, X-XSS-Protection, X-Content-Type-Options, Referrer-Policy |
| π§Ή Input Sanitization | SQL injection prevention on all inputs |
| π¦ Request Size Limiting | 10KB max body size to prevent payload attacks |
| π Password Hashing | Bcrypt with secure salt rounds |
| π« JWT Tokens | Secure token-based authentication with expiration |
| Optimization | Description |
|---|---|
| ποΈ MVC Architecture | Clean separation with Controllers, Routes, and Middleware |
| π RESTful API | Standard REST endpoints (/api/auth/*, /api/todos/*) |
| π Query Optimization | Selective attributes in Sequelize queries |
| π CORS Caching | 24-hour preflight cache with maxAge |
| π Trust Proxy | Proper IP detection behind reverse proxies |
| π§ Global Error Handler | Centralized error handling with proper status codes |
Frontend:
- React 18.3 with React Router v6
- Ant Design 5 Component Library
- Day.js for date handling
- Axios for API requests
- CSS Variables for theming
Backend:
- Node.js with Express.js
- Sequelize ORM
- PostgreSQL Database
- JWT & Bcrypt for authentication
- Custom rate limiting middleware
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/login |
User login |
| POST | /api/auth/register |
User registration |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/todos |
Get all tasks |
| GET | /api/todos/:id |
Get single task |
| POST | /api/todos |
Create task |
| PUT | /api/todos/:id |
Update task |
| PATCH | /api/todos/:id/check |
Toggle task status |
| DELETE | /api/todos/:id |
Delete task |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Server status |
| GET | /api/health |
Health check with uptime |
- Node.js (LTS version recommended)
- PostgreSQL database
- npm or yarn
-
Clone the repository
git clone https://github.com/shehari007/full-stack-todo-web-app.git cd full-stack-todo-web-app -
Setup Backend
cd Server npm installCreate a
.envfile with your configuration:PORT=8000 JWT_KEY=your_jwt_secret_key # CORS Settings ALLOWED_ORIGINS=http://localhost:3000 ALLOWED_METHODS=GET,POST,PUT,PATCH,DELETE # Database Connection SEQ_CONNECTION=postgres://user:password@localhost:5432/taskflow
-
Initialize Database
npm run db:setup
This creates the database, tables, and seeds sample data.
-
Start Backend Server
npm start
-
Setup Frontend (in a new terminal)
cd Frontend npm installCreate a
.envfile:REACT_APP_BASE_URL=http://localhost:8000
npm start
-
Access the Application
Open http://localhost:3000 in your browser.
Default login credentials:
- Email:
[email protected] - Password:
admin123
- Email:
full-stack-todo-web-app/
βββ Frontend/
β βββ public/
β βββ src/
β βββ components/ # Reusable UI components
β β βββ common/ # Empty states, loaders
β β βββ modals/ # CRUD modals
β β βββ PDFDownloader/
β β βββ todo/ # TodoList component
β βββ context/ # Theme context provider
β βββ layout/ # Header, Footer, MainLayout
β βββ pages/ # Auth & Dashboard pages
β βββ styles/ # Global CSS with theme variables
β βββ utils/ # API services & date utilities
β
βββ Server/
βββ controllers/ # Auth & Todo controllers
βββ middleware/ # Auth, Rate limiter, Security, Error handler
βββ models/ # Sequelize models
βββ routes/ # API route definitions
βββ scripts/ # Database setup & seeding
βββ utils/ # Validation, JWT, Password hashing
The project includes vercel.json for serverless deployment:
- Deploy the Server folder as a Vercel serverless function
- Deploy the Frontend as a static site
- Use Supabase or Vercel Postgres for the database
Frontend (Vercel):
REACT_APP_BASE_URL=https://your-api-domain.vercel.app
Backend (Vercel):
JWT_KEY=your_production_jwt_secret
ALLOWED_ORIGINS=https://your-frontend-domain.vercel.app
ALLOWED_METHODS=GET,POST,PUT,PATCH,DELETE
SEQ_CONNECTION=your_postgres_connection_string
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.



