Overview
RepBook is a full-stack iOS fitness assistant engineered with a robust three-tier architecture. It
combines a native SwiftUI frontend, a Node.js application layer, and a normalized PostgreSQL database to
deliver personalized workout plans via a semantic recommendation engine.
Key Features
-
Three-Tier Architecture: Strict separation of concerns between the Swift
frontend, Node.js backend, and PostgreSQL database.
-
RESTful API: A comprehensive suite of over 15 documented endpoints managing
authentication, data retrieval, and state updates.
-
Semantic Recommendation Engine: An intelligent system that analyzes workout
history to generate context-aware training plans.
Implementation Details
System Architecture
The application follows a clean three-tier design pattern to ensure scalability and maintainability:
- Presentation Tier (iOS): Built with Swift and SwiftUI using the MVVM pattern for
reactive UI updates and clear logic separation.
- Application Tier (Node.js): An Express-based REST API handling business logic,
authentication, and request routing.
- Data Tier (PostgreSQL): A highly normalized (3NF) relational database optimized for
complex queries and data integrity.
API Design
The backend exposes a RESTful interface documented with Swagger/OpenAPI. Key functional areas include:
- Authentication: Secure user registration and login flows (
/signup,
/login).
- Workout Management: Endpoints for creating, logging, and retrieving workout
sessions (
/workouts, /loggedWorkouts).
- Data Retrieval: Efficient querying of exercises and user metrics
(
/exercises, /userDataAndMetrics).
Recommendation Engine
The core innovation of RepBook is its semantic analysis engine, which personalizes the user experience:
- Pattern Recognition: Analyzes historical training data to identify user preferences
and progression.
- Contextual Generation: Suggests exercises and routines based on recovery status,
goals, and available equipment.
Technology Stack
- Mobile Frontend: Swift, Objective-C, SwiftUI
- Backend: Node.js, Express
- Database: PostgreSQL with rigorous normalization and indexing
- API: RESTful endpoints with Swagger documentation
- Architecture: Three-tier (Presentation, Application, Data)
- Development Tools: Xcode, Visual Studio Code