A comprehensive technical analysis of the PSUDZ Grooming Salon Management System: API-driven monolith architecture, Pet-First verification flow, relational data model, and the modular structure that powers high-volume salon operations.
The architecture of PSUDZ is the result of deliberate design principles that guide technology choices, feature implementation, and user experience. These tenets ensure a coherent, robust, and domain-appropriate system.
Industry innovation: password-less booking and verification. Unlike traditional applications that force account creation, PSUDZ prioritizes seamless access for returning customers.
Cohesive Next.js application serving both frontend UI and comprehensive backend RESTful API from a single, unified codebase. Deliberately chosen over microservices to reduce operational complexity.
TypeScript across the entire stack. Prisma ORM provides type-safe data access layer. Database schema is the single source of truth—auto-generated types for all models.
Reusable React components with clear hierarchy. Atomic UI elements in components/, page-level compositions in views/. Modular approach accelerates development.
A deliberate selection of modern, production-proven tools chosen to maximize developer productivity, application performance, and long-term maintainability.
Full-stack foundation handling server-side rendering for the frontend and API route handling for the backend. High-performance, server-rendered public booking page enables instant Pet-First experience.
File-based, serverless database ideal for streamlined development and zero-configuration deployment. Entire database in a single file. Prisma provides the type-safe ORM abstraction layer.
A well-organized codebase critical for scalability, maintainability, and team collaboration. Clear separation between frontend, backend API, and data persistence layers.
book/ — Public booking page
dashboard/ — Authenticated admin
login/ — Employee authentication
(authenticated)/ — Route group
loading.tsx — Loading states
not-found.tsx — 404 handling
appointments/ — Scheduling
clients/ — CRM operations
pets/ — Pet profiles
tickets/ — POS transactions
public/ — Unauthenticated
reports/ — Analytics
views/ — Page compositions
components/ — Reusable UI
hooks/ — Custom React hooks
lib/ — Utilities, Prisma
types/ — TypeScript definitions
The structural backbone defined in prisma/schema.prisma. Dictates data shape, entity relationships, and constraints ensuring data integrity. Cascading deletes maintain referential integrity across dependent records.
Core customer entity. firstName, lastName, contact details. Financial: balance, firstVisit, lastVisit.
Detailed animal records. Behavioral flags: biter, shy, aggressive. groomNotes, medicalNotes, vaccinations.
Staff management and auth. role, commissionRate, active status. Password hashed with bcryptjs.
Central scheduling entity. Links Client, Pet, Employee to date/time. Status lifecycle tracking.
POS transaction/invoice. Linked to Client and optional Appointment. Financial: subtotal, tax, discount, total.
Grooming service catalog. name, price, duration. Populates POS system and scheduling calculations.
Line-item detail. Links Service + Pet for granular reporting.
Tips on Ticket linked to receiving Employee.
Promotional codes with discount values and usage limits.
Comprehensive audit trail for security and accountability.
Key-value store for system config, branding, booking rules.
External integration endpoints for system events.
In-app alerts for bookings, cancellations, system events.
Deliberate database indexing ensures the application remains responsive under high data volume. Strategic @@index(...) declarations accelerate common query patterns.
Fast name searches in CRM
Rapid lookups for Pet-First verification
Calendar day/week/month queries
Dashboard filtering by appointment state
Client history lookups
The technical implementation of the password-less booking innovation. Public API endpoints power the frictionless client experience.
pet_name === input (case-insensitive)
pet_name.startsWith(input)
pet_name.includes(input)
Fuzzy search against Pet + Client models
Direct pet verification by phone
POST — Create new Appointment
Enforces 24-hour cancellation rule
pet_name + phone_last_4
/api/public/search-pets/
Match against indexed DB
Book or Cancel
The central hub for salon operations. Multiple views, real-time data aggregation, and external calendar synchronization via iCal subscription.
Single powerful endpoint fetches all relevant events within a date range. Performs two parallel queries: Appointment records AND standalone Ticket records (walk-ins, historical data).
Staff can sync salon schedule with external calendar apps (Google Calendar, Apple Calendar). Dynamically generates standard .ics file from Appointment data.
Clear distinction between public and authenticated APIs. Middleware intercepts requests for page routes while API security is delegated to route handlers.
No authentication required. Powers Pet-First booking flow. Endpoints: search-pets, lookup, book, cancel.
NextAuth.js intercepts requests. Protects page routes like /dashboard. Delegates API security to handlers.
Authentication required. All administrative endpoints. Session validation at route handler level.
Complex data migration from legacy .txt database export. The import_data.ts script demonstrates capability to handle real-world modernization challenges.
Careful analysis of old data structure, mapping to new schema, and flawless execution to preserve business continuity. Years of critical client and financial data safely transitioned.
Parse legacy .txt export structure
Define field-to-model correspondence
Convert data types, normalize values
Execute import_data.ts script
Verify data integrity post-migration
PSUDZ is a complete, production-ready salon management system. Pet-First verification, comprehensive operational modules, and modern architecture ready for deployment.