How kupr666/orange_team works
SoloLeveling is a fitness and habit-tracking product with a Go HTTP API, PostgreSQL persistence, and a separate React frontend. Users register or log in, then manage profile data, habits, workouts and exercises, and view daily, weekly, or monthly leaderboards. The API bootstraps feature services and handlers, routes requests through shared HTTP infrastructure, and runs a leaderboard snapshot worker. The README documents the frontend-to-API workflow; unsampled feature internals are represented by their existing directories, so their detailed call paths are not inferred.
Main entry points: main.go Application bootstrap · App.tsx React application · client.ts API client · snapshot_worker.go Snapshot worker
Components 21
API platform
- Application bootstrap
cmd/app/main.go - HTTP server and routing
internal/core/transport/http/server - JWT and auth middleware
internal/core/auth/jwt
Product features
- Registration and login
internal/features/authentication - User profiles
internal/features/users - Habit tracking
internal/features/habits - Exercise catalog
internal/features/exercises - Workout management
internal/features/workouts - Workout exercises and scoring
internal/features/workout_exercises - Leaderboard queries
internal/features/leaderboard - Snapshot worker
internal/features/leaderboard/worker/snapshot_worker.go - Web page delivery
internal/features/web
Web client
- React application
frontend/src/App.tsx - API client
frontend/src/api/client.ts - Habits page
frontend/src/features/habits/HabitsPage.tsx - Workouts page
frontend/src/features/workouts/WorkoutsPage.tsx - Profile page
frontend/src/features/profile/ProfilePage.tsx - Demo data
frontend/src/demo.ts
Persistence and domain
- PostgreSQL pool
internal/core/repository/postgres/pool/pgx/pool.go - Shared domain models
internal/core/domain/workout.go
Other components
- Browser user
Connections 23
- Browser user → React application: uses
- React application → API client: calls
frontend/src/App.tsx - React application → Habits page: renders
frontend/src/App.tsx - React application → Workouts page: renders
frontend/src/App.tsx - React application → Profile page: renders
frontend/src/App.tsx - Habits page → API client: calls
frontend/src/features/habits/HabitsPage.tsx - Workouts page → API client: calls
frontend/src/features/workouts/WorkoutsPage.tsx - Profile page → API client: calls
frontend/src/features/profile/ProfilePage.tsx - API client → HTTP server and routing: HTTP requests
- Application bootstrap → PostgreSQL pool: creates pool
cmd/app/main.go - Application bootstrap → Registration and login: wires feature
cmd/app/main.go - Application bootstrap → User profiles: wires feature
cmd/app/main.go - Application bootstrap → Habit tracking: wires feature
cmd/app/main.go - Application bootstrap → Exercise catalog: wires feature
cmd/app/main.go - Application bootstrap → Workout management: wires feature
cmd/app/main.go - Application bootstrap → Workout exercises and scoring: wires feature
cmd/app/main.go - Application bootstrap → Leaderboard queries: wires feature
cmd/app/main.go - Application bootstrap → Web page delivery: wires feature
cmd/app/main.go - Application bootstrap → HTTP server and routing: registers routes
cmd/app/main.go - Application bootstrap → Snapshot worker: starts worker
cmd/app/main.go - Application bootstrap → JWT and auth middleware: configures auth
cmd/app/main.go - Application bootstrap → Shared domain models: uses models
cmd/app/main.go - Snapshot worker → Leaderboard queries: runs snapshots