A cross-platform mobile fitness application with client-server architecture for tracking daily calorie intake, weight, and body measurements with AI-powered feedback, notifications, and subscription monetization.
project-root/
├── backend/ # Backend services
│ ├── auth-service/ # Authentication & Authorization
│ ├── calorie-service/ # Meal logging & FatSecret integration
│ ├── measurement-service/ # Weight & body measurements
│ ├── chat-service/ # OpenAI chat analysis
│ ├── subscription-service/ # Monetization & billing
│ ├── notification-dispatcher/ # Firebase notifications
│ ├── common-lib/ # Shared backend utilities
│ ├── docker-compose.yml # Compose orchestration
│ └── build.gradle.kts
├── mobile/ # Mobile applications
│ ├── shared/ # Kotlin Multiplatform shared code
│ ├── androidApp/ # Android-specific UI & integration
│ ├── iosApp/ # iOS-specific UI & integration
│ └── features/ # Feature modules for UI & use-cases
├── infrastructure/ # Deployment & infrastructure
├── scripts/ # Utility scripts
└── README.md
- Backend: Ktor server in Kotlin, exposes REST and WebSocket endpoints
- Client: Kotlin Multiplatform (Android & iOS) using Ktor HTTP client
- Deployment: Dockerized services; Docker Compose
- Push Notifications: Firebase Cloud Messaging
- AI Integration: OpenAI REST API
- Nutrition API: FatSecret REST API
- Database: PostgreSQL
- Logging & Monitoring: Prometheus + Grafana
- CI/CD: GitHub Actions for build, tests, and Docker image publishing
- JDK 17+
- Docker and Docker Compose
- Android Studio or IntelliJ IDEA
-
Navigate to the backend directory:
cd backend -
Start all backend services using Docker Compose:
docker-compose up -d
-
Or run a specific service locally for development:
./gradlew :backend:auth-service:run
POST /auth/signup/email- Sign up with email/passwordPOST /auth/login/email- Login with email/passwordPOST /auth/oauth/google- Login with GooglePOST /auth/oauth/apple- Login with Apple
GET /user/profile- Get user profilePUT /user/profile- Update user profile
GET /meals?date=YYYY-MM-DD- Get meals for a specific datePOST /meals- Log a mealPUT /meals/{id}- Update a mealDELETE /meals/{id}- Delete a meal
GET /weights?from=DATE&to=DATE- Get weight entries in a date rangePOST /weights- Log weightGET /measurements?week=YYYY-WW- Get measurements for a specific weekPOST /measurements- Log measurements
WS /chat/ws- WebSocket for AI chatPOST /chat/message- Send a message to AI
GET /subscriptions- Get user subscription infoPOST /subscriptions- Purchase a subscriptionDELETE /subscriptions/{id}- Cancel a subscription
- Create a new directory under
backend/ - Add the service to
settings.gradle.kts - Use the common library for shared utilities
- Add the service to
docker-compose.yml
Run all tests with:
./gradlew testThis project is licensed under the MIT License - see the LICENSE file for details.