How balaji-bi/jj-residency-suite works
Purpose and Runtime
This is a Vite-served React/TypeScript single-page frontend for a hotel or room-booking experience, with public marketing/customer pages and a separate administrative interface. It runs in the browser; no backend, database, API client, or authentication provider is evident in the repository tree. Core bootstrap files are src/main.tsx, src/App.tsx, and index.html.
Application Composition
src/App.tsx is the likely top-level application and route composition boundary. Page-level features are organized under src/pages, separating customer journeys from administrative workflows:
• Public/customer pages: src/pages/Index.tsx, src/pages/BrowseRooms.tsx, src/pages/MyBookings.tsx
• Account and support content: src/pages/Auth.tsx, src/pages/Profile.tsx, src/pages/Contact.tsx
• Administrative pages: src/pages/admin/AdminDashboard.tsx, src/pages/admin/AdminRooms.tsx, src/pages/admin/AdminOrders.tsx
Public Customer Flow
The public flow starts from the landing page, allows users to browse room inventory, and exposes booking history/profile paths. The principal UI stages are represented by src/pages/Index.tsx, src/pages/BrowseRooms.tsx, and src/pages/MyBookings.tsx. Room presentation is encapsulated in reusable cards, notably src/components/RoomCategoryCard.tsx; shared navigation likely links these views through src/components/Navbar.tsx and src/components/NavLink.tsx.
Admin Boundary
Administration is isolated structurally through a dedicated layout and pages/admin namespace. src/components/AdminLayout.tsx is the key shell boundary for admin navigation/chrome, while operational views cover dashboard, rooms, orders, customers, revenue, careers, and contact submissions. Representative control surfaces are src/pages/admin/AdminDashboard.tsx, src/pages/admin/AdminCustomers.tsx, and src/pages/admin/AdminRevenue.tsx. The tree does not show a runtime authorization guard or server-side separation; this is a UI-level boundary unless implemented inside these files.
Shared Layout and Design System
Customer-facing pages use a common layout/navigation/footer layer: src/components/Layout.tsx, src/components/Navbar.tsx, and src/components/Footer.tsx. The application uses Tailwind CSS and a local shadcn-style component library under src/components/ui, providing standardized dialogs, forms, tables, navigation, feedback, and responsive primitives. Shared styling enters through src/index.css, src/App.css, and tailwind.config.ts.
Data and Integration Boundaries
No explicit persistence or remote-service integration layer appears in src/lib, which contains only src/lib/utils.ts; no API routes, ORM, server runtime, or environment files are listed. Consequently, booking, customer, room, revenue, and contact data are likely static or component-local unless page implementations introduce external calls. Introducing real workflows should establish a distinct API/data-access boundary rather than embedding service calls across src/pages and src/pages/admin.
Build and Delivery
Vite is the development/build runtime, configured by vite.config.ts; TypeScript compilation is governed by tsconfig.json and tsconfig.app.json. The project is intended for Node/npm development and Lovable-managed publishing, per README.md. Static deployment assets reside in public, including public/robots.txt.
Main entry points: Layout.tsx Customer layout · AdminLayout.tsx Admin layout · App.tsx App composition · BrowseRooms.tsx Browse rooms
Components 20
Browser SPA
Vite serves the React single-page application.
- HTML entry
index.html - React bootstrap
src/main.tsx - App composition · Top-level page and route composition.
src/App.tsx - Component-local data · No API, persistence, or authentication provider is evident.
Customer experience
- Landing page
src/pages/Index.tsx - Browse rooms
src/pages/BrowseRooms.tsx - Room category card
src/components/RoomCategoryCard.tsx - My bookings
src/pages/MyBookings.tsx - Account and support · Authentication, profile, and contact views.
src/pages/Auth.tsx
Admin interface
A UI-level administrative boundary.
- Admin layout · Dedicated admin navigation and chrome.
src/components/AdminLayout.tsx - Dashboard
src/pages/admin/AdminDashboard.tsx - Room operations
src/pages/admin/AdminRooms.tsx - Order operations
src/pages/admin/AdminOrders.tsx - Customers and revenue · Administrative customer and revenue views.
src/pages/admin/AdminCustomers.tsx
Shared UI
- Customer layout
src/components/Layout.tsx - Navigation
src/components/Navbar.tsx - Footer
src/components/Footer.tsx - UI component library · Reusable forms, tables, dialogs, feedback, and responsive primitives.
src/components/ui
Build and delivery
- Vite build runtime
vite.config.ts - Tailwind styling
tailwind.config.ts
Connections 22
- HTML entry → React bootstrap: loads
- React bootstrap → App composition: mounts
- App composition → Customer layout: composes customer routes
- App composition → Admin layout: composes admin routes
- Customer layout → Navigation: includes
- Customer layout → Footer: includes
- Customer layout → Landing page: renders
- Customer layout → Browse rooms: renders
- Customer layout → My bookings: renders
- Customer layout → Account and support: renders
- Navigation → Browse rooms: navigates to
- Browse rooms → Room category card: presents rooms with
- Admin layout → Dashboard: renders
- Admin layout → Room operations: renders
- Admin layout → Order operations: renders
- Admin layout → Customers and revenue: renders
- App composition → UI component library: uses
- Landing page → Component-local data: uses
- Browse rooms → Component-local data: uses
- Admin layout → Component-local data: uses
- Vite build runtime → HTML entry: serves and builds
- Tailwind styling → UI component library: styles