Open-source admin UI for Dispatch Tickets - a multi-tenant, API-first ticketing service for developers.
- Magic Link Authentication - Passwordless login via email
- Workspace Management - View and switch between workspaces
- Ticket Management - List, filter, create, and manage support tickets
- Comments - Add and view threaded comments on tickets
- Real-time Updates - Optimistic updates for a snappy experience
- Responsive Design - Works on desktop and mobile
- Framework: Next.js 14+ (App Router)
- Styling: Tailwind CSS
- Components: shadcn/ui
- State Management: TanStack Query
- Forms: React Hook Form + Zod
- HTTP Client: Axios
The UI uses a magic link authentication flow powered by the Dispatch Tickets API:
1. User enters email on /login
2. API sends magic link email
3. User clicks link → /auth/callback?token=xxx
4. Token is validated and session stored
5. If user's org is not connected → /connect (one-time API key setup)
6. Once connected → /workspaces (dashboard)
New users will be prompted to connect their organization's API key after signing in. This is a one-time setup that links your Dispatch Tickets API key to your user session.
- Node.js 18+
- npm, yarn, or pnpm
- A Dispatch Tickets account
- Clone the repository:
git clone https://github.com/your-org/dispatchtickets-ui.git
cd dispatchtickets-ui- Install dependencies:
npm install- Copy the environment file:
cp .env.example .env.local- Run the development server:
npm run dev- Open http://localhost:3000 and enter your email to receive a magic link.
| Variable | Description | Default |
|---|---|---|
NEXT_PUBLIC_API_URL |
Dispatch Tickets API URL | https://dispatch-tickets-api.onrender.com/v1 |
src/
├── app/ # Next.js App Router pages
│ ├── (auth)/ # Authentication pages (login, connect)
│ │ ├── login/ # Magic link login
│ │ └── connect/ # API key connection (first-time setup)
│ ├── (dashboard)/ # Protected dashboard pages
│ │ └── workspaces/ # Workspace and ticket management
│ └── auth/
│ └── callback/ # Magic link callback handler
├── components/
│ ├── ui/ # shadcn/ui components
│ ├── layout/ # Layout components (sidebar, header)
│ ├── tickets/ # Ticket-related components
│ └── comments/ # Comment components
├── lib/
│ ├── api/ # API client and endpoints
│ └── hooks/ # TanStack Query hooks
├── providers/ # React context providers
│ ├── auth-provider.tsx # Authentication state management
│ └── query-provider.tsx # TanStack Query setup
└── types/ # TypeScript type definitions
The UI communicates with the Dispatch Tickets API:
POST /auth/magic-link- Send magic link emailPOST /auth/verify- Verify magic link tokenGET /auth/session- Get current session infoPOST /auth/connect- Connect API key to organization
GET /workspaces- List workspacesGET /workspaces/:id/tickets- List ticketsPOST /workspaces/:id/tickets- Create ticketGET /workspaces/:id/tickets/:ticketId- Get ticket detailsPATCH /workspaces/:id/tickets/:ticketId- Update ticketGET /workspaces/:id/tickets/:ticketId/comments- List commentsPOST /workspaces/:id/tickets/:ticketId/comments- Add comment
This project is designed to be easily self-hosted:
- Clone the repository
- Configure your environment variables
- Deploy to Vercel, Netlify, or any Node.js hosting platform
npm run dev # Start dev server
npm run build # Production build
npm run start # Start production server
npm run lint # Run ESLintsrc/providers/auth-provider.tsx- Authentication state and methodssrc/lib/api/client.ts- Axios client with auth interceptorsrc/app/(dashboard)/layout.tsx- Protected route wrapper
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - 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 licensed under the MIT License - see the LICENSE file for details.
- Documentation: docs.dispatchtickets.com
- Issues: GitHub Issues
- Email: support@dispatchtickets.com