BAKI — AI Sports Motion Detection App
Overview
BAKI (Sport Motion Detector Based on ML Kit in Mobile App) is a university Telematics project: an Android app that detects and scores a user’s exercise form in real time using ML Kit Pose Landmark. Beyond the mobile and machine-learning sides, the app needed a backend and a cloud infrastructure to run on — that’s the part I worked on.
Role & Responsibilities
As Backend & Cloud Infrastructure Engineer, my focus was on four things: database schema design, service architecture, deploying the system on AWS, and the API contract consumed by the mobile team.
Backend Architecture
The system runs as a set of containerized microservices on Amazon ECS, spread across multiple Availability Zones for resilience:
- User Service API — authentication, profiles, and sessions.
- Exercise Service API — workouts, progress, and history.
- AI Model Service API — recommendations, analysis, and model inference requests.
Traffic comes in through Amazon Route 53 for DNS and an AWS Application Load Balancer, which sits in the public subnet and forwards authenticated (JWT) requests into the ECS cluster running in private subnets. The User and Exercise services talk to the AI Model service asynchronously through a RabbitMQ / AWS SQS queue, so a slow inference call never blocks a regular API request.
Each service owns its own database — three separate PostgreSQL instances on Amazon RDS (User, Exercise, and AI) — while all services share a common Amazon ElastiCache for Redis layer for low-latency caching. Model inference itself runs on a dedicated Amazon SageMaker cluster, with trained model artifacts and documents stored in Amazon S3.
Around the core system sits the operational layer: Amazon CloudWatch for logs and metrics, AWS CloudTrail for audit logs, AWS Secrets Manager for credentials and configuration, and Amazon ECR for container images used by the ECS services.
Outcome
The result is a system that decouples the heavy parts from the fast parts: regular API traffic (auth, workout plans, session logging) stays fast behind the load balancer and Redis cache, while AI inference runs independently on SageMaker, fed through a message queue instead of a direct synchronous call. Each service scales, deploys, and fails independently across Availability Zones, with centralized logging, auditing, and secrets management — turning a course project into something closer to a production-grade, cloud-native deployment.