This project is a comprehensive application designed to track gym progress, manage workout programs, and handle various fitness-related data. It integrates with Crux to provide robust and scalable functionalities. The project is divided into multiple components, each handling specific aspects of the application's requirements.
The database directory contains SQL scripts for initializing, seeding, and managing the database schema. It also includes query files categorized under various functionalities such as exercises, progress tracking, users, workout programs, and workout tracking.
Queries
: Contains SQL scripts for various database operations.Schema
: Defines the structure of the database tables and their relationships.Seeds
: Initial data to populate the database tables.
The server directory hosts the backend server written in Rust, utilizing Actix-web for handling HTTP requests and Diesel for database interactions.
src
: Contains the source code for the server including handlers, models, and database access modules.Cargo.toml
: Configuration file for Rust dependencies.
The shared directory includes common logic and utilities shared across the project, particularly the Rust code generated by Crux for seamless integration between different modules.
src
: Contains the core application logic and capabilities.build.rs
: Build script for generating necessary bindings and configurations.
The shared_types directory holds the code generated by Crux for cross-platform data structures, ensuring type safety and consistency across different parts of the application.
generated: Contains generated code for various platforms (Java, Swift, TypeScript).
The web directory includes the frontend part of the application built with Yew, a Rust framework for creating web applications with WebAssembly.
src: Contains the source code for the web application including the core logic, HTTP handlers, and pages. index.html: Entry point for the web application.
Crux is used to manage the application's state and ensure seamless communication between the frontend and backend. It helps in maintaining a single source of truth and provides a robust framework for handling complex state management.
The application allows users to create and manage workout programs, log their progress, and track various fitness metrics. It supports various workout types and provides detailed reports on user performance.
Users can register, authenticate, and manage their profiles. The application ensures secure handling of user data and provides personalized experiences based on user preferences and past activities.
Built with Yew, the web application offers a responsive and interactive user interface, providing a seamless user experience across different devices.
Clone the Repository:
git clone gh repo clone rsstdd/gym-tracker
cd gym-tracker
Navigate to the database directory and execute the SQL scripts to initialize and seed the database.
cd server
cargo build
cargo run
cd web
trunk build
trunk serve --open --port 3001
Special thanks to the Crux framework developers for providing a robust foundation for building cross-platform applications.
For more information on Crux, visit the official Crux documentation.