virtua-todo Svelte Themes

Virtua Todo

Minimalist, Clean TODO Application in Svelte & SQLite

๐Ÿ“ TODO Application

A minimalist, distraction-free TODO application built with FastAPI and Svelte.

๐ŸŽฏ Features

  • โœ… Add, edit, and delete tasks
  • โœ… Mark tasks as complete/incomplete
  • โœ… Persistent storage with SQLite
  • โœ… Clean, minimalist UI with dark/light themes
  • โœ… Responsive design for all devices
  • โœ… Kubernetes-ready deployment

๐Ÿ› ๏ธ Tech Stack

Backend:

  • FastAPI (Python web framework)
  • SQLite (database)
  • Pydantic (data validation)

Frontend:

  • Svelte/SvelteKit (reactive framework)
  • Vanilla CSS (no frameworks)
  • Modern ES6+ JavaScript

Deployment:

  • Docker containers
  • Kubernetes manifests
  • ArgoCD for GitOps

๐Ÿš€ Quick Start

Development

  1. Backend Setup:

    cd backend
    pip install -r requirements.txt
    uvicorn main:app --reload
    
  2. Frontend Setup:

    cd frontend
    npm install
    npm run dev
    

The application will be available at http://localhost:5173 with the API at http://localhost:8000.

Production Deployment

  1. Build Docker Images:

    # Backend
    cd backend
    docker build -t todo-backend:latest .
       
    # Frontend  
    cd frontend
    docker build -t todo-frontend:latest .
    
  2. Deploy to Kubernetes:

    kubectl apply -f k8s/
    
  3. ArgoCD Deployment:

    kubectl apply -f k8s/argocd-application.yaml
    

๐Ÿ“ Project Structure

TODO_APP/
โ”œโ”€โ”€ backend/                 # FastAPI backend
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ api/            # API routes
โ”‚   โ”‚   โ”œโ”€โ”€ database/       # Database connection
โ”‚   โ”‚   โ””โ”€โ”€ models/         # Pydantic models
โ”‚   โ”œโ”€โ”€ tests/              # Backend tests
โ”‚   โ”œโ”€โ”€ main.py             # FastAPI application
โ”‚   โ”œโ”€โ”€ requirements.txt    # Python dependencies
โ”‚   โ””โ”€โ”€ Dockerfile         # Backend container
โ”œโ”€โ”€ frontend/               # Svelte frontend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/     # Svelte components
โ”‚   โ”‚   โ”œโ”€โ”€ routes/         # SvelteKit routes
โ”‚   โ”‚   โ”œโ”€โ”€ stores/         # State management
โ”‚   โ”‚   โ””โ”€โ”€ lib/           # Utilities
โ”‚   โ”œโ”€โ”€ static/            # Static assets
โ”‚   โ”œโ”€โ”€ package.json       # Node dependencies
โ”‚   โ””โ”€โ”€ Dockerfile        # Frontend container
โ”œโ”€โ”€ k8s/                   # Kubernetes manifests
โ”œโ”€โ”€ COPILOT_MVP.md        # Requirements document
โ””โ”€โ”€ README.md            # This file

๐Ÿงช API Endpoints

Method Endpoint Description
GET /api/tasks Get all tasks
POST /api/tasks Create new task
PUT /api/tasks/{id} Update task
PUT /api/tasks/{id}/complete Mark task complete
PUT /api/tasks/{id}/reopen Reopen completed task
DELETE /api/tasks/{id} Delete task
GET /health Health check

๐ŸŽจ Design Principles

  • Minimalist: No clutter, animations, or distractions
  • Fast: Optimized for performance and quick interactions
  • Accessible: Keyboard navigation and screen reader friendly
  • Responsive: Works on all device sizes
  • Privacy-First: No tracking, analytics, or external dependencies

๐Ÿ“Š Database Schema

CREATE TABLE tasks (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    title TEXT NOT NULL CHECK(length(title) > 0 AND length(title) <= 200),
    description TEXT CHECK(description IS NULL OR length(description) <= 1000),
    status TEXT NOT NULL CHECK(status IN ('pending', 'completed')) DEFAULT 'pending',
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);

๐Ÿ”ง Configuration

Environment Variables

Backend:

  • DATABASE_PATH: Path to SQLite database file (default: /app/data/todo.db)
  • CORS_ORIGINS: Allowed CORS origins (default: *)

Kubernetes Configuration

  • Storage: 1GB PVC for SQLite database
  • Resources: Configured resource limits for both containers
  • Health Checks: Liveness and readiness probes
  • LoadBalancer: MetalLB service for external access

๐Ÿงช Testing

# Backend tests
cd backend
pytest

# Frontend tests (when implemented)
cd frontend  
npm test

๐Ÿ“„ License

This project is open source. See the requirements document for full feature specifications.

๐Ÿค Contributing

  1. Review the requirements in COPILOT_MVP.md
  2. Follow the existing code style and patterns
  3. Add tests for new features
  4. Update documentation as needed

Built with โค๏ธ for simplicity and productivity.

Top categories

Loading Svelte Themes