Skip to content

nicoryne/stathis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Stathis

Stathis is an AI-powered physical education platform designed to revolutionize learning through motion recognition, real-time health vitals tracking, and gamification. The platform consists of three main components: a mobile app for students, a web dashboard for teachers, and a backend API server.

๐Ÿ“‚ Repository Contents Overview

This repository contains the source code, documentation, and necessary resources for Stathis. The key directories and files include:

  • /backend - Spring Boot Java backend API server with PostgreSQL database.
  • /mobile - Android Kotlin mobile application for students.
  • /web - Next.js web dashboard for teachers and administrators.
  • README.md - Project overview and setup instructions.

๐Ÿ‘ฅ Members

Full Name GitHub Profile
Leones, Michael Harry P. Saiiph
Matunog, Margaret Anne C. marginggg
Porter, Nicolo Ryne A. nicoryne
Quijote, John Kenny C. mnemosyneiscool
San Diego, Gabe Jeremy R. gabejeremy

๐Ÿš€ Features

Mobile App (Students)

  • ๐Ÿค– AI-Powered Posture Tracking โ€“ Real-time posture monitoring and correction using ONNX models
  • โŒš Health Connect Integration โ€“ Syncs with Android Health Connect for continuous vitals tracking
  • ๐Ÿ“ฑ Camera-Based Motion Detection โ€“ Uses CameraX and ML Kit for pose detection during exercises
  • ๐ŸŽฎ Gamified Learning โ€“ Interactive challenges, achievements, and progress tracking
  • ๐Ÿ“Š Real-time Vitals Monitoring โ€“ Heart rate and oxygen saturation tracking during exercises
  • ๐Ÿซ Classroom Management โ€“ Join classrooms, view assignments, and track progress
  • ๐Ÿ” Biometric Authentication โ€“ Secure login using fingerprint/face recognition

Web Dashboard (Teachers)

  • ๐Ÿ‘ฅ Classroom Management โ€“ Create and manage multiple classrooms with student enrollment
  • ๐Ÿ“ˆ Real-time Monitoring โ€“ Live vitals tracking of students during exercise sessions
  • ๐Ÿ“‹ Task & Template Creation โ€“ Create exercises, lessons, and quizzes with customizable templates
  • ๐Ÿ“Š Analytics & Reporting โ€“ Comprehensive student progress analytics and performance reports
  • ๐ŸŽฏ Student Progress Tracking โ€“ Individual and class-wide progress monitoring
  • ๐Ÿ”” Alert System โ€“ Health alerts and notifications for student safety

Backend API

  • ๐Ÿ” JWT Authentication โ€“ Secure user authentication and authorization
  • ๐Ÿ“ก WebSocket Support โ€“ Real-time communication for vitals streaming
  • ๐Ÿค– AI Model Integration โ€“ ONNX runtime for posture analysis
  • ๐Ÿ“ง Email Services โ€“ User verification and notification system
  • ๐Ÿ—„๏ธ PostgreSQL Database โ€“ Robust data storage and management
  • ๐Ÿ“š RESTful APIs โ€“ Comprehensive API endpoints for all platform features

๐Ÿ—๏ธ Architecture Overview

Stathis follows a three-tier architecture pattern:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Mobile App    โ”‚    โ”‚   Web Dashboard โ”‚    โ”‚  Backend API    โ”‚
โ”‚   (Students)    โ”‚    โ”‚   (Teachers)    โ”‚    โ”‚   (Spring Boot) โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข Android/Kotlinโ”‚    โ”‚ โ€ข Next.js/React โ”‚    โ”‚ โ€ข Java/Spring   โ”‚
โ”‚ โ€ข Jetpack Composeโ”‚    โ”‚ โ€ข TypeScript    โ”‚    โ”‚ โ€ข PostgreSQL    โ”‚
โ”‚ โ€ข CameraX/ML Kitโ”‚    โ”‚ โ€ข Tailwind CSS  โ”‚    โ”‚ โ€ข JWT Auth      โ”‚
โ”‚ โ€ข Health Connectโ”‚    โ”‚ โ€ข ShadCN/UI     โ”‚    โ”‚ โ€ข WebSocket     โ”‚
โ”‚ โ€ข Biometric Authโ”‚    โ”‚ โ€ข TanStack Queryโ”‚    โ”‚ โ€ข ONNX Runtime  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                       โ”‚                       โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   PostgreSQL    โ”‚
                    โ”‚    Database     โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Technologies

  • Frontend (Web): Next.js 15, React 19, TypeScript, Tailwind CSS, ShadCN/UI
  • Mobile: Android (Kotlin), Jetpack Compose, CameraX, ML Kit, Health Connect
  • Backend: Spring Boot 3.4, Java 17, PostgreSQL, JWT, WebSocket
  • AI/ML: ONNX Runtime, Pose Detection Models
  • Authentication: JWT with Spring Security
  • Real-time Communication: WebSocket for vitals streaming

๐ŸŒ Branching

We follow the Gitflow workflow:

  • main - Stable production-ready branch.
  • dev - Latest development updates.
  • feature/{feature-name} - Feature branches for new functionalities.
  • hotfix/{issue-name} - Quick fixes for critical bugs.
  • bugfix/{issue-name} - Bug fixes and minor patches.

๐Ÿ› ๏ธ Installation Guide

Prerequisites:

  • Node.js 18+ & npm installed
  • Java 17+ and Maven 3.6+
  • PostgreSQL 13+ database
  • Git for version control
  • Android Studio (for mobile development)
  • Android SDK API 30+ (for mobile development)

Steps

  1. Clone the repository:

    git clone https://github.com/nicoryne/stathis.git
    cd stathis
  2. Backend Setup:

    cd backend/stathis
    mvn clean install
    • Configure database connection in src/main/resources/application.properties
    • Update PostgreSQL connection details
    • Run the application: mvn spring-boot:run
  3. Web Dashboard Setup:

    cd web/stathis-web
    npm install
    • Copy environment variables: cp .env.example .env
    • Update the .env file with backend API URL and other credentials
    • Run the development server: npm run dev
    • Open http://localhost:3000 in your browser
  4. Mobile App Setup:

    cd mobile/stathis-mobile
    • Open the project in Android Studio
    • Configure the backend API URL in the app's configuration
    • Build and run on an Android device or emulator

Environment Configuration

Each component requires specific environment variables:

  • Backend: Database connection, JWT secrets, email configuration
  • Web: Backend API URL, authentication settings
  • Mobile: Backend API URL, Health Connect permissions

โš™๏ธ Development Configurations

Backend (Spring Boot)

  • Framework: Spring Boot 3.4.5 with Java 17
  • Database: PostgreSQL with JPA/Hibernate
  • Security: Spring Security with JWT authentication
  • Real-time: WebSocket for vitals streaming
  • AI/ML: ONNX Runtime for posture analysis
  • Documentation: SpringDoc OpenAPI 3
  • Build Tool: Maven

Web Dashboard (Next.js)

  • Framework: Next.js 15 with React 19
  • Language: TypeScript
  • Styling: Tailwind CSS 4 with ShadCN/UI components
  • State Management: TanStack Query for server state
  • Forms: React Hook Form with Zod validation
  • Charts: Recharts for data visualization
  • Build Tool: npm

Mobile App (Android)

  • Language: Kotlin with Jetpack Compose
  • Architecture: MVVM with Dagger Hilt dependency injection
  • UI: Material 3 Design with Jetpack Compose
  • Camera: CameraX for pose detection
  • ML: ML Kit for pose detection and analysis
  • Health: Android Health Connect for vitals data
  • Networking: Retrofit with OkHttp
  • Build Tool: Gradle with Kotlin DSL

๐Ÿ“š API Documentation

The backend provides comprehensive RESTful APIs and WebSocket endpoints:

REST APIs

  • Authentication: User registration, login, password reset
  • User Management: Profile management, user roles
  • Classroom Management: Create, join, and manage classrooms
  • Task Management: Create and manage exercises, lessons, and quizzes
  • Progress Tracking: Student progress and analytics
  • Vitals Monitoring: Health data collection and analysis
  • Posture Analysis: AI-powered posture detection and feedback

WebSocket Endpoints

  • Real-time Vitals: Live health data streaming from mobile to web dashboard
  • Exercise Monitoring: Real-time exercise session tracking

API Documentation

  • Swagger UI: Available at http://localhost:8080/swagger-ui.html when backend is running
  • OpenAPI 3: Complete API specification in JSON/YAML format

๐Ÿ Contributing

We welcome contributions! Please give us a message if you'd like to contribute!

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature-name
  3. Make your changes and test thoroughly
  4. Commit your changes: git commit -m 'Add your feature'
  5. Push to your branch: git push origin feature/your-feature-name
  6. Create a Pull Request

Code Standards

  • Follow the existing code style and conventions
  • Write comprehensive tests for new features
  • Update documentation as needed
  • Ensure all components work together properly

About

AI-Powered Posture and Vitals Monitoring for Safe Physical Education

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5