Code Architecture
Entry and Rendering
index.jsuses React 18'screateRootto mount the appApp.jswraps content withBrowserRouterand definesRoutesinside
Routing Definition
- Uses declarative
Routecomponents; each route explicitly specifieselement - Layout is composed at the route level:
<><Header /><Navbar /><Home /></> - Child pages usually do not render
Header, onlyNavbar
Component Hierarchy
Footeris insideRouterbut outsideRoutes, shared by all pagesHeaderandNavbarare included per route in eachRoute'selement
State Management
- No global state (Redux, Context, etc.)
- Components use React Hooks:
useState,useEffect,useRef - Typical usage:
Navbar: dropdown menu, mobile menu, close on outside clickHome: Intersection Observer for scroll animations
Style Organization
- Main styling: Tailwind utility classes
- Global:
App.css,index.css - Component-level: some components import
index.cssor custom CSS - Utility:
cn()inlib/utils.jsmergesclsxandtailwind-merge
Data Organization
| Type | Location | Example |
|---|---|---|
| Hardcoded | Inside components | Navbar menu items, activity list |
| JSON | Honor_Wall.json | Honor wall data |
| Static assets | public/ | Images, PDF links |