How satyanandyadav/bhive-assignment works
Project type and purpose
• This is a single‐page, client‐side React/TypeScript application (“Co-Working space seat booking application”) delivered as a static site (deployed via Vercel).
• There is no custom backend in this repo; all data is bundled in a local JSON file and the app runs entirely in the browser.
File structure
• Top‐level artifacts:
• package.json, tsconfig.json, tailwind.config.js – project configuration & build
• public/ – index.html, manifest, static hosting config
• src/ – all application code, subdivided into:
– src/index.tsx + reportWebVitals.ts – app entry point & performance hooks
– src/App.tsx/.css/.test.tsx – root app component, global styles, test
– src/pages/ – page‐level containers (Home)
– src/components/ – reusable presentational & container UI components (Header, Footer, SpaceCard, etc.)
– src/Resuables & src/Constant & src/interfaces – shared constants, TypeScript interfaces
– src/data/data.json – static data source
– src/ui/lib – shared utility functions
README for additional insights
• Confirms it’s a seat-booking front-end, deployed at a static URL.
• No mention of external APIs or microservices; app is fully static on the client.
a. Hosting & Delivery:
– Developer’s Machine → Build Process (Node, NPM scripts, Webpack/Babel, Tailwind) → Vercel CDN / Static File Hosting
b. Client‐side Runtime:
– Browser (Chrome, etc.) loads static index.html → React App Bundle
– React App Core (App.tsx) initializes:
• Context Provider (src/components/Context) for global state
• Routes / Pages (Home)
• UI Components (Header, Footer, SpaceOverview, BhiveAppDetails, CoWorkingFacilities, SpaceCard, etc.)
– Data Layer:
• Local JSON data (src/data/data.json) imported via ES modules
– Assets & Styling:
c. Build & Test:
– Unit Tests (Jest + React Testing Library via src/App.test.tsx, setupTests.ts)
– TypeScript compilation (tsconfig.json)
– Tailwind build (tailwind.config.js)
Relationships and interactions
• Within React: App → Context Provider → passes state to child components
• Components → import & render data from data.json
• Components → apply styles from Tailwind CSS + custom CSS
• Build tools → produce optimized static assets for deployment
• Test suite runs against the bundled React components before production build
Architectural patterns & design principles
• Component‐based UI (container vs presentational)
• Single‐Page Application (SPA) with client‐side routing (if future)
• Context API for lightweight global state
• Static data import (no runtime API calls)
• CSS utility framework (Tailwind) + modular CSS