How zanelittle/swoleexperiencereact works
Magni is an Expo weight tracker and workout planner; Modi is its developing Go authentication API. The principal shown workflow is login/register from the home screen, through auth state and local token storage, to Modi’s auth endpoints. Weight and workout capabilities are represented from the README and source tree, but several screen-to-service links are not shown in the excerpts, so those relationships are omitted. Macro tracking and future nutrition scanning are documented plans, not established runtime features.
Main entry points: main.go HTTP API · index.tsx Home screen · AuthContext.tsx Auth state · auth.go Auth handlers
Components 29
Magni application
- Home screen
magni/app/index.tsx - Settings
magni/app/settings.tsx
Authentication
- Auth state
magni/contexts/AuthContext.tsx - Login modal
magni/components/auth/LoginModal.tsx - Register modal
magni/components/auth/RegisterModal.tsx - Auth client
magni/lib/services/AuthService.ts - Token storage
magni/lib/utils/tokenStorage.ts
Weight tracking
- Weight screen
magni/app/weight.tsx - Weight entry
magni/components/weight/WeightEntryForm.tsx - Weight history
magni/components/weight/WeightHistory.tsx - Weight chart
magni/components/weight/WeightChart.tsx - Weight service
magni/lib/services/WeightService.ts - Average service
magni/lib/services/AverageService.ts - Daily statistics
magni/hooks/useDailyStats.ts
Workout planning
- Workout screen
magni/components/workouts/WorkoutsScreen.tsx - Workout editor
magni/components/workouts/WorkoutCreateUpdateForm.tsx - Workout data hook
magni/hooks/useWorkoutData.ts - Completion hook
magni/hooks/useWorkoutCompletion.ts - Workout service
magni/lib/services/WorkoutService.ts - History service
magni/lib/services/WorkoutHistoryService.ts - Workout library
magni/lib/services/WorkoutBankService.ts - Workout import
magni/lib/services/WorkoutImportService.ts - Workout export
magni/lib/services/WorkoutExportService.ts
Modi API
- HTTP API
modi/cmd/api/main.go - Auth handlers
modi/internal/handlers/auth.go - Auth service
modi/internal/services/auth.go - User repository
modi/internal/repositories/user.go - Food data models
modi/internal/models/food.go
Other components
- User
Connections 22
- User → Home screen: opens
magni/app/index.tsx - Home screen → Auth state: reads auth state
magni/app/index.tsx - Home screen → Login modal: opens
magni/app/index.tsx - Home screen → Register modal: opens
magni/app/index.tsx - Auth state → Auth client: requests auth
magni/contexts/AuthContext.tsx - Auth state → Token storage: stores tokens
magni/contexts/AuthContext.tsx - Auth client → HTTP API: HTTP requests
magni/lib/services/AuthService.ts - HTTP API → Auth handlers: routes auth
modi/cmd/api/main.go - HTTP API → User repository: constructs repository
modi/cmd/api/main.go - HTTP API → Auth service: constructs service
modi/cmd/api/main.go - HTTP API → Auth handlers: protects account route
modi/cmd/api/main.go - Auth handlers → Auth service: delegates auth
modi/internal/handlers/auth.go - Auth service → User repository: uses repository
modi/internal/services/auth.go - User → Weight screen: tracks weight
README.md - User → Workout screen: plans workouts
README.md - Workout data hook → Workout service: loads workouts
magni/hooks/useWorkoutData.ts - Workout data hook → History service: loads history
magni/hooks/useWorkoutData.ts - Completion hook → Workout service: updates workouts
magni/hooks/useWorkoutCompletion.ts - Completion hook → History service: records completion
magni/hooks/useWorkoutCompletion.ts - Workout editor → Workout service: saves workout
magni/components/workouts/WorkoutCreateUpdateForm.tsx - Daily statistics → Average service
- Weight service → Average service