Next Ticket is a fully custom-built ticketing system written in HTML, CSS, and JavaScript, without relying on frontend frameworks. It runs entirely on Cloudflare Workers and uses D1 as its lightweight SQL database. Designed to be minimal, secure, and developer-friendly, it’s ideal for small to medium-scale projects requiring support or internal ticket tracking.
- 🧾 Create, view, and reply to support tickets
- 🔐 Secure JWT-based authentication
- 🧑💼 Separate dashboards for users and admins
- 📬 Optional email notifications via Resend
- 🧩 Modular and extendable route-based architecture
- ⚡ Server-side HTML rendering using Cloudflare Workers
- 💾 Backed by D1 (Cloudflare's SQLite-compatible database)
- 💡 Written entirely without frontend frameworks
- A Cloudflare account with access to Workers and D1
- Wrangler CLI
- Node.js (optional, for local development)
- A Resend API Key (optional, for email features)
-
Clone the repository:
git clone https://github.com/nextcodetwo/next-ticket.git cd next-ticket -
Install Wrangler (if not installed):
npm install -g wrangler
-
Configure your environment:
Create a
.dev.varsfile or configure secrets:JWT_SECRET=your_super_secret_jwt_key RESEND_API_KEY=your_resend_api_key (optional) -
Deploy to Cloudflare:
wrangler publish
/
├── public/ # Static assets (CSS, icons, etc.)
├── src/
│ ├── handlers/ # Route handlers (GET/POST)
│ ├── templates/ # HTML templates
│ ├── auth.js # JWT logic
│ ├── db.js # D1 database functions
│ └── index.js # Main Worker entry point
├── wrangler.toml # Cloudflare configuration
└── README.md
- Users can sign up and create tickets from the
/userdashboard. - Admins can manage and respond to tickets from the
/admindashboard. - Replies are stored and displayed in a threaded format.
- All data is persisted in a D1 database.
- Emails (if configured) notify users and admins of new messages.
This project is licensed under the MIT License – see the LICENSE file for details.
Built with ❤️ by the team at Next Code Two
- Resend – for email notifications
- Cloudflare Workers
- Cloudflare D1
© 2025 Next Code Two. Licensed under the GNU General Public License v3.0
