-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Gautam Kumar edited this page Apr 8, 2026
·
3 revisions
Welcome to the capuchin wiki!
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.
-
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 nativefetchrequests. -
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.
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
For an in-depth dive into the structure and patterns, please refer to our dedicated guides:
- Running The Project - How to run native vs Docker bounds.
- Architecture - System design and logic separation map.
- Backend Best Practices - Go coding conventions and clean boundaries.
- Frontend Best Practices - React hook rules and application layout instructions.
- API Reference - Complete endpoints behavior map.
- Database Guide - Isolation patterns and migrations guide.
- Production Guidelines - Nginx proxying, scratch image builds, and logging strategy.