Project Overview
Prapanch is a full-featured Tour Operations CRM built for a real tour and travel company that had outgrown spreadsheets and manual tracking. The platform manages the entire operations lifecycle — tours, bookings, travellers, crew, documents, payments, invoices, vendor payments and financial reporting — in one place. Stacknyu delivered a production-ready monorepo: a SvelteKit frontend deployed to Cloudflare Workers and a PocketBase (Go) backend with custom business-logic hooks.
Challenges & Objectives
- Replacing Spreadsheet-Based Operations
- Challenge: Tour data, bookings, payments and documents were tracked across spreadsheets, making it impossible to maintain a single source of truth or spot issues early.
- Objective: Build one platform covering the full lifecycle — tour creation, booking, payments, documents and reporting — with live status everywhere.
- Complex Permissioning Across the Team
- Challenge: A team of staff and admins with very different access needs required a permission model that could not be bypassed.
- Objective: Enforce the same role-based access control at four layers — database rules, route guards, server-side gates and UI-level gating.
- Missed Payments, Bookings and Documents
- Challenge: Flights and hotels left unbooked, pending payments and missing passports were often caught too late.
- Objective: Automatically generate reminders for flight and hotel bookings, pending balances, missing documents and upcoming departures.
Our Approach
- Monorepo With Turborepo
- We set up a pnpm-workspaces monorepo with separate web and PocketBase apps, shared tooling and one-command local development.
- Generic CRUD Factory
- A reusable DataTable with server-side pagination, faceted filters and text search, plus a Zod-driven DynamicSheetForm, means every module — tours, bookings, rooms, documents, users — follows one consistent pattern.
- Composite Booking Creation
- The full-booking flow creates the booking, room allocations, travellers, documents, operational units and an auto-generated invoice in one transaction, deriving payment status automatically.
- Automated Reminder Worker (Go)
- A concurrency-safe Go worker regenerates reminders on an interval — flights and hotels not booked, payments pending, documents missing, departures approaching — with severity levels and per-tour locking to prevent duplicates.
- Defense-in-Depth RBAC
- PocketBase collection API rules using permission keys kept in sync by Go hooks, SvelteKit route guards, per-page server gates and UI-level action hiding.
Technologies Used
- Frontend: SvelteKit 2 with Svelte 5 runes, TypeScript, Tailwind CSS 4, shadcn-svelte, TanStack Table and Superforms with Zod validation.
- Backend: PocketBase (Go) with custom hooks for permission normalization and the reminder cron worker, containerized with Docker.
- Deployment & DevOps: Cloudflare Workers via adapter-cloudflare with GitHub Actions CI/CD and environment-scoped secrets.
- Finance & Exports: Automatic invoice PDF generation with pdf-lib and Excel/CSV financial exports with xlsx.
Outcome
Prapanch replaced manual spreadsheets with a single platform for the entire operations lifecycle. Bookings automatically generate invoices, payments are tracked by UTR with live balance-due updates, and the reminder system surfaces flight, payment, document and departure alerts before they become problems. With 18+ dashboard modules, defense-in-depth access control, 22 backend collections and exportable financial reports, the company now has clear operational visibility — and a system that scales as it grows.