Skip to content

AReid987/sportsclub-v1.0.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

184 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ† Sportsclub Platform

Sports Prediction & Betting Platform - A comprehensive monorepo built with Turborepo, Next.js, and FastAPI microservices.

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and pnpm 9+
  • Python 3.11+ and PDM
  • Docker and Docker Compose

Installation

  1. Clone and install dependencies:

    git clone <repository-url>
    cd sportsclub-v1.0.0
    pnpm install
  2. Set up environment:

    cp .env.example .env
    # Edit .env with your configuration
  3. Start development services:

    # Start databases (PostgreSQL, Redis, MongoDB)
    docker-compose -f infra/docker/docker-compose.dev.yml up -d
    
    # Start all applications
    pnpm dev
  4. Access applications:

πŸ—οΈ Architecture

Monorepo Structure

sportsclub-v1.0.0/
β”œβ”€β”€ apps/                          # Applications
β”‚   β”œβ”€β”€ web/                       # Next.js Frontend (Port 3000)
β”‚   └── docs/                      # Documentation Site (Port 3001)
β”œβ”€β”€ packages/                      # Shared packages & microservices
β”‚   β”œβ”€β”€ shared-libs/               # Shared TypeScript types & utilities
β”‚   β”œβ”€β”€ ui/                        # Shared React components
β”‚   β”œβ”€β”€ eslint-config/             # ESLint configurations
β”‚   β”œβ”€β”€ typescript-config/         # TypeScript configurations
β”‚   β”œβ”€β”€ auth-service/              # FastAPI Authentication (Port 8001)
β”‚   β”œβ”€β”€ prediction-service/        # FastAPI Prediction Engine (Port 8002)
β”‚   β”œβ”€β”€ data-ingestion-service/    # FastAPI Data Ingestion (Port 8003)
β”‚   β”œβ”€β”€ ai-assistant-service/      # FastAPI AI Assistant (Port 8004)
β”‚   β”œβ”€β”€ leaderboard-service/       # FastAPI Leaderboards (Port 8005)
β”‚   └── notification-service/      # FastAPI Notifications (Port 8006)
β”œβ”€β”€ infra/                         # Infrastructure as Code
β”‚   β”œβ”€β”€ docker/                    # Docker configurations
β”‚   β”œβ”€β”€ kubernetes/                # K8s manifests
β”‚   β”œβ”€β”€ terraform/                 # Terraform configs
β”‚   └── aws/                       # AWS CDK/CloudFormation
└── docs/                          # Project documentation

Technology Stack

Frontend

  • Framework: Next.js 15 with App Router
  • Styling: Tailwind CSS + Radix UI
  • State Management: Zustand + TanStack Query
  • Animations: Framer Motion

Backend

  • API Framework: FastAPI (Python 3.11+)
  • Package Management: PDM
  • Database: PostgreSQL + Redis + MongoDB
  • Authentication: JWT + OAuth2

DevOps

  • Monorepo: Turborepo
  • Package Manager: pnpm
  • Containerization: Docker
  • CI/CD: GitHub Actions

πŸ“¦ Available Scripts

# Development
pnpm dev              # Start all apps in development mode
pnpm dev:web          # Start only web app
pnpm dev:docs         # Start only docs

# Building
pnpm build            # Build all packages and apps
pnpm build:web        # Build only web app

# Code Quality
pnpm lint             # Lint all packages
pnpm lint:fix         # Fix linting issues
pnpm check-types      # Type check all TypeScript
pnpm format           # Format code with Prettier

# Testing
pnpm test             # Run all tests
pnpm test:watch       # Run tests in watch mode

# Utilities
pnpm clean            # Clean all build artifacts
pnpm commit           # Conventional commit with Commitizen

πŸ”§ Development Workflow

Adding a New Package

  1. Create package directory in packages/
  2. Add package.json with @sportsclub/ namespace
  3. Configure TypeScript and ESLint
  4. Update workspace dependencies

Adding a New Microservice

  1. Create service directory in packages/
  2. Set up pyproject.toml with PDM
  3. Configure FastAPI application
  4. Add service to Docker Compose
  5. Update environment variables

Code Standards

  • TypeScript: Strict mode enabled
  • ESLint: Shared configurations
  • Prettier: Consistent formatting
  • Conventional Commits: Standardized commit messages
  • Husky: Pre-commit hooks

πŸš€ Deployment

Development

docker-compose -f infra/docker/docker-compose.dev.yml up

Production

# Build production images
pnpm build
docker-compose -f infra/docker/docker-compose.prod.yml up

Cloud Deployment

  • Frontend: Vercel
  • Backend: AWS ECS/EKS
  • Database: AWS RDS + ElastiCache + DocumentDB

πŸ“š Documentation

  • API Documentation: Available at service endpoints /docs
  • Component Storybook: pnpm storybook
  • Architecture Docs: docs/architecture/
  • Deployment Guide: docs/deployment/

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'feat: add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“„ License

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

πŸ†˜ Support


Built with ❀️ by the Sportsclub Team

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors