Skip to content

Scaler-Innovation-Labs/ticketing-system

Repository files navigation

SST Resolve - Ticketing System

Next.js TypeScript Node PostgreSQL Zod Build

Project Overview

SST Resolve is a full-stack role-based ticketing platform for campus support operations. It helps students raise issues quickly while enabling admins, senior admins, committees, and superadmins to manage assignment, escalation, SLA/TAT workflows, analytics, notifications, and communication from one unified dashboard.

The project is built with Next.js App Router and TypeScript, uses Drizzle + PostgreSQL, and includes production-oriented APIs, caching, and operational tooling.

Project Structure

.
├── docs/
│   ├── STUDENT_API_DOCUMENTATION.md
│   └── performance and audit notes
├── public/
├── src/
│   ├── app/
│   │   ├── (app)/
│   │   │   ├── admin/
│   │   │   ├── committee/
│   │   │   ├── snr-admin/
│   │   │   ├── student/
│   │   │   └── superadmin/
│   │   ├── api/
│   │   ├── api-docs/
│   │   ├── layout.tsx
│   │   └── page.tsx
│   ├── components/
│   │   ├── admin/
│   │   ├── committee/
│   │   ├── student/
│   │   ├── superadmin/
│   │   └── ui/
│   ├── conf/
│   ├── db/
│   │   ├── drizzle/
│   │   ├── migrations/
│   │   ├── schema.ts
│   │   ├── schema-tickets.ts
│   │   └── ...
│   ├── hooks/
│   ├── lib/
│   │   ├── auth/
│   │   ├── assignment/
│   │   ├── category/
│   │   ├── ticket/
│   │   └── ...
│   ├── provider/
│   ├── schemas/
│   ├── scripts/
│   └── types/
├── drizzle.config.ts
├── eslint.config.mjs
├── next.config.ts
├── package.json
├── postcss.config.mjs
├── tsconfig.json
└── README.md

Key Directories

  • src/app/: App Router pages, layouts, and API routes.
  • src/components/: Reusable feature and UI components grouped by role/domain.
  • src/lib/: Core business logic for auth, assignment, ticket lifecycle, integrations, and caching.
  • src/db/: Drizzle schemas, migrations, repository/query layers, and seed scripts.
  • src/schemas/: Validation schemas with Zod.
  • src/types/: Shared TypeScript contracts.
  • src/scripts/: Utility and operational scripts.
  • docs/: API docs and engineering audit/performance notes.

Tech Stack

  • Framework: Next.js 16 (App Router)
  • Language: TypeScript
  • Auth: Clerk
  • Database: PostgreSQL (Neon supported)
  • ORM: Drizzle ORM + drizzle-kit
  • Styling: Tailwind CSS 4
  • UI primitives: Radix UI + custom UI layer
  • Validation: Zod
  • Logging: Pino
  • Integrations: Slack, Resend, Cloudinary, Google Sheets

Getting Started

Prerequisites

  • Node.js 18+
  • npm 9+
  • PostgreSQL database or Neon account

Quick Start

# Clone
 git clone <your-repo-url>
 cd ticketing-system

# Install
 npm install

# Configure env
 # Add DATABASE_URL and other required keys in .env or .env.local

# Run migrations
 npm run db:migrate

# Start dev server
 npm run dev

Open http://localhost:3000.

Available Scripts

npm run dev          # Start development server
npm run build        # Production build
npm run start        # Start production server
npm run lint         # Lint codebase

npm run db:generate  # Generate drizzle migrations
npm run db:migrate   # Apply migrations
npm run db:push      # Push schema directly
npm run db:studio    # Open Drizzle Studio
npm run db:seed      # Seed database

Roles and Access Model

  • Student: Create and track own tickets.
  • Admin: Resolve and manage assigned and scope-matched tickets.
  • SNR Admin: Broader operational control and oversight.
  • Committee: Work on committee-tagged or committee-scoped tickets.
  • Superadmin: System-wide governance, analytics, master data, and policy controls.

API and Ops Notes

  • API docs page: /api-docs
  • Student API reference: docs/STUDENT_API_DOCUMENTATION.md
  • Cron and outbox workflows live under src/app/api/cron/

Contribution Guidelines

  • Keep domain logic in src/lib/ and data access in repository/db layers.
  • Add or update schema and migration files for database changes.
  • Prefer role-safe route guards and typed response envelopes.
  • Run build and lint before pushing.

License

This repository is private/internal unless explicitly relicensed by the owners.

Releases

No releases published

Packages

 
 
 

Contributors

Languages