Ticket System M324
Overview
Ticket System M324 is a prototyped ticketing platform designed to streamline issue tracking by integrating directly with the GitLab REST API. The system automates ticket creation, escalation handling, branch creation, and resolution tracking—ensuring that escalated tickets aren’t duplicated and that KPIs can be collected reliably.
Built with Node.js/Express, EJS, and TailwindCSS, the system provides a simple, browser-based interface for apprentices and teachers to record incidents and escalate them through a two-level support workflow.
My Role
I implemented the entire backend, researched the GitLab integration, designed the escalation logic, and handled deployment. My responsibilities included:
- Designing the full Express.js backend architecture
- Building the GitLab API wrapper for creating, escalating, and resolving issues
- Ensuring escalated tickets don’t get re-recorded or duplicated
- Building the UI routes and EJS views for ticket creation and management
- Researching GitLab’s API + authentication model (PAT, least privilege)
- Writing the full Docker configuration for reproducible deployments
- Choosing the tech stack (Express, EJS, Tailwind) based on project constraints
- Handling manual deployment to the company’s server (no CI/CD pipelines)
- Configuring NGINX reverse proxy + HTTPS for secure access
Features
- Create Tickets: Submit Level 1 tickets and automatically create GitLab issues
- Escalate Tickets: Update labels + auto-create a feature branch for Level 2
- Prevent Duplicate Escalations: Logic prevents re-creating escalated tickets
- Resolve Tickets: Close GitLab issues directly from the UI
- KPI Tracking Support: System architecture allows time-to-resolution and escalation metrics
- Clean Web UI using EJS and TailwindCSS
- GitLab API Integration with token-based authentication
Architecture
The application is structured into clear layers to keep logic maintainable and predictable.
Routing Layer (Express)
Routes for:
/issues— display local + GitLab issues/open-issue— form for ticket creation/escalate— escalate Level 1 → Level 2/resolve— mark issue as resolved
Controller Layer
Handles request validation and mapping to GitLab operations.
GitLab Integration Layer
Custom module handling:
- issue creation
- label updates
- feature branch creation
- issue closing
- filtered queries for Level 1 vs Level 2
UI Layer (EJS)
Server-rendered pages for:
- Issue Dashboard
- Open Issue Form
- Escalation actions
- Resolution actions
Deployment Layer
- Dockerised Node.js runtime
- Static files served via Express
- Production environment variables injected through Docker
- NGINX reverse proxy for HTTPS termination
Deployment & Operations
The company had no CI/CD pipelines, so deployments were fully manual. I established a reliable deployment workflow:
- SSH into server
- Clone or update repository
- Start the application using Docker Compose with production env variables
- Configure NGINX for routing + TLS
- Validate that GitLab tokens and endpoints are correctly reachable
Despite the manual nature, this workflow ensured reproducible and stable releases.
Key Decisions
- Express.js chosen for simplicity and low overhead
- Website-based ticket submission (after comparing mail, docs, and form-based tools)
- EJS for minimal templating overhead and easy server-side rendering
- TailwindCSS for fast styling
- Docker to eliminate environment inconsistencies
- GitLab API V4 for stable issue/branch automation
- Least-privilege GitLab token for secure API access
Challenges / Lessons Learned
- GitLab’s API design required careful handling of labels to avoid duplicate escalations
- Token security and permissions had to be tightly controlled
- Manual deployment workflows require discipline and documentation
- Mixing Level 1 and Level 2 processing demanded clear internal rules
- Automatic branch creation meant correctly mapping issue titles and IDs
Result
A fully functioning prototype ticket system capable of:
- Creating GitLab issues
- Escalating them with automated branching
- Preventing duplicate escalations
- Supporting KPI tracking
The system demonstrated how a lightweight Node.js application can automate and extend GitLab’s issue workflows in a real operational environment.