TypeScriptNode.jsExpressMongoDBEJSBootstrap

An employee web portal for managing pet boarding and grooming operations, built with TypeScript across the full Express and MongoDB stack. Six domain models — Guests, Clients, Visits, Employees, Kennels, and Services — form an interconnected data layer where visits cross-reference assigned kennels, scheduled services, and check-in state. The visit workflow covers the full operational cycle: scheduling with kennel assignment, check-in and check-out with occupancy tracking, per-service completion logging, and computed billing.

[key features]

Employees manage daily boarding operations — scheduling visits, assigning kennels, tracking service completion, and processing billing — with role-based views separating standard workflows from administrative functions.

  • Six domain models with cross-referenced relationships — Visits track Guests, Kennels, and Services; Guests reference their owner Client
  • Visit lifecycle from scheduling through kennel assignment, check-in, per-service completion tracking, check-out, and billing
  • Two-tier access control: all employees see operational views, admin-flagged users manage employees, kennels, and services
  • Defense-in-depth validation: Joi schemas with custom HTML sanitization extension, Mongoose validation, express-mongo-sanitize, and Helmet CSP
  • Password reset via time-limited crypto tokens with transactional email confirmation

[implementation details]

Domain Architecture

  • Six Mongoose models with cross-referenced relationships: Visits reference Guests, Kennels, and Services; Guests reference their owner Client and visit history; Kennels track current occupancy
  • Visit model virtuals deriving duration, billing cost, current/upcoming status, and service completion state

Access & Security

  • Passport.js session authentication with two-tier middleware: isLoggedIn gates all employee routes, isAdmin restricts management of Employees, Kennels, and Services
  • Layered input defense: Joi validates structure with a custom extension that strips HTML via sanitize-html, followed by Mongoose schema validation, plus express-mongo-sanitize and Helmet CSP at the request level

Operations & UX

  • Kennel occupancy management: assignments track through visit check-in and check-out, with filtered views showing occupied vs. available kennels
  • Cloudinary image uploads for guest profiles, fuzzy search across records, paginated views, dynamic breadcrumb navigation, and input masking for formatted data entry