Getting Started
Backend Development
Hot Reload
Use air for automatic server restart on file changes:.air.toml.
Code Organization
| Directory | Purpose | Convention |
|---|---|---|
cmd/ | Entry points | One main.go per binary |
internal/ | Private packages | Not importable by external projects |
internal/api/ | HTTP layer | Handlers and router |
internal/auth/ | Authentication | Handlers, middleware, session |
internal/config/ | Configuration | Environment-based loading |
internal/email/ | Email sending | Resend integration |
internal/models/ | Domain structs | No business logic |
internal/store/ | Data access | Database and Redis queries |
migrations/ | SQL migrations | Sequential numbered files |
Testing
Frontend Development
Adding Components
shadcn/ui components are added via CLI:File Conventions
| Pattern | Convention |
|---|---|
| Pages | app/{route}/page.tsx |
| Server Actions | app/actions/{domain}.ts |
| Components | components/{name}.tsx |
| UI primitives | components/ui/{name}.tsx |
| Utilities | lib/{name}.ts |
| Schemas | lib/schemas.ts |
Git Conventions
Pre-commit Hook
Install the pre-commit hook to run quality checks before each commit:make precommit (fmt check, vet, lint, test) before allowing the commit.
Branch Strategy
main— production-ready code- Feature branches for development
- Pull requests with CI checks required