A complete work order management system designed for FIRST Robotics Competition (FRC) teams, featuring a Discord bot for team collaboration and a web dashboard for administration and analytics.
The FRC Work Order System streamlines task management for robotics teams by providing:
- Discord Integration: Manage work orders directly from Discord using slash commands and interactive buttons
- Web Dashboard: View analytics, manage permissions, and access detailed work order information
- Permission System: Role-based access control with admin and member levels
- Audit Trail: Complete history of all actions for accountability and analytics
- Real-time Updates: Work order status synchronized between Discord and the web dashboard
- Create, edit, assign, claim, and complete work orders using slash commands
- Interactive buttons for quick actions (Claim, Unclaim, Mark Done)
- Beautiful embedded messages with color-coded status indicators
- Permission enforcement based on Discord roles
- All actions logged for audit purposes
- Discord OAuth authentication
- Work order list with filtering by category and status
- Detailed work order views with full audit history
- User usage analytics and leaderboards
- Admin panel for guild configuration and role mapping
- Clean, responsive design with yellow and white color scheme
- Categories: Mechanical, Electrical, Software, General
- Status Tracking: Open, Done
- Priority Levels: Low, Medium, High
- Assignment: Admin-assigned or self-claimed
- Audit Trail: Complete history of who did what and when
- TypeScript 5.3+
- Node.js 18+
- pnpm workspace (monorepo)
- discord.js 14.14
- Supabase PostgreSQL
- @supabase/supabase-js
- Next.js 14 (App Router)
- React 18
- Tailwind CSS
- Supabase (with Row Level Security)
- Node.js 18 or higher
- pnpm (
npm install -g pnpm) - Supabase account
- Discord application
- Clone the repository:
git clone https://github.com/WinnerWang971119/workorder.git
cd workorder- Install dependencies:
pnpm install-
Set up Supabase:
- Create a new Supabase project
- Run migrations from
supabase/migrations/ - Configure Discord OAuth in Supabase Authentication settings
-
Configure Discord application:
- Create a Discord bot at https://discord.com/developers
- Enable necessary intents (Server Members, Message Content)
- Add bot to your Discord server
-
Set environment variables:
Bot (packages/bot/.env):
DISCORD_TOKEN=your_bot_token
DISCORD_CLIENT_ID=your_client_id
SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
NODE_ENV=developmentDashboard (packages/web/.env.local):
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key- Run in development:
# Terminal 1 - Discord bot
pnpm --filter bot dev
# Terminal 2 - Web dashboard
pnpm --filter web devThe dashboard will be available at http://localhost:3000
For detailed setup instructions, see SETUP.md.
workorder/
├── packages/
│ ├── shared/ # Shared TypeScript types and constants
│ ├── bot/ # Discord bot (discord.js)
│ └── web/ # Web dashboard (Next.js)
├── supabase/ # Database migrations and schema
│ └── migrations/
├── SETUP.md # Detailed setup guide
├── DEPLOYMENT.md # Production deployment guide
├── TESTING.md # Testing checklist
└── IMPLEMENTATION_SUMMARY.md # Implementation details
All commands use the /wo prefix:
/wo-create title:"Fix drivetrain" category:MECH description:"Tighten loose chain"
/wo-list
/wo-claim id:1
/wo-unclaim id:1
Admin-only commands:
/wo-assign id:1 user:@teammate
/wo-edit id:1 title:"Updated title"
/wo-remove id:1
Each work order message includes buttons for quick actions:
- Claim: Take ownership of a work order
- Unclaim: Release your claim
- Mark Done: Complete the work order
- Navigate to the deployed dashboard URL
- Click "Login with Discord"
- View and manage work orders from the web interface
- Access usage analytics at
/usage - Configure guild settings at
/admin(admin only)
- SETUP.md: Complete setup instructions for local development
- DEPLOYMENT.md: Production deployment guide (Railway, Fly.io, Vercel, etc.)
- TESTING.md: Testing checklist and procedures
- IMPLEMENTATION_SUMMARY.md: Technical implementation details
- goal.md: Original MVP requirements and specifications
- Row Level Security (RLS) enabled on all Supabase tables
- Service role key used only server-side (Discord bot)
- Public/anon key used client-side with RLS enforcement
- Discord OAuth for secure authentication
- Permission checks on both client and server
Manual testing checklist available in TESTING.md.
# Build all packages
pnpm build
# Build specific package
pnpm --filter bot build
pnpm --filter web buildThe project uses a monorepo structure with shared types:
- packages/shared: Common TypeScript types and constants used by both bot and web
- packages/bot: Discord bot with services for permissions, work orders, audit logging, and Discord interactions
- packages/web: Next.js application with pages for work orders, usage analytics, and admin settings
This is an internal FRC team project. For questions or issues:
- Check existing documentation (SETUP.md, DEPLOYMENT.md)
- Review the Discord bot console for errors
- Check Supabase logs for database issues
- Verify environment variables are set correctly
MIT License - See LICENSE file for details.
https://github.com/WinnerWang971119/workorder
Built for FRC teams to streamline work order management and team collaboration during build season and beyond.