How ecwebtestings-dev/ob392 works
Purpose and Runtime
This is a React single-page frontend for OB39: a public marketing site plus authenticated administrative dashboard. It is built and served with Vite, uses JSX/CSS, and is configured for Vercel deployment. Primary bootstrap paths are src/main.jsx, src/App.jsx, index.html, and vite.config.js.
Application Shell and Navigation
src/App.jsx is the top-level application composition point, expected to determine the active public, authentication, dashboard, and AI-widget views. The public-site shell is src/layouts/MainLayout.jsx, with shared navigation in src/components/navigation/Header.jsx. Global styling is split between src/index.css and src/App.css.
Public Website Domain
The public experience is organized as page-level feature modules:
• Home: assembled from content sections in src/pages/Home/Home.jsx, src/pages/Home/Hero.jsx, and src/pages/Home/ScalingImpact.jsx.
• About: organizational narrative, team, impact, and map content in src/pages/About/About.jsx, src/pages/About/CompanyStory.jsx, and src/pages/About/GoogleMap.jsx.
• Services: business, agricultural/export, incubation, and digital-market offerings in src/pages/Services/Services.jsx, src/pages/Services/BusinessIncubation.jsx, and src/pages/Services/AgriBusinessExport.jsx.
• Contact: landing and contact-content boundary in src/pages/Contact/Contact.jsx and src/pages/Contact/MainContact.jsx.
These modules are predominantly presentation/content components, supported by centralized static asset exports at src/assets/assets.js.
Authentication and Session Boundary
Authentication is isolated under src/Authentication. Form and page presentation are in src/components/RegistrationForm/Login.jsx, src/components/RegistrationForm/Signup.jsx, and src/components/RegistrationForm/AuthLayout.jsx. Backend-facing auth/session operations are separated into src/Authentication/api.js, src/Authentication/authService.js, and src/Authentication/UserService.js. Session lifecycle handling includes src/Authentication/sessionEvents.jsx and src/Authentication/expiredSessionmodal.jsx; this is the key boundary between unauthenticated public access and protected administration.
Dashboard Administration
The protected dashboard has its own layout at src/Dashboard/DashBoardLayout.jsx and feature-oriented management areas:
• User and admin management: src/Dashboard/UserManagement/userManagement.jsx, src/Dashboard/UserManagement/useUser.js, src/Dashboard/AdminManagement/AdminManagement.jsx.
• Audit and event observability: src/Dashboard/AuditLogs/AuditLogsTable.jsx, src/Dashboard/AuditLogs/useAuditLogs.js, src/Dashboard/Events/EventManagement.js.
• Operational inboxes: inquiries and notifications at src/Dashboard/Inquires/InQuiries.jsx, src/Dashboard/Inquires/useInquiries.js, and src/Dashboard/Notifications/Notifications.jsx.
• Dashboard discovery/summary: src/Dashboard/Statatics/DashboardOverview.jsx and src/Dashboard/GlobalSearch/SearchResults.jsx.
Hooks colocated with dashboard features encapsulate data retrieval and mutation, leaving tables/views focused on rendering.
Data and External-Service Flow
UI actions flow from forms or dashboard feature components into hooks/services, then through the authentication API layer or feature-specific API logic. Authentication-related request definitions and query contracts are concentrated in src/Authentication/api.js and src/Authentication/queries.js; audit/event services are represented by src/Authentication/AuditLogs.js and src/Authentication/eventService.js. The repository does not contain a backend; the README identifies Laravel Sanctum as the intended auth backend, while .env likely supplies runtime endpoint configuration.
Auxiliary Interaction Layer and Deployment
An AI interaction surface is independently composed through src/AiWidget/Widget.jsx and src/AiWidget/WidgetLayout.jsx, avoiding entanglement with page and dashboard modules. Reusable UI primitives include src/components/ui/Loader.jsx and src/components/ui/Whatsapp.jsx. Deployment infrastructure is Vite for development/build and Vercel via vercel.json; external backend/API availability is therefore a material runtime dependency.
Components 19
Runtime
- Vite bootstrap
src/main.jsx - Application shell
src/App.jsx - Vercel deployment
vercel.json
Public Site
- Public layout
src/layouts/MainLayout.jsx - Shared header
src/components/navigation/Header.jsx - Home content
src/pages/Home/Home.jsx - About content
src/pages/About/About.jsx - Services content
src/pages/Services/Services.jsx - Contact content
src/pages/Contact/Contact.jsx - Static assets
src/assets/assets.js
Authentication
- Login and signup
src/components/RegistrationForm/AuthLayout.jsx - Session lifecycle · Handles session events and expiry.
src/Authentication/sessionEvents.jsx - Auth API layer
src/Authentication/api.js
Administration
- Dashboard layout
src/Dashboard/DashBoardLayout.jsx - Management views · Users, admins, inquiries, notifications, overview, and search.
src/Dashboard/UserManagement/userManagement.jsx - Feature data hooks · Keeps dashboard views focused on rendering.
src/Dashboard/UserManagement/useUser.js - Audit and events
src/Dashboard/AuditLogs/AuditLogsTable.jsx
Other components
- AI widget
src/AiWidget/Widget.jsx - Laravel Sanctum API · Runtime API and authentication dependency.
Connections 23
- Vite bootstrap → Application shell: mounts
- Application shell → Public layout: public views
- Public layout → Shared header: shared navigation
- Public layout → Home content: renders
- Public layout → About content: renders
- Public layout → Services content: renders
- Public layout → Contact content: renders
- Home content → Static assets: uses
- About content → Static assets: uses
- Services content → Static assets: uses
- Application shell → Login and signup: authentication views
- Login and signup → Session lifecycle: establishes session
- Session lifecycle → Auth API layer: uses
- Auth API layer → Laravel Sanctum API: auth requests
- Application shell → Dashboard layout: protected views
- Session lifecycle → Dashboard layout: guards access
- Dashboard layout → Management views: hosts
- Dashboard layout → Audit and events: hosts
- Management views → Feature data hooks: data operations
- Feature data hooks → Laravel Sanctum API: feature API calls
- Audit and events → Laravel Sanctum API: audit and event calls
- Application shell → AI widget: composes
- Vercel deployment → Vite bootstrap: deploys build