Sports Prediction & Betting Platform - A comprehensive monorepo built with Turborepo, Next.js, and FastAPI microservices.
- Node.js 18+ and pnpm 9+
- Python 3.11+ and PDM
- Docker and Docker Compose
-
Clone and install dependencies:
git clone <repository-url> cd sportsclub-v1.0.0 pnpm install
-
Set up environment:
cp .env.example .env # Edit .env with your configuration -
Start development services:
# Start databases (PostgreSQL, Redis, MongoDB) docker-compose -f infra/docker/docker-compose.dev.yml up -d # Start all applications pnpm dev
-
Access applications:
- π Web App: http://localhost:3000
- π Docs: http://localhost:3001
- π Auth Service: http://localhost:8001
- π€ Prediction Service: http://localhost:8002
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
- Framework: Next.js 15 with App Router
- Styling: Tailwind CSS + Radix UI
- State Management: Zustand + TanStack Query
- Animations: Framer Motion
- API Framework: FastAPI (Python 3.11+)
- Package Management: PDM
- Database: PostgreSQL + Redis + MongoDB
- Authentication: JWT + OAuth2
- Monorepo: Turborepo
- Package Manager: pnpm
- Containerization: Docker
- CI/CD: GitHub Actions
# 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- Create package directory in
packages/ - Add
package.jsonwith@sportsclub/namespace - Configure TypeScript and ESLint
- Update workspace dependencies
- Create service directory in
packages/ - Set up
pyproject.tomlwith PDM - Configure FastAPI application
- Add service to Docker Compose
- Update environment variables
- TypeScript: Strict mode enabled
- ESLint: Shared configurations
- Prettier: Consistent formatting
- Conventional Commits: Standardized commit messages
- Husky: Pre-commit hooks
docker-compose -f infra/docker/docker-compose.dev.yml up# Build production images
pnpm build
docker-compose -f infra/docker/docker-compose.prod.yml up- Frontend: Vercel
- Backend: AWS ECS/EKS
- Database: AWS RDS + ElastiCache + DocumentDB
- API Documentation: Available at service endpoints
/docs - Component Storybook:
pnpm storybook - Architecture Docs:
docs/architecture/ - Deployment Guide:
docs/deployment/
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'feat: add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: admin@twgsportsclub.com
Built with β€οΈ by the Sportsclub Team