A modern, real-time support ticketing system built for small SaaS teams (2-5 support agents). Built with React, TypeScript, Firebase, and integrated with SendGrid and Slack.
- Submit Tickets: Create support tickets with title, description, priority, and file attachments
- Real-time Updates: View ticket status and chat threads with instant updates
- Auto-Confirmation: Receive email confirmation with ticket number and ETA upon submission
- Rating System: Rate support interactions after ticket resolution
- Kanban Board: Visual ticket management with drag-and-drop status updates
- Inbox View: List view with advanced filtering by status, priority, and customer
- Internal Notes: Add private notes not visible to customers
- Time Tracking: Built-in timer to track time spent on each ticket
- Knowledge Base Search: Quick access to help articles while responding
- Auto-Assignment: Automatic ticket distribution to available agents
- Performance Metrics: Track team response times, closure rates, and CSAT scores
- SLA Tracking: Monitor compliance with 24-hour response time commitments
- Trend Analysis: Visual charts showing ticket volume and resolution trends
- Agent Performance: Individual performance metrics per support agent
- Auto-Assign: Round-robin ticket distribution with load balancing
- Auto-Close: Automatically close tickets after 7 days of inactivity
- SLA Warnings: Notifications for tickets approaching SLA deadlines
- Customer Reminders: Remind customers to respond after 24 hours
- Slack Integration: Real-time notifications for new and urgent tickets
- Email Notifications: SendGrid integration for customer and agent emails
- React 18 - UI library
- TypeScript - Type safety
- Tailwind CSS - Utility-first styling
- React Router - Client-side routing
- Framer Motion - Animations
- Zustand - State management
- React Hot Toast - Notifications
- @hello-pangea/dnd - Drag and drop
- Recharts - Data visualization
- date-fns - Date utilities
- Firestore - Real-time database
- Authentication - Google OAuth
- Storage - File attachments
- Cloud Functions - Serverless automations
- SendGrid - Email delivery
- Slack - Team notifications
- Node.js 18+
- npm or yarn
- Firebase account
- SendGrid account (optional)
- Slack workspace (optional)
-
Clone the repository
cd helpdesk-pro -
Install dependencies
npm install cd functions && npm install && cd ..
-
Configure Firebase
- Create a new Firebase project at Firebase Console
- Enable Authentication with Google provider
- Create a Firestore database
- Enable Storage
- Copy your Firebase config
-
Configure environment variables
cp .env.example .env
Edit
.envand add your Firebase configuration:VITE_FIREBASE_API_KEY=your_api_key VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your-project-id VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=123456789 VITE_FIREBASE_APP_ID=1:123456789:web:abcdef123456 -
Deploy Firestore rules
firebase deploy --only firestore:rules
-
Configure Cloud Functions
cd functions # Set SendGrid API key (optional) firebase functions:config:set sendgrid.api_key="your_sendgrid_key" sendgrid.from_email="support@yourdomain.com" # Set Slack credentials (optional) firebase functions:config:set slack.token="xoxb-your-token" slack.channel="#support-tickets" # Set app URL for email links firebase functions:config:set app.url="https://your-app.firebaseapp.com" cd ..
-
Deploy Cloud Functions
firebase deploy --only functions
-
Deploy to Firebase Hosting
npm run build firebase deploy --only hosting
-
Start development server
npm run dev
-
Start Firebase emulators (for local testing)
firebase emulators:start
- Can create and view own tickets
- Can respond to ticket threads
- Can rate resolved tickets
- Cannot access agent/manager areas
- Can view all tickets
- Can assign tickets to self
- Can respond and add internal notes
- Can track time on tickets
- Access to knowledge base
- Cannot view manager metrics
- All agent permissions
- View team performance metrics
- View SLA compliance data
- Access agent performance reports
- Configure system settings
helpdesk-pro/
βββ src/
β βββ components/ # Reusable React components
β β βββ Layout.tsx
β β βββ LoadingScreen.tsx
β βββ hooks/ # Custom React hooks
β β βββ useAuth.ts # Authentication logic
β β βββ useTickets.ts # Ticket data management
β βββ pages/ # Page components
β β βββ Login.tsx
β β βββ CustomerPortal.tsx
β β βββ AgentDashboard.tsx
β β βββ ManagerDashboard.tsx
β βββ services/ # Firebase configuration
β β βββ firebase.ts
β βββ types/ # TypeScript definitions
β β βββ index.ts
β βββ App.tsx # Main app component
β βββ main.tsx # Entry point
β βββ index.css # Global styles
βββ functions/
β βββ src/
β β βββ index.ts # Cloud Functions
β βββ package.json
β βββ tsconfig.json
βββ firestore.rules
βββ firestore.indexes.json
βββ storage.rules
βββ firebase.json
βββ tailwind.config.js
βββ tsconfig.json
βββ package.json
The security rules are already configured in firestore.rules. Key features:
- Customers can only access their own tickets
- Agents can access all tickets
- Managers have full access
- Cloud Functions bypass all rules
-
Create initial admin/manager account
// Run this in Firebase Console or via a script // Set role to 'manager' for the first user
-
Seed knowledge base (optional) Add articles to the
knowledgeBasecollection:{ "title": "How to Reset Password", "content": "Step-by-step guide for password reset...", "category": "Account", "tags": ["password", "account", "login"] } -
Configure agent skills (optional) Add skills array to agent user documents:
{ "skills": ["billing", "technical", "onboarding"] }
| Function | Trigger | Description |
|---|---|---|
autoAssignTicket |
tickets onCreate |
Assigns new tickets to agents |
sendTicketConfirmation |
tickets onCreate |
Sends email confirmation |
notifyHighPriorityTicket |
tickets onCreate |
Slack notification for urgent tickets |
autoCloseInactiveTickets |
Scheduled (2 AM) | Closes tickets inactive for 7+ days |
slaWarningNotifications |
Scheduled (every 4h) | Warns about approaching SLA deadlines |
aggregateDailyMetrics |
Scheduled (11 PM) | Calculates daily statistics |
customerReminderNotification |
Scheduled (9 AM) | Reminds customers to respond |
updateAgentMetrics |
tickets onUpdate |
Updates agent performance metrics |
Edit tailwind.config.js to customize the color palette:
colors: {
primary: { /* Your primary colors */ },
accent: { /* Your accent colors */ },
}Update the logo and app name in:
src/components/Layout.tsxsrc/pages/Login.tsxindex.html
Customize email templates in functions/src/index.ts:
sendTicketConfirmationslaWarningNotificationscustomerReminderNotification
-
Authentication errors
- Ensure Google Auth is enabled in Firebase Console
- Check that the authorized domains include your domain
-
Email not sending
- Verify SendGrid API key is set in Firebase config
- Check SendGrid account for restrictions
-
Slack notifications not working
- Verify Slack Bot Token has required permissions
- Ensure the channel exists and bot has access
-
Cloud Functions deployment fails
- Ensure Node.js version is 18 in
package.json - Check Firebase quota limits
- Ensure Node.js version is 18 in
View Cloud Functions logs:
firebase functions:logMIT License - feel free to use this for your own projects!
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For questions or issues, please open a GitHub issue or contact support@helpdeskpro.com
Built with β€οΈ for SaaS teams