Skip to content

serverless-operations/todo-app-using-spec-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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:
git clone https://github.com/serverless-operations/todo-app-using-spec-kit.git
cd todo-app
  1. Install dependencies:
# Install all dependencies (root, backend, and frontend)
npm run install:all

Development

Run both backend and frontend:

npm run dev

This will start:

Run services individually:

Backend only:

npm run dev:backend

Frontend only:

npm run dev:frontend

Building for Production

# Build both backend and frontend
npm run build

# Start production server
npm run start

Testing

Run all tests:

npm run test

Run backend tests:

npm run test:backend

Run frontend tests:

npm run test:frontend

Test Coverage:

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 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

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 methodology.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published