A sleek, modern todo application with a beautiful dark-mode interface built with React and FastAPI.
- Modern Dark UI: Stylish dark-mode interface with gradient accents
- Drag & Drop: Reorder tasks by dragging them
- Status Management: Track tasks as "To Do", "In Progress", or "Done"
- Filter Views: Filter tasks by status or view all
- Real-time Stats: See task counts at a glance
- Responsive Design: Works great on desktop and mobile
- TypeScript: Full type safety in the frontend
- RESTful API: Clean FastAPI backend with SQLite database
- React 18 with TypeScript
- @hello-pangea/dnd for drag-and-drop
- Lucide React for icons
- CSS custom properties for theming
- FastAPI (Python)
- SQLite database
- CORS enabled
- Pydantic for validation
- Python 3.8+
- Node.js 14+
- npm or yarn
- Install Python dependencies:
pip install -r requirements.txt- Navigate to the frontend directory:
cd todo-frontend- Install dependencies:
npm install- Build the React app:
npm run build- Host with nginx
GET /api/tasks- Get all tasksPOST /api/tasks- Create a new taskGET /api/tasks/{task_id}- Get a specific taskPUT /api/tasks/{task_id}- Update a taskDELETE /api/tasks/{task_id}- Delete a task
Create a .env file in the todo-frontend directory:
REACT_APP_API_URL=http://localhost:8000/api.
├── main.py # FastAPI backend
├── todos.db # SQLite database
├── requirements.txt # Python dependencies
└── todo-frontend/ # React frontend
├── src/
│ ├── App.tsx # Main React component
│ ├── App.css # Styles
│ └── index.tsx # Entry point
├── build/ # Production build
└── package.json # Node dependencies
- Add a task: Type in the input field and click "Add Task"
- Change status: Use the dropdown on each task
- Reorder tasks: Drag tasks by the grip handle
- Filter tasks: Click the filter tabs to view specific statuses
- Delete tasks: Click the trash icon
Edit CSS variables in todo-frontend/src/App.css:
:root {
--bg-primary: #0f0f1e;
--accent-primary: #6366f1;
--accent-secondary: #818cf8;
/* ... more variables */
}MIT