How nixonaguero/caribeanocean_adminfrontend works
1. Project type and runtime
- This is a frontend application built with React + TypeScript + Vite.
- There is no backend code in the repository tree, so the app’s runtime architecture is centered on client-side UI composition plus a small data-access/service layer.
2. Top-level application shell
- src/main.tsx is the entry point that boots the React app into index.html.
- src/App.tsx is the root application component and likely hosts the main page structure or routes.
- src/css/global.css provides app-wide styling and baseline visual rules.
3. Feature-based organization
- The main functional area in the repo is src/features/rooms/.
- This feature is split into conventional layers:
- components/ for presentational UI
- hooks/ for state/data orchestration
- services/ for data fetching or domain access
- types/ for TypeScript contracts
- styles/ and component-level CSS modules for styling
4. Rooms feature as the primary domain
- src/features/rooms/RoomsPage.tsx is the page-level container for the rooms experience.
- src/features/rooms/components/Rooms.tsx and RoomCard.tsx likely render the rooms list and individual room tiles/cards.
- The existence of Rooms.module.css and rooms.module.css suggests a mix of component-scoped CSS modules and feature styling.
5. Data flow within the rooms feature
- The likely flow is:
- page/container component mounts
- useRooms hook loads or prepares room data
- rooms.service.ts supplies the data source or domain logic
- typed room models from rooms.types.ts shape the data
- UI components render the resulting collection
- This creates a clean separation between data access, state management, and presentation.
6. State and side-effect boundary
- The hook layer (useRooms.ts) is the main boundary where UI logic meets data loading.
- Any asynchronous behavior, transformation, filtering, or derived state should live here rather than in visual components.
- This keeps Rooms.tsx and RoomCard.tsx mostly declarative and reusable.
7. Service boundary
- rooms.service.ts is the likely integration point for whatever provides room data.
- In this repo, that service appears isolated behind the hook, which means the UI does not directly depend on raw transport details.
- For an architecture diagram, this is the place to show “feature UI” calling into “service/data layer.”
8. Types as contract layer
- rooms.types.ts defines the structure of room-related data.
- This acts as the contract between the service, hook, and components, reducing coupling and keeping the feature consistent.
- Type definitions are especially important here because the app is TypeScript-first and likely uses typed props for UI components.
9. Styling and asset usage
- Styling is split between global CSS and feature/component CSS modules.
- src/assets/rooms/ indicates static room imagery or media used by the rooms UI.
- This suggests the rooms feature is visually driven and likely maps data objects to image-backed cards.
10. Repository documentation and standards
- The .agents/skills/ and .agents/skills/project_context/ directories contain internal guidance, not runtime code.
- These files document architecture, design standards, admin context, and commit conventions, which implies the repository has strong process/documentation support around UI implementation.
- They do not change runtime flow, but they matter for understanding expected structure and consistency.
11. Tooling and build pipeline
- Vite handles development server, bundling, and hot module replacement.
- ESLint is configured via eslint.config.js, and TypeScript config is split across tsconfig*.json.
- These tools affect developer workflow and code quality, but they are not part of the app’s runtime data path.
12. How to draw the architecture
- A good diagram would show:
- browser loads Vite app entry
- root app component
- rooms page/container
- hook layer
- rooms service
- typed domain models
- presentational room list/cards
- static assets and CSS modules supporting the UI
- The main architectural boundary is the separation between feature UI and feature data/service logic.
Main entry points: RoomsPage.tsx Rooms Page · Rooms.tsx Rooms · App.tsx App · rooms.types.ts room types
Components 16
App Shell
Entry, root component, and global styles for the React app.
- main.tsx · Bootstraps React into the document.
src/main.tsx - App · Top-level application composition.
src/App.tsx - Global CSS · Application-wide baseline styling.
src/css/global.css - index.html · Vite mount point for the React app.
index.html
Rooms Feature
Primary domain feature with page, UI, state, service, types, and styling.
- Rooms Page · Page-level entry for the rooms experience.
src/features/rooms/RoomsPage.tsx - Rooms · Composes the rooms collection UI.
src/features/rooms/components/Rooms.tsx - Room Card · Renders an individual room tile.
src/features/rooms/components/RoomCard.tsx - useRooms · Loads and shapes room state for the UI.
src/features/rooms/hooks/useRooms.ts - rooms service · Feature data access and domain integration.
src/features/rooms/services/rooms.service.ts - room types · TypeScript models shared across the feature.
src/features/rooms/types/rooms.types.ts - Rooms.module.css · Scoped styling for room UI pieces.
src/features/rooms/components/Rooms.module.css - rooms.module.css · Feature-level styling for rooms layouts.
src/features/rooms/styles/rooms.module.css - Rooms Assets · Room imagery and other visual assets.
src/assets/rooms
Tooling & Docs
Build, lint, TypeScript config, and repository guidance.
- Vite config · Dev server and bundling configuration.
vite.config.ts - ESLint config · Static analysis and code quality rules.
eslint.config.js - Arch guide · Repository architecture and process guidance.
.agents/skills/project_context/03-admin-architecture.md
Connections 18
- index.html → main.tsx: loads · The host page provides the mount point for the React bundle.
- main.tsx → App: renders · Application bootstrap mounts the root component.
- App → Rooms Page: hosts · Root app composes the rooms page experience.
- Rooms Page → useRooms: uses · Page container delegates data/state orchestration to the hook.
- useRooms → rooms service: fetches · Hook calls the feature service for room data.
- useRooms → room types: types · Hook relies on shared room contracts.
- rooms service → room types: returns · Service shapes data according to domain types.
- Rooms Page → Rooms: composes · Page renders the list view.
- Rooms → Room Card: maps · List view renders repeated room cards.
- Rooms → room types: props · View consumes typed room data.
- Room Card → room types: props · Card is driven by room contracts.
- Rooms → Rooms.module.css: styles · Component-scoped CSS module styles the list UI.
- Rooms Page → rooms.module.css: styles · Feature-level CSS supports page layout.
- Room Card → Rooms Assets: uses · Cards likely display room imagery or media.
- App → Global CSS: styles · Root app inherits global baseline styling.
- main.tsx → Vite config: built with · Vite config governs the app build/runtime tooling.
- ESLint config → App: checks · Lint rules apply across the app source.
- Arch guide → Rooms Page: guides · Repository guidance informs feature structure and implementation.