Skip to content

This application is the next gen of Taran's World website for the Gems of War community. It'll help Guild Masters and players to keep a close look at their progress, weekly events, news, and much more.

License

Notifications You must be signed in to change notification settings

CorentynDevPro/StarForge

Repository files navigation

StarForge - Gems of War Community Platform

CI/CD Pipeline

Next-generation community platform for Gems of War Guild Masters and players. Track progress, manage guilds, analyze statistics, simulate battles, and much more.

πŸš€ Features

  • Guild Management: Multi-tenant per-guild configuration and member tracking
  • Discord Bot: Fully integrated Discord bot with slash commands
  • Battle Simulator: Test team compositions and strategies
  • Recommendation Engine: Get suggestions for optimal teams and strategies
  • Analytics Pipeline: Comprehensive analytics and reporting
  • Admin UI: RBAC-based admin panel with moderator tools
  • Feature Flags: Dynamic feature toggling per guild or globally
  • Job Scheduler: Cron and queue-based background jobs
  • Import/Export: Google Sheets integration and CSV tools
  • Audit Logs: Complete audit trail for all actions

πŸ“¦ Monorepo Structure

This is a TypeScript monorepo using pnpm workspaces and Turbo:

StarForge/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ backend/         # Fastify REST API
β”‚   β”œβ”€β”€ bot/             # Discord.js bot
β”‚   β”œβ”€β”€ frontend/        # Vue 3 + Vite + Pinia + Router
β”‚   β”œβ”€β”€ admin-ui/        # Admin panel with RBAC
β”‚   β”œβ”€β”€ battle-sim/      # Battle simulation engine
β”‚   β”œβ”€β”€ recommendation/  # Recommendation engine
β”‚   β”œβ”€β”€ import-export/   # Data import/export tools
β”‚   └── shared/          # Shared types and utilities
β”œβ”€β”€ database/            # Postgres/Supabase schema
β”œβ”€β”€ docker/              # Docker configurations
└── .github/workflows/   # GitHub Actions CI/CD

πŸ› οΈ Tech Stack

Backend

  • Fastify: High-performance REST API
  • Supabase/Postgres: Database with Row Level Security
  • Redis: Caching and job queue
  • JWT: Authentication

Frontend

  • Vue 3: Progressive JavaScript framework
  • Vite: Lightning-fast build tool
  • Pinia: State management
  • Vue Router: Client-side routing

Bot

  • discord.js: Discord bot framework
  • Slash Commands: Modern Discord interactions

DevOps

  • Docker Compose: Local development
  • GitHub Actions: CI/CD pipeline
  • Turbo: Monorepo build system

🚦 Getting Started

Prerequisites

  • Node.js 18+
  • pnpm 8+
  • Docker and Docker Compose
  • PostgreSQL 15+ (or use Docker)

Installation

  1. Clone the repository:
git clone https://github.com/CorentynDevPro/StarForge.git
cd StarForge
  1. Install dependencies:
pnpm install
  1. Copy environment variables:
cp .env.example .env
# Edit .env with your configuration
  1. Start the database:
docker-compose up -d postgres redis
  1. Run database migrations:
psql -h localhost -U starforge -d starforge -f database/schema.sql
psql -h localhost -U starforge -d starforge -f database/seeds.sql

Development

Start all services in development mode:

pnpm run dev

Or start individual packages:

pnpm run dev --filter @starforge/backend
pnpm run dev --filter @starforge/frontend
pnpm run dev --filter @starforge/bot
pnpm run dev --filter @starforge/admin-ui

Services will be available at:

Using Docker Compose

Start everything with Docker:

docker-compose up

Stop all services:

docker-compose down

πŸ§ͺ Testing

Run all tests:

pnpm test

Run tests for a specific package:

pnpm test --filter @starforge/backend

🎨 Linting & Formatting

Lint all packages:

pnpm run lint

Format code:

pnpm run format

Check formatting:

pnpm run format:check

πŸ—οΈ Building

Build all packages:

pnpm run build

Build a specific package:

pnpm run build --filter @starforge/backend

πŸ“š Documentation

πŸ” Environment Variables

See .env.example for all required environment variables.

Key variables:

  • DATABASE_URL: PostgreSQL connection string
  • DISCORD_TOKEN: Discord bot token
  • JWT_SECRET: JWT signing secret
  • SUPABASE_URL: Supabase project URL
  • SUPABASE_ANON_KEY: Supabase anonymous key

🚒 Deployment

Docker

Build production images:

docker build -f docker/Dockerfile.backend -t starforge-backend .
docker build -f docker/Dockerfile.bot -t starforge-bot .
docker build -f docker/Dockerfile.frontend -t starforge-frontend .

Manual Deployment

  1. Build all packages:
pnpm run build
  1. Set production environment variables

  2. Start services:

pnpm start --filter @starforge/backend
pnpm start --filter @starforge/bot

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the 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.

πŸ™ Acknowledgments

  • Gems of War community
  • Taran's World website (predecessor)
  • All contributors and supporters

πŸ“ž Support

For support, join our Discord server or open an issue on GitHub.


Made with ❀️ for the Gems of War community

About

This application is the next gen of Taran's World website for the Gems of War community. It'll help Guild Masters and players to keep a close look at their progress, weekly events, news, and much more.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published