Skip to content
Gautam Kumar edited this page Apr 8, 2026 · 3 revisions

Welcome to the capuchin wiki!

πŸ“œ Capuchin: A robust Todo application

A feature-rich full-stack todo list application with a Go (Golang) REST API backend and a React/Vite frontend using a professional-grade decoupled architecture.

πŸš€ Features Implemented

  • Backend (Go + Gin): RESTful API with distinct layers (handlers, services, database, middleware) and robust error handling.
  • Authentication: Secure Signup, Login, and Logout using short-lived JWT tokens with a database-backed token blacklisting mechanism.
  • Database (PostgreSQL): Relational persistence mapped implicitly to user context to enforce cross-tenant data isolation.
  • Frontend (React + Vite): Modern reactive UI with custom asynchronous Hooks (useTodos, useAuth) abstracting away native fetch requests.
  • Offline-friendly mode: Supports an unauthenticated Guest mode backed tightly by localStorage.
  • Containerization: Clean Docker Compose multi-stage orchestrations covering both isolated local development profiles and production scratch-image deployment.

πŸ“‚ Project Structure

capuchin/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ cmd/
β”‚   β”‚   β”œβ”€β”€ server/           # Entry point for the REST server
β”‚   β”‚   β”œβ”€β”€ migrate/          # Standalone binary runner for schema definitions
β”‚   β”‚   └── seed/             # Dev DB seed runner
β”‚   β”œβ”€β”€ internal/
β”‚   β”‚   β”œβ”€β”€ config/           # Environment & Config map parsing
β”‚   β”‚   β”œβ”€β”€ database/         # PostgreSQL driver configuration & pooling limits 
β”‚   β”‚   β”œβ”€β”€ handlers/         # HTTP Route logic & payload validation
β”‚   β”‚   β”œβ”€β”€ middleware/       # Identity resolution & security guards
β”‚   β”‚   β”œβ”€β”€ models/           # Data structures
β”‚   β”‚   β”œβ”€β”€ routes/           # Mux mappings setup
β”‚   β”‚   └── services/         # Identity and persistence core logic workflows
β”‚   β”œβ”€β”€ Dockerfile            # Multi-stage Backend Container 
β”‚   β”œβ”€β”€ air.toml              # Hot Reload configs
β”‚   β”œβ”€β”€ go.mod                # Go Dependencies
β”‚   └── test.sh               # Integration / E2E endpoint bash test harness
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/       # Presentational layout components
β”‚   β”‚   β”œβ”€β”€ hooks/            # Primary React state workflows (`useAuth`, `useTodos`) 
β”‚   β”‚   β”œβ”€β”€ lib/              # Core native-fetch wrapper API logic
β”‚   β”‚   β”œβ”€β”€ pages/            # Page-level route views
β”‚   β”‚   β”œβ”€β”€ types/            # TypeScript definitions
β”‚   β”‚   β”œβ”€β”€ App.tsx
β”‚   β”‚   └── main.tsx
β”‚   β”œβ”€β”€ Dockerfile            # Nginx + React Multi-stage Frontend Container
β”‚   β”œβ”€β”€ vite.config.ts        # Vite bundling settings
β”‚   └── package.json
β”œβ”€β”€ compose.yml               # Lean Production Orchestration
β”œβ”€β”€ compose-dev.yml           # Dev Mode (Air/Vite) overrides
└── Makefile                  # Command shortcuts

🧠 Documentation

For an in-depth dive into the structure and patterns, please refer to our dedicated guides:

Clone this wiki locally