How augaish/calapp works
CalApp is a bilingual Arabic/English calorie and gym-coaching app. Its main workflow is onboarding and target calculation, followed by meal or equipment scanning, user review/editing, and logging; local-first profile, meal, and workout data persist on-device. The README documents demo-mode scans and an optional AI backend, while the sampled server entry point shows provider selection and WHOOP authorization. Several capabilities are represented from the README and source index; unsampled implementation details and their internal links are intentionally not inferred.
Main entry points: index.ts HTTP API and routing · store.ts App state · index.tsx Daily dashboard · scan.tsx Meal scan and review
Components 24
App experience
- Onboarding
src/app/onboarding.tsx - Daily dashboard
src/app/(tabs)/index.tsx - Meal scan and review
src/app/scan.tsx - Food and recipes
src/app/(tabs)/food.tsx - Gym equipment scan
src/app/photo-analyze.tsx - Workout session
src/app/session.tsx - Programs and schedules
src/app/program.tsx - Progress review
src/app/review.tsx
Domain and state
- API client
src/lib/api.ts - Nutrition calculations
src/lib/recipes.ts - TDEE targets
src/lib/tdee.ts - Exercise catalog
src/lib/exercises.ts - App state
src/lib/store.ts - Device storage
Backend services
- HTTP API and routing
server/src/index.ts - AI analysis
server/src/parse.ts - Access and quotas
server/src/billing.ts - WHOOP integration
server/src/whoop.ts - Backend data services
server/src/db.ts
Shared presentation
- Shared UI components
src/components - Theme tokens
src/constants/theme.ts - Arabic and English
src/lib/i18n.ts
Other components
- User
- Anthropic AI
Connections 28
- User → Onboarding: sets up profile
README.md - Onboarding → TDEE targets: computes targets
README.md - User → Meal scan and review: scans meal
README.md - Meal scan and review → API client: requests analysis
README.md - API client → HTTP API and routing: sends API request
README.md - HTTP API and routing → AI analysis: routes analysis
server/src/index.ts - AI analysis → Anthropic AI: requests AI analysis
README.md - Meal scan and review → Nutrition calculations: edits and logs
README.md - User → Gym equipment scan: scans equipment
README.md - Gym equipment scan → API client: requests analysis
README.md - User → Daily dashboard: views daily plan
README.md - Daily dashboard → App state: reads daily data
src/app/(tabs)/index.tsx - User → Food and recipes: manages food
README.md - Food and recipes → Nutrition calculations: uses recipe math
src/lib/recipes.ts - User → Workout session: logs training
README.md - Workout session → App state: updates workout data
src/app/session.tsx - Workout session → Exercise catalog: uses exercise data
src/app/session.tsx - User → Programs and schedules: manages program
src/app/program.tsx - Programs and schedules → App state: uses saved state
src/app/program.tsx - User → Progress review: reviews progress
src/app/review.tsx - Progress review → App state: reads logged activity
src/app/review.tsx - App state → Device storage: persists state
src/lib/store.ts - HTTP API and routing → Access and quotas: checks access
server/src/index.ts - HTTP API and routing → WHOOP integration: uses wearable data
server/src/index.ts - HTTP API and routing → Backend data services: uses data services
server/src/index.ts - Daily dashboard → Shared UI components: renders shared UI
src/app/(tabs)/index.tsx - Shared UI components → Theme tokens: uses theme tokens
src/components/system.tsx - Shared UI components → Arabic and English: localizes icons and text
src/components/icon.tsx