How atomreforge/daizy-night-server works
Daizy Night is an HTTP account and authentication backend. Its main workflow is registration with a signed, one-use registercode, credential login and token issuance, then authenticated profile/calendar access and refresh or revocation of tokens. The graph includes the documented authorization, rate-limiting, health-check, and reserved OAuth capabilities. Wiring is based on the sampled server assembly and router; service details and several feature implementations were not sampled, so uncertain calls are omitted.
Main entry points: service Business services · main.go Server assembly · db.go Database provider · router.go Echo routes
Components 16
HTTP access
- Server assembly
cmd/main.go - Echo routes
internal/router/router.go - HTTP handlers
internal/handler
Identity workflows
- Business services
internal/service - Domain models
internal/model - GitHub OAuth (reserved)
internal/consts/register_way.go
Security
- Auth and limits
internal/middleware - Token and code crypto
internal/crypto - Configuration
internal/config
Persistence
- Database provider
internal/dbware/db.go - User repository
internal/dbware/repo_user.go - Token repository
internal/dbware/repo_token.go - Registercode repository
internal/dbware/repo_registercode.go - Calendar repository
internal/dbware/repo_calendar.go
Other components
- API client
- SQLite database
Connections 21
- API client → Echo routes: sends requests
- Echo routes → Auth and limits: applies middleware
- Echo routes → HTTP handlers: dispatches routes
- HTTP handlers → Business services: calls services
- Business services → User repository: user operations
- Business services → Token repository: token operations
- Business services → Registercode repository: code operations
- Business services → Calendar repository: calendar operations
- Business services → Token and code crypto: signs and verifies
- Auth and limits → Token and code crypto: verifies access tokens
- User repository → Database provider: queries
- Token repository → Database provider: queries and updates
- Registercode repository → Database provider: claims records
- Calendar repository → Database provider: queries and updates
- Database provider → SQLite database: persists data
- Server assembly → Configuration: loads settings
- Server assembly → Token and code crypto: initializes provider
- Server assembly → Database provider: initializes provider
- Server assembly → Business services: assembles services
- Server assembly → HTTP handlers: assembles handlers
- Server assembly → Echo routes: creates router