A modern web application for tracking Old School RuneScape clan member statistics, events, and achievements.
Siege Clan Tracker is a comprehensive clan management system for Old School RuneScape (OSRS). It provides real-time tracking of member statistics, boss kills, events, and achievements by integrating with the WiseOldMan API.
Website: https://siege-clan.com
- π₯ Member Management - Track all clan members with automatic WiseOldMan sync
- π Statistics Dashboard - Real-time stats, rankings, and leaderboards
- π― Goals & Races - Create and track personal goals and competitive races
- π Events Tracking - Monitor ongoing and past clan events
- π Achievements - Track group achievements and milestones
- π Notifications - Anniversary notifications and RuneWatch alerts
- π Admin Tools - Comprehensive admin panel for clan management
- π± Responsive Design - Works seamlessly on desktop and mobile
- React 18 - UI framework
- Vite - Build tool and dev server
- React Query - Server state management
- React Router - Client-side routing
- CSS Modules - Scoped styling
- Supabase - PostgreSQL database with RLS
- Netlify Functions - Serverless API endpoints (Node.js)
- Netlify Edge Functions - Edge-optimized endpoints (Deno)
- WiseOldMan API - OSRS player statistics
- Discord Webhooks - Notifications
- RuneWatch API - Player verification
- ESLint - Code linting
- GitHub Actions - Automated sync jobs
- Git - Version control
- Node.js 18+ and npm
- Supabase account (for database)
- Netlify account (for deployment)
- WiseOldMan API access
- Clone the repository
git clone https://github.com/atayl16/siege-clan-tracker.git
cd siege-clan-tracker- Install dependencies
npm install- Set up environment variables
Create a .env file in the root directory:
# Supabase (required)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-keyNote: Do not add admin secrets or API keys to .env - these are configured server-side in Netlify environment variables for security.
- Run development server
npm run devThe app will be available at http://localhost:5173
For full functionality including serverless functions:
npm run netlify:devsiege-clan-tracker/
βββ src/ # React frontend
β βββ components/ # Reusable React components
β β βββ admin/ # Admin-specific components
β β βββ ui/ # UI library components
β βββ context/ # React Context providers
β β βββ AuthContext.js # Authentication state
β β βββ DataContext.js # Data aggregation
β βββ hooks/ # Custom React hooks
β βββ pages/ # Route components
β βββ utils/ # Utility functions
β β βββ adminApi.js # Admin API client
β βββ supabaseClient.js # Supabase initialization
βββ netlify/
β βββ functions/ # Serverless functions (Node.js)
β β βββ anniversaries.js # Anniversary notifications
β β βββ discord.js # Discord webhook handler
β β βββ runewatch-check.js # RuneWatch verification
β βββ edge-functions/ # Edge functions (Deno)
β βββ admin-*.js # Admin operations
β βββ members.js # Member data API
β βββ events.js # Events data API
β βββ _shared/ # Shared utilities
β βββ auth.js # Authentication middleware
βββ scripts/ # Background sync jobs
β βββ sync-tasks/
β βββ sync-wom.cjs # WiseOldMan member sync
β βββ wom-events.cjs # Events sync
β βββ anniversaries.cjs # Anniversary check
β βββ runewatch-check.cjs # RuneWatch scan
βββ .github/workflows/ # GitHub Actions
β βββ hourly-clan-sync.yml # Hourly data sync
β βββ daily-clan-sync.yml # Daily checks
β βββ manual-clan-sync.yml # Manual triggers
βββ supabase/ # Database migrations
βββ migrations/
- Hardcoded Admin - Master admin with emergency access
- User Registration - Self-service user accounts
- Character Claims - Link OSRS characters to accounts
- Admin Tokens - Server-side admin operation authentication
- WiseOldMan Sync - Hourly sync of member data via GitHub Actions
- Edge Functions - Cached API responses for fast data access
- React Query - Client-side caching and optimistic updates
- Supabase RLS - Row-level security for data access control
Admin operations use dedicated edge functions with JWT-based authentication:
- Updates, deletes, and visibility changes bypass RLS using service role
- JWT tokens authenticate admin requests (no secrets in client)
- Admin-specific RPC functions handle privileged database operations
- Edge Functions: 5-15 minute cache with ETags
- React Query: Automatic background refetch
- Netlify CDN: Global edge caching
- Cache Invalidation: Purge on data updates
- CONTRIBUTING.md - Contribution guidelines and development standards
Comprehensive documentation is organized in the /docs directory:
Planning & Roadmap:
- Technical Debt - Code refactoring opportunities and cleanup tasks
- Feature Suggestions - Proposed new features with implementation plans
- Bugs & UX Issues - Known bugs, reproduction steps, and fixes
- Current Tasks - Work-in-progress and stabilization checklist
Setup Guides:
- Local Development Setup - Development environment configuration
- Staging Setup - Staging database and testing procedures
See the docs directory for the complete documentation index.
SUPABASE_URL # Supabase project URL
SUPABASE_ANON_KEY # Public anon key (read-only access)SUPABASE_URL # Supabase project URL
SUPABASE_SERVICE_ROLE_KEY # Service role key (private)
WOM_API_KEY # WiseOldMan API key
WOM_GROUP_ID # Clan group ID
DISCORD_WEBHOOK_URL # Discord webhook
DISCORD_ANNIVERSARY_WEBHOOK_URL # Anniversary channel
API_KEY # Edge function API key
ADMIN_SECRET # Admin operations secret
ALLOWED_ORIGIN # CORS allowed origin# Run tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run tests with coverage
npm test -- --coveragePushes to main branch automatically deploy to production via Netlify.
# Build for production
npm run build
# Preview build locally
npm run preview- Netlify: Configure environment variables in dashboard
- Supabase: Set up database and RLS policies
- GitHub: Add secrets for Actions workflows
- WiseOldMan: Register your clan group
Automated sync jobs run via GitHub Actions:
| Job | Frequency | Purpose |
|---|---|---|
| WOM Sync | Hourly | Sync member data from WiseOldMan |
| WOM Events | Hourly | Sync event data and calculate points |
| Anniversaries | Daily | Check and notify clan anniversaries |
| RuneWatch | Daily | Scan for flagged members |
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is private and not licensed for public use.
Alisha Taylor (@atayl16)
- WiseOldMan - OSRS tracking API
- Supabase - Backend infrastructure
- Netlify - Hosting and edge functions
- Siege Clan members - Testing and feedback
For questions or issues:
- Open an issue on GitHub
- Contact clan leadership in Discord
Made with β€οΈ for the Siege Clan