Skip to content

alejandro-albiol/AthenAI

Repository files navigation

AthenAI

Multi-tenant gym management platform with AI-powered workout generation

Go Version License

🚀 Quick Start

# Clone the repository
git clone https://github.com/alejandro-albiol/athenai.git
cd athenai

# Setup environment
cp example.env .env
# Edit .env with your database configuration

# Install dependencies and start development server
go mod tidy
air  # or: go run ./cmd/main.go

Access the application:

🏗️ What is AthenAI?

AthenAI is a comprehensive gym management platform featuring:

  • 🏢 Multi-Tenant Architecture: Complete data isolation per gym
  • 🤖 AI Workout Generation: Smart workout creation based on user goals
  • 👥 User Management: Role-based access for admins, trainers, and members
  • 💪 Exercise Library: Extensive catalog with custom gym additions
  • 📊 Workout Tracking: Complete workout history and progress monitoring
  • 🔐 Secure Authentication: JWT-based auth with tenant isolation

� Prerequisites

  • Go: 1.19 or higher
  • PostgreSQL: Database for multi-tenant data storage
  • Air (optional): For live reload development
# Install Air for live reload
go install github.com/air-verse/air@latest

⚡ Development Workflow

Environment Setup

# Database setup
go run ./cmd/setup-db/main.go

# Create superadmin (platform administrator)
go run ./cmd/setup-superadmin/main.go

Development Commands

# Development with live reload
air

# Production build
go build -o bin/athenai ./cmd

# Run tests
go test ./...

# Test with coverage
go test -cover ./...

Project Structure

├── internal/           # Business modules (auth, gym, user, exercises, etc.)
├── api/               # API setup and routing
├── cmd/               # Application entry points and utilities
├── frontend/          # Static web files (HTML, CSS, JS)
├── docs/              # 📚 Comprehensive documentation
├── pkg/               # Shared utilities and middleware
└── config/            # Configuration management

🏛️ Architecture Overview

┌─────────────────────────────────────────┐
│             AthenAI Platform            │
├─────────────────────────────────────────┤
│  Platform Layer (public schema)        │
│  • System Administration               │
│  • Global Exercise Library             │
│  • Shared Templates & Equipment        │
├─────────────────────────────────────────┤
│  Tenant Layer ({gym_uuid} schemas)     │
│  • Gym-specific Users & Data           │
│  • Custom Exercises & Equipment        │
│  • Workout Instances & Tracking        │
└─────────────────────────────────────────┘

Key Features:

  • 🔐 Schema-level tenant isolation for complete data security
  • 🎯 Role-based access control (Platform Admin, Gym Admin, Trainer, Member)
  • 🔄 Modular architecture following consistent Go patterns
  • 📊 PostgreSQL multi-tenancy with shared and isolated data

📖 Documentation

Complete documentation available in /docs

Topic Description
📚 Documentation Hub Complete guide and navigation
🏗️ Backend Architecture Modules, patterns, and system design
🗄️ Database Design Schema, relationships, and multi-tenancy
🔐 Security Model Authentication, authorization, and tenant isolation
⚙️ Module Pattern Standard patterns for creating new modules
🔧 Configuration Environment setup and deployment
📡 API Reference Complete OpenAPI specification

🧪 Testing

# Run all tests
go test ./...

# Specific module tests
go test ./internal/auth/...
go test ./internal/gym/...

# Integration tests
go test ./tests/...

# Coverage report
go test -cover ./...

🤝 Contributing

  1. Follow the Module Pattern: Use the standard structure in docs/module-pattern.md
  2. Security First: Review docs/security-model.md for security guidelines
  3. Update Documentation: Keep docs in sync with code changes
  4. Test Coverage: Include tests for new modules and features

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🚀 Ready to start? Check out the complete documentation for detailed guides and architecture information.

About

AthenAI is an intelligent workout management platform that helps users generate, store, and customize training sessions based on their personal exercises and goals. Built with PostgreSQL and Go, it enables structured training templates, AI-assisted planning, and user-specific routines.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors