How boyeep/nextjs-go-monorepo-kit works
This is a Next.js/Go/PostgreSQL full-stack starter. The principal workflow is a user registering or signing in through the frontend, completing email verification when required, and accessing a protected dashboard; the Go API validates requests and persists account state. A separate owner-only analytics endpoint fetches Plausible metrics. The graph retains the documented landing and auth capabilities, but source excerpts do not show every frontend route or backend handler, so those links rely on README statements or are omitted where wiring is uncertain.
Main entry points: router.go HTTP router · auth_handler.go Auth endpoints · auth_service.go Auth rules · analytics_service.go Analytics query
Components 22
Next.js frontend
- Landing pages
frontend/src/features/home - Auth flows
frontend/src/features/auth - Auth API client
frontend/src/features/auth/services/auth-service.ts - Dashboard
frontend/src/features/dashboard - HTTP client
frontend/src/lib/api.ts
Go API
- HTTP router
backend/internal/server/router.go - Auth endpoints
backend/internal/handler/http/auth_handler.go - Analytics endpoint
backend/internal/handler/http/analytics_handler.go - Health endpoint
backend/internal/handler/http/health_handler.go - Auth rules
backend/internal/service/auth_service.go - Analytics query
backend/internal/service/analytics_service.go - Health check
backend/internal/service/health_service.go - Domain models
backend/internal/domain/models.go - Runtime config
backend/internal/config/config.go
Persistence
- User repository
backend/internal/repository/user_repository.go - Database setup
backend/internal/repository/db.go - Schema migrations
backend/internal/repository/migrations.go - Demo account seed
backend/internal/repository/demo_seed.go
External services
- PostgreSQL
- Plausible
- Email delivery
Other components
- User
Connections 22
- User → Landing pages: browses
README.md - User → Auth flows: registers or signs in
README.md - User → Dashboard: opens protected area
README.md - Auth flows → Auth API client: requests auth
frontend/src/features/auth/components/verify-email-page-client.tsx - Auth API client → HTTP client: sends requests
- HTTP client → HTTP router: calls API
- HTTP router → Auth endpoints: routes auth
backend/internal/server/router.go - HTTP router → Analytics endpoint: routes analytics
backend/internal/server/router.go - HTTP router → Health endpoint: routes health
backend/internal/server/router.go - Auth endpoints → Auth rules: delegates auth
backend/internal/handler/http/auth_handler.go - Health endpoint → Health check: requests status
backend/internal/handler/http/health_handler.go - Auth rules → User repository: reads and writes users
backend/internal/service/auth_service.go - User repository → PostgreSQL: queries account data
backend/internal/repository/user_repository.go - Health check → PostgreSQL: pings database
backend/internal/service/health_service.go - Analytics endpoint → Analytics query: requests overview
- Analytics query → Plausible: queries metrics
backend/internal/service/analytics_service.go - Auth rules → Email delivery: sends verification and reset mail
backend/internal/service/auth_service.go - Database setup → PostgreSQL: opens pool
- Schema migrations → PostgreSQL: updates schema
- Demo account seed → PostgreSQL: seeds demo account
backend/internal/repository/demo_seed.go - Auth endpoints → Domain models: decodes auth inputs
backend/internal/handler/http/auth_handler.go - Analytics query → Domain models: returns overview
backend/internal/service/analytics_service.go