Component Architecture Overview
The NJ Rajat Mahotsav platform follows a strict Atomic Design methodology for organizing components. This approach creates a clear hierarchy from simple building blocks to complex page layouts.Design Philosophy
Atomic Design breaks UI components into five distinct levels:Atoms
Basic building blocks - buttons, inputs, labels, and other primitives
Molecules
Simple component groups combining multiple atoms
Organisms
Complex UI sections combining molecules and atoms
UI Components
shadcn/ui components and custom effects
Directory Structure
All components are organized under/components with clear separation:
Import Patterns
The project provides index files for cleaner imports:- Recommended
- Alternative
Component Categories
Atoms (18 components)
The foundation layer includes:- Form controls: Button, Input, Label, Checkbox, Textarea, Select
- Layout: Card, ScrollArea, Popover
- Feedback: LoadingScreen, Toast, TagBadge
- Effects: Typewriter, ThemeProvider
- Navigation: ScrollToTop, FloatingButton, AudioChoiceButton
Molecules (23 components)
Composite components that combine atoms:- Cards: GuruCard, EventCard, ScheduleCard, TransportCard
- Inputs: PhoneInput, DatePicker variants, CountrySelector
- UI Elements: CountdownTimer, ProgressCounter, Carousel
- Media: IphoneMock, 3DPin
- Navigation: Command, Dialog, Toaster
Organisms (40+ components)
Complex sections and page-level components:- Navigation: Navigation, DesktopNavigation, FloatingMenuButton, TubelightNavigation
- Forms: SevaSubmissionForm, EventDetailsModal
- Media: VideoSection, ImageMarquee, ImageCarouselModal, AashirwadVideoPlayer
- Layout: Header, StickyFooter, StandardPageHeader, ShaderBackground
- Content: AnimatedTextSection, BentoInitiatives, PathOfServiceStory
- Timeline: MobileTimeline, GuruCarousel
UI Components
The/ui directory contains:
- shadcn/ui components: Accordion, Button, and other Radix UI-based primitives
- Custom effects: InfiniteSlider, FloatingParticles, GradientMeshBackground
- Registries: Components from @magicui, @aceternity, @skiper-ui
Technology Stack
Core Libraries
Core Libraries
- React 19 with Next.js 15 App Router
- TypeScript for type safety
- Tailwind CSS v4 for styling
- Framer Motion for animations
- Radix UI for accessible primitives
Form Handling
Form Handling
- react-hook-form with zod validation
- react-phone-number-input for international phone fields
- react-day-picker for date selection
- chrono-node for natural language date parsing
Media & Assets
Media & Assets
- Cloudflare CDN for static assets and images
- Supabase for backend data storage
- GSAP for advanced animations
- locomotive-scroll for scroll effects
Key Features
Type Safety
All components use TypeScript interfaces for props:components/molecules/guru-card.tsx
Responsive Design
Components use Tailwind’s responsive utilities:Animation Support
Framer Motion provides declarative animations:CDN Integration
Cloudflare CDN helpers optimize image delivery:Component Guidelines
Next Steps
Explore each component category in detail:- Atoms - Basic building blocks
- Molecules - Composite components
- Organisms - Complex sections
- UI Components - shadcn/ui and effects
