An open-source, production-ready IT Service Desk & Ticket Resolution Portal designed for government agencies, municipal departments, and enterprise IT teams. Built with React, Vite, Tailwind CSS, and Supabase Row Level Security (RLS).
- Role-Based Access Control (RBAC):
user: Submit IT support tickets, view personal ticket history, and communicate via ticket comments.staff: View assigned workload, update ticket resolution status, and post staff responses.admin: Dispatch tickets to IT staff, activate pending user accounts, manage user removals, and oversee ticket threads.super_admin: Full root authority — manage user roles, activate/deactivate accounts, and update administrative credentials.
- Account Activation Guard: All new public account requests start as
is_active = false(pending administrator activation) to prevent unauthorized access. - Interactive Ticket Discussion Feed: Real-time communication on individual tickets with visual role distinction between end-users and IT staff/admins.
- Strict Row Level Security (RLS): Enforced directly at the PostgreSQL layer via Supabase RLS policies.
- Mobile-Responsive & Accessible: Clean, modern dark-mode UI optimized for desktop, tablet, and mobile displays.
- Frontend: React 19, Vite, Tailwind CSS v4, Emotion / MUI Icons
- Backend Service: Supabase (PostgreSQL 15+, Auth GoTrue, Row Level Security)
- Deployment: GitHub Pages (
gh-pages)
Follow these step-by-step instructions to deploy your own instance of the IT Service Desk.
git clone https://github.com/your-org/it-help-desk.git
cd it-help-desk
npm install- Log in to your Supabase Dashboard and create a New Project.
- Open the SQL Editor tab in your Supabase project dashboard.
- Open the
database-schema.sqlfile provided in this repository. - Copy the entire contents of
database-schema.sql, paste it into the Supabase SQL Editor, and click Run.
This master script automatically configures:
profiles,tickets, andcommentstables- Security helper functions (
is_admin(),is_staff(),is_super_admin())- Automatic user registration triggers (
handle_new_user())- Strict Row Level Security (RLS) policies across all tables
Create a .env file at the root of the project:
VITE_SUPABASE_URL=https://your-supabase-project-id.supabase.co
VITE_SUPABASE_PUBLISHABLE_KEY=your-supabase-anon-or-publishable-keyNote: Replace
your-supabase-project-idandyour-supabase-anon-or-publishable-keywith the credentials found under Supabase Project Settings → API.
To create the initial Super Admin account safely without hitting GoTrue schema mismatches:
- In your Supabase Dashboard, navigate to Authentication → Users.
- Click
Add user→Create new user. - Fill in the initial credentials:
- Email:
superadmin@admin.com - Password:
SuperAdmin123! - ✅ Check "Auto Confirm User" (bypasses email inbox verification)
- Email:
- Click Create User.
- Return to the Supabase SQL Editor and execute the following promotion query:
UPDATE public.profiles
SET role = 'super_admin', is_active = true
WHERE email = 'superadmin@admin.com';npm run devOpen http://localhost:5173 in your browser and sign in using your Super Admin credentials!
⚠️ Security Tip: Immediately change the Super Admin password after your first login via the Change Password modal in the Super Admin Command Center.
This project is pre-configured for automated deployment to GitHub Pages.
- Ensure
vite.config.jsis set up with your repository name:
// vite.config.js
export default defineConfig(({ command }) => ({
base: command === 'build' ? '/it-help-desk/' : '/',
plugins: [react()],
}));- Run the deployment script:
npm run deployThis command automatically builds the production bundle and pushes it to the gh-pages branch.
All data access is gated by PostgreSQL Row Level Security:
| Table | user Access |
staff Access |
admin / super_admin Access |
|---|---|---|---|
profiles |
Own profile | Own profile | All profiles (SELECT, UPDATE, DELETE) |
tickets |
Own tickets (SELECT, INSERT) |
Assigned tickets (SELECT, UPDATE) |
All tickets (SELECT, INSERT, UPDATE, DELETE) |
comments |
Own ticket comments (SELECT, INSERT) |
Assigned ticket comments (SELECT, INSERT) |
All ticket comments (SELECT, INSERT) |
Distributed under the MIT License. See LICENSE for more information.