A basic full-stack todo list application with a Go (Golang) REST API backend and a React frontend with a professional-grade storage architecture.
- Backend (Go + Gin): RESTful API with distinct layers (Handlers, Services, DB) and robust error handling.
- Authentication: Secure Signup, Login, and Logout using JWT tokens.
- Database (PostgreSQL): Relational persistence using
database/sqlwith schema initialization on startup. - Frontend (React + Vite): Modern reactive UI with Hooks (useState, useEffect).
- Styling (Tailwind CSS): Dark-mode interface with optimistic UI.
- Architecture: Clean architecture enforcing separation of concerns in 'internal'.
- Containerization: Docker & Docker Compose for Dev/Prod.
capuchin/
├── backend/
│ ├── cmd/
│ │ └── server/
│ │ └── main.go # Entry point
│ ├── internal/
│ │ ├── config/ # Environment & Config setup
│ │ ├── database/ # PostgreSQL connection & init
│ │ ├── handlers/ # HTTP Route handlers
│ │ ├── middleware/ # Auth & Error middleware
│ │ ├── models/ # Data structures
│ │ ├── routes/ # API route definitions
│ │ └── services/ # Core business logic
│ ├── Dockerfile # Backend Container
│ ├── air.toml # Hot Reload Config
│ ├── go.mod # Dependencies
│ └── go.sum
├── frontend/
│ ├── src/
│ │ ├── App.tsx
│ │ ├── App.css
│ │ └── main.tsx
│ ├── Dockerfile # Frontend Container
│ ├── vite.config.ts # Build Config
│ └── package.json
├── compose.yml # Prod Orchestration
├── compose-dev.yml # Dev Mode Overrides
└── Makefile # Command shortcuts
└── package.json
- Backend: Go (REST API, Clean Architecture)
- Backend Framework: Gin
- Frontend: React, TypeScript
- Containerize: Docker
- Database: PostgreSQL
Open Terminal 1
cd backend
go run cmd/server/main.goServer runs on localhost:8080
Open Terminal 2
cd frontend
npm run devClient opens at localhost:5173
Install npm packages
npm iRun npx script
npx concurrently "cd ./backend/cmd/server && go run main.go" "npm run dev --prefix ./frontend"- Frontend: http://localhost:5173
- Health Check: http://localhost:8080/health
- Backend API: http://localhost:8080/todos
We support two modes: Development (Hot-Reload) and Production (Lean Static Builds).
Runs the backend with Air (Go hot-reload) and Frontend with Vite (HMR). Changes to code are reflected instantly.
make dev
# OR
docker compose --env-file .env.example -f compose-dev.yml up --build- Frontend: http://localhost:5173
- Health Check: http://localhost:8080/health
- Backend API: http://localhost:8080/todos
Runs a lean, production-ready build (scratch image for Go, nginx for React).
make prod
# OR
docker compose --env-file .env -f compose.yml up --build- App: http://localhost
- Health Check: http://localhost:8080/health
- Backend API: http://localhost:8080/todos
make down
# OR
#in active terminal
ctrl+c or cmd+c For an in-depth dive into the structure and patterns, please refer to our dedicated documentation:
- Go: Structs, Slices, JSON Marshalling, Modules, Package Exporting, Clean Architecture.
- React: Functional Components, Hooks, API Integration (fetch, async/await), Controlled Inputs.
- Testing: Included a robust
backend/verify_backend.shshell script to instantly orchestrate E2E integration tests against all API endpoints. - Docker: Multi-stage builds, Scratch images, Docker Compose overrides.
- General: REST API Design, CORS, JSON Persistence, Refactoring,TypeScript(for styling), axios (for API calls)
Long term plans:
folder todo collaborators real time update organization authentication groups and access sharelink auth login schedule with reminder version control mcp server