# Helpdesk Ticket Escalation Project (HTEP) A **single-page webapp interface that allows authenticated users to enter the relevant details for support tickets escalated by the helpdesk workers that may or should not have been escalated to a higher support tier**. Every ticket submitted and its details are viewable as a clean card component on the page and stored in a **SQLite** database provided by [Pocketbase](https://pocketbase.io/) (**PBDB**). The **PBDB** retains an extremely small file size and is thus capable of being stored within a `<script>` markup tag on the site, and thus interfaced with entirely from a **client-centric approach**--without the need of any server-side storage or rendering. ## Tech Stack The tech stack for this project is about as simple as it gets: - **FRONT END:** composed of the JavaScript meta-framework **Svelte 5**/**Sveltekit 2.0** - **Note:** the project utilizes **Typescript** rather than vanilla **JavaScript**/**JSDoc** - **BACK END:** entirely provided by **[Pocketbase](https://pocketbase.io/)**, which includes a **SQLite** **database**, **client authorization**, **file storage**, and a web-based **admin dashboard** for managing the database and these features - **FYI:** The wrapper around the DB that includes the additional features is entirely composed in **Golang**, though it can be extended via offered JavaScript and Golang SDK's. Alternatively, you could write your own backend entirely, if you were so inclined ## Implementation ### Svelte Project, Components & Schema's **Ticket DB Schema** --> *influences code type schema for ticket interface* - Ticket ID: `string` - Title: `string` - Date: `string` - Description: `string` - Category: `string` - Escalator: `string` - Notes: `boolean` - Escalation Delta: `integer` - Escalation Analysis: `string` **Svelte Components** --> *should optimize data separation and portability (functional approach)* - `TicketForm.svelte` - Defines form files for the schema described above for tickets in the SQLite DB - Handles ticket submission: - Validates ticket submission by checking fields are filled or returns `error` - Creates a `ticket` object with the types listed in the above schema - Calls the `onSubmit(ticket)` function and ticket parameter, and resets the forms to empty strings `""` - Contains markup structure and styling for the ticket submission form, as well as the bindings for submission behaviors and related buttons/page actions - `TicketCard.svelte` - Defines the type `Ticket` with the above mentioned schema