FitBite Pal is a mobile fitness and diet management application built with React Native and Spring Boot. It supports user onboarding, workout and meal planning, check-in records, progress tracking, bilingual content, and a lightweight web-based admin interface.
The repository is organized as a full-stack project:
FitBitePal-Mobile: React Native / Expo mobile clientFitBitePal-Backend: Spring Boot REST API and admin pagedocker-compose.yml: local MySQL, Redis, and backend runtime
- User registration, login, password reset, and JWT-based authentication
- Profile setup for age, gender, height, weight, activity level, goal, and available training time
- Workout plan generation, exercise details, training records, and completion tracking
- Diet plan management, food records, calorie estimation, and meal set support
- Progress views for weight, calories, check-ins, and training history
- Pose session recording and feedback endpoints
- Admin management for users, foods, meal sets, user stats, and system configuration
- Chinese and English interface text
- React Native with Expo SDK 54
- React Navigation
- React Context for application state
i18n-jsandexpo-localization- Expo camera and image picker modules
- Java 17+
- Spring Boot 3.2
- Spring Security with JWT
- Spring Data JPA / Hibernate
- MySQL 8.0
- Redis
- Docker support
- SMTP email service for verification and password reset
- Optional Ark API integration for food recognition
.
├── FitBitePal-Backend/
│ ├── src/main/java/com/fitbitepal/backend/
│ │ ├── config/
│ │ ├── controller/
│ │ ├── dto/
│ │ ├── exception/
│ │ ├── model/
│ │ ├── repository/
│ │ ├── scheduler/
│ │ ├── security/
│ │ └── service/
│ ├── src/main/resources/
│ │ ├── db/migration/
│ │ ├── static/admin/
│ │ ├── application.yml
│ │ ├── application-dev.yml
│ │ ├── application-prod.yml
│ │ └── application-test.yml
│ ├── Dockerfile
│ └── pom.xml
├── FitBitePal-Mobile/
│ ├── src/
│ │ ├── api/
│ │ ├── components/
│ │ ├── contexts/
│ │ ├── hooks/
│ │ ├── navigation/
│ │ ├── screens/
│ │ └── utils/
│ ├── assets/
│ ├── i18n/
│ ├── services/
│ ├── app.json
│ └── package.json
├── API_DOCUMENTATION.md
├── DOCKER_DEPLOYMENT.md
├── TEST_REPORT.md
├── USER_MANUAL.md
├── docker-compose.yml
└── env.docker.example
- Node.js 18+
- Java 17+
- Maven
- MySQL 8.0+
- Redis 6+
- Docker and Docker Compose, optional but recommended for local services
From the repository root:
docker compose up -d mysql redis backendThe backend will be available at:
- API base URL:
http://localhost:8080/api - Admin page:
http://localhost:8080/api/admin/ - Health check:
http://localhost:8080/api/actuator/health
Start MySQL and Redis first, then configure the backend connection values in FitBitePal-Backend/src/main/resources/application.yml or through environment variables.
cd FitBitePal-Backend
mvn spring-boot:runDefault backend settings:
| Setting | Default |
|---|---|
| Server port | 8080 |
| Context path | /api |
| MySQL database | fitbitepal |
| Redis host | localhost |
cd FitBitePal-Mobile
npm install
cp env.example .env
npx expo startSet the mobile API URL in .env:
EXPO_PUBLIC_API_URL=http://localhost:8080/api
When testing on a physical device, replace localhost with the LAN IP address of the machine running the backend.
Common backend values can be configured through Spring environment variables:
| Variable | Purpose |
|---|---|
SPRING_DATASOURCE_URL |
MySQL JDBC URL |
SPRING_DATASOURCE_USERNAME |
Database username |
SPRING_DATASOURCE_PASSWORD |
Database password |
SPRING_DATA_REDIS_HOST |
Redis host |
SPRING_DATA_REDIS_PORT |
Redis port |
JWT_SECRET |
JWT signing secret |
JWT_EXPIRATION |
Token lifetime in milliseconds |
MAIL_HOST |
SMTP host |
MAIL_PORT |
SMTP port |
MAIL_USERNAME |
SMTP username |
MAIL_PASSWORD |
SMTP password or app password |
ARK_API_KEY |
Optional Ark API key |
ARK_ENABLED |
Enable or disable Ark-backed features |
For Docker-based deployment, copy env.docker.example to .env and adjust the values before starting the services.
| Variable | Purpose |
|---|---|
EXPO_PUBLIC_API_URL |
Backend API base URL |
See API_DOCUMENTATION.md for endpoint details.
Main endpoint groups:
POST /api/auth/*/api/users/*/api/exercises/*/api/plans/*/api/records/*/api/data/*/api/pose/*/api/admin/*
| Document | Description |
|---|---|
| USER_MANUAL.md | User guide for the mobile app and admin interface |
| API_DOCUMENTATION.md | REST API reference |
| DOCKER_DEPLOYMENT.md | Docker deployment guide |
| TEST_REPORT.md | Test cases and results |
| SRS.md | Software requirements specification |
cd FitBitePal-Backend
mvn clean packagecd FitBitePal-Mobile
npx eas build -p android --profile previewcd FitBitePal-Mobile
npx eas build -p ios --profile preview- Do not commit real
.envfiles, database credentials, SMTP passwords, JWT secrets, or API keys. - Use strong
JWT_SECRETvalues outside local development. - Keep production database and Redis services private to the deployment network.
- Review CORS settings before production deployment.
This project is for coursework and learning purposes.