https://github.com/serverless-operations/todo-app-using-spec-kit
https://github.com/serverless-operations/todo-app-using-spec-kit
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/serverless-operations/todo-app-using-spec-kit
- Owner: serverless-operations
- Created: 2025-09-11T15:15:10.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-11T17:36:59.000Z (9 months ago)
- Last Synced: 2025-09-11T20:16:53.061Z (9 months ago)
- Language: TypeScript
- Size: 78.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TODO Task Management System
A full-stack task management application with Japanese language support, built with TypeScript, React, and Express.js.
## Features
- β
Create, read, update, and delete tasks
- π
Set deadlines for tasks
- β οΈ Visual warnings for approaching and overdue deadlines
- β Mark tasks as completed
- π―π΅ Japanese date formatting (YYYYεΉ΄MMζDDζ₯ HH:mm)
- π± Responsive web interface
- π Real-time updates with React Query
### Deadline Warnings
- **Yellow highlight**: Tasks due within 3 days (ζιγθΏγ₯γγ¦γγΎγ)
- **Red highlight**: Overdue tasks (ζιγιγγ¦γγΎγ)
## Tech Stack
### Backend
- Node.js 22
- Express.js 5
- TypeScript
- SQLite3 (better-sqlite3)
- Zod for validation
- Winston for logging
### Frontend
- React 19
- TypeScript
- React Router v7
- React Query (TanStack Query)
- Vite
- Axios
## Prerequisites
- Node.js 22.x or higher
- npm 11.x or higher
## Installation
1. Clone the repository:
```bash
git clone https://github.com/serverless-operations/todo-app-using-spec-kit.git
cd todo-app
```
2. Install dependencies:
```bash
# Install all dependencies (root, backend, and frontend)
npm run install:all
```
## Development
### Run both backend and frontend:
```bash
npm run dev
```
This will start:
- Backend API server on http://localhost:4000
- Frontend dev server on http://localhost:5173
### Run services individually:
Backend only:
```bash
npm run dev:backend
```
Frontend only:
```bash
npm run dev:frontend
```
## Building for Production
```bash
# Build both backend and frontend
npm run build
# Start production server
npm run start
```
## Testing
### Run all tests:
```bash
npm run test
```
### Run backend tests:
```bash
npm run test:backend
```
### Run frontend tests:
```bash
npm run test:frontend
```
### Test Coverage:
```bash
cd backend && npm run test:coverage
cd frontend && npm run test:coverage
```
## Project Structure
```
todo-app/
βββ backend/
β βββ src/
β β βββ db/ # Database initialization
β β βββ middleware/ # Express middleware
β β βββ models/ # Data models and validation
β β βββ routes/ # API routes
β β βββ services/ # Business logic
β β βββ types/ # TypeScript types
β β βββ utils/ # Utility functions
β βββ tests/
β β βββ contract/ # API contract tests
β β βββ integration/ # Integration tests
β β βββ unit/ # Unit tests
β βββ data/ # SQLite database file
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ hooks/ # Custom React hooks
β β βββ pages/ # Page components
β β βββ providers/ # Context providers
β β βββ services/ # API services
β β βββ types/ # TypeScript types
β βββ tests/ # Frontend tests
βββ docs/ # Documentation
βββ specs/ # Specifications
```
## API Documentation
See [docs/api.md](docs/api.md) for detailed API documentation.
### Quick API Reference
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/tasks` | Get all active tasks |
| GET | `/api/tasks/completed` | Get completed tasks |
| GET | `/api/tasks/:id` | Get task by ID |
| POST | `/api/tasks` | Create new task |
| PUT | `/api/tasks/:id` | Update task |
| DELETE | `/api/tasks/:id` | Delete task |
| PATCH | `/api/tasks/:id/complete` | Mark task as complete |
## Environment Variables
### Backend (.env)
```
PORT=4000
FRONTEND_URL=http://localhost:5173
```
### Frontend (.env)
```
VITE_API_URL=http://localhost:4000
```
## Database
The application uses SQLite for data persistence. The database file is automatically created at `backend/data/tasks.db` on first run.
### Database Schema
```sql
CREATE TABLE tasks (
id TEXT PRIMARY KEY,
content TEXT NOT NULL,
deadline TEXT NOT NULL,
status TEXT NOT NULL,
created_at TEXT NOT NULL,
completed_at TEXT
)
```
## Scripts
### Root package.json
- `npm run dev` - Run both backend and frontend in development mode
- `npm run build` - Build both backend and frontend
- `npm run start` - Start production server
- `npm run test` - Run all tests
- `npm run install:all` - Install all dependencies
### Backend Scripts
- `npm run dev` - Start development server with hot reload
- `npm run build` - Compile TypeScript to JavaScript
- `npm run start` - Start production server
- `npm run test` - Run tests
- `npm run db:init` - Initialize database
### Frontend Scripts
- `npm run dev` - Start Vite dev server
- `npm run build` - Build for production
- `npm run preview` - Preview production build
- `npm run lint` - Run ESLint
## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
This project is licensed under the MIT License.
## Acknowledgments
Built with [Spec-Driven Development](https://github.com/serverless-operations/spec-kit) methodology.