BAABA.ng is an AI-powered student housing platform designed specifically for Nigerian students. The platform connects students with safe, affordable housing while providing legal protection, roommate matching, and comprehensive property management tools.
- Mobile-first responsive design with breakpoints optimized for Nigerian mobile usage patterns
- Progressive disclosure to manage complexity and reveal features contextually
- Single Responsibility Principle applied to all views (browse, manage, dashboard)
- Consistent 8px spacing system throughout the interface
- Apple-level design aesthetics with meticulous attention to detail
- Fluid grid systems using CSS Grid and Flexbox
- Adaptive navigation (desktop header, mobile bottom nav)
- Responsive typography with proper line spacing (150% for body, 120% for headings)
- Optimized touch targets for mobile interactions
- Contextual UI patterns (modals on desktop, full-screen on mobile)
- Dark-first design with sophisticated color palette
- Comprehensive color system with 6+ color ramps (primary, secondary, accent, success, warning, error)
- Brand colors: Accent Blue (#7B3F00) and Accent Green (#A05000)
- Typography: Plus Jakarta Sans font family with 3 weight variations maximum
- Micro-interactions and hover states for enhanced user engagement
- React 18.2.0 - Modern React with hooks and concurrent features
- TypeScript 5.3.3 - Type safety and developer experience
- Vite 5.0.7 - Fast build tool and development server
- React Router DOM 6.20.1 - Client-side routing
- Tailwind CSS 3.3.6 - Utility-first CSS framework
- Tailwind Animate 1.0.7 - Animation utilities
- Class Variance Authority 0.7.0 - Component variant management
- Clsx 2.0.0 & Tailwind Merge 2.1.0 - Conditional class handling
- Framer Motion 10.16.16 - Advanced animations and gestures
- @splinetool/react-spline 2.2.6 - 3D graphics and interactions
- React Hook Form 7.49.0 - Performant form handling
- @hookform/resolvers 3.3.2 - Form validation resolvers
- Zod 3.22.4 - Schema validation
- @tanstack/react-query 5.13.4 - Server state management
- @supabase/supabase-js 2.39.0 - Backend integration
- UUID 9.0.1 - Unique identifier generation
- @radix-ui/react-avatar 1.0.4 - Accessible avatar component
- @radix-ui/react-label 2.0.2 - Form label primitives
- @radix-ui/react-separator 1.0.3 - Visual separators
- Lucide React 0.294.0 - Icon library
- Date-fns 2.30.0 - Date manipulation
- usehooks-ts 2.9.1 - Custom React hooks
src/
βββ components/ # Reusable UI components
β βββ ui/ # Base UI components (buttons, inputs, cards)
β βββ forms/ # Form-specific components
β βββ dashboard/ # Dashboard-specific components
β βββ icons/ # Custom icon components
βββ pages/ # Page components organized by feature
β βββ auth/ # Authentication pages (login, register)
β βββ dashboard/ # Dashboard pages by user role
β β βββ tenant/ # Tenant-specific dashboard pages
β β βββ landlord/ # Landlord-specific dashboard pages
β β βββ agent/ # Agent-specific dashboard pages
β βββ properties/ # Property listing and detail pages
β βββ roommates/ # Roommate matching pages
β βββ legal/ # Legal assistant pages
β βββ subscription/ # Subscription and pricing pages
βββ layouts/ # Layout components
β βββ MainLayout.tsx # Public pages layout
β βββ AuthLayout.tsx # Authentication pages layout
β βββ DashboardLayout.tsx # Dashboard layout with navigation
βββ context/ # React context providers
β βββ AuthContext.tsx # Authentication state management
βββ hooks/ # Custom React hooks
β βββ useDashboard.ts # Dashboard-related data fetching
βββ lib/ # Utility libraries
β βββ supabase.ts # Supabase client configuration
β βββ utils.ts # Common utility functions
βββ types/ # TypeScript type definitions
β βββ index.ts # Main type definitions
β βββ supabase.ts # Generated Supabase types
βββ main.tsx # Application entry point
- Atomic Design Principles: Base components (Button, Input) β Composed components (PropertyCard) β Page layouts
- Variant-based styling using
class-variance-authorityfor consistent component APIs - Compound components for complex UI patterns (Card with Header, Content, Footer)
- Polymorphic components supporting
asprop for flexible element rendering
- CSS-in-JS avoided in favor of Tailwind utility classes
- Component-specific styles using Tailwind's
@layer componentsdirective - Consistent spacing using Tailwind's spacing scale (4, 6, 8, 12, 16, 24)
- Color system leveraging CSS custom properties for theme consistency
- Flexible prop interfaces with sensible defaults
- Composition over inheritance for component extension
- Consistent naming conventions (PascalCase for components, camelCase for props)
- TypeScript interfaces for prop validation and IntelliSense
- Framer Motion for complex animations and page transitions
- Tailwind Animate for simple CSS animations
- Custom keyframes defined in
tailwind.config.js
- Page transitions with fade and slide effects
- Micro-interactions on buttons, cards, and form elements
- Loading states with skeleton screens and spinners
- Stagger animations for list items and grid layouts
- Gesture-based interactions for mobile touch interfaces
- AnimatePresence for mount/unmount animations
- Layout animations using Framer Motion's layout prop
- Reduced motion support for accessibility
- GPU-accelerated transforms for smooth performance
- Custom color palette with CSS custom properties
- Extended spacing scale and border radius values
- Custom animations and keyframes
- Typography scale with consistent line heights
- Container configuration for responsive layouts
- CSS custom properties for color system
- Dark theme variables as default
- Component-specific styles in
@layer components - Global styles for consistent typography
- Strict mode enabled for type safety
- Path mapping for clean imports
- Component prop types for better DX
- Supabase type generation for database schema
- React plugin for JSX support
- Optimized dependencies for better performance
- Development server configuration
- Build optimizations for production
- Node.js 18+ (recommended: use nvm for version management)
- npm or yarn package manager
- Git for version control
-
Clone the repository:
git clone <repository-url> cd baaba-frontend
-
Install dependencies:
npm install
-
Environment variables: Create a
.env.localfile in the root directory:VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Start development server:
npm run dev
-
Open in browser: Navigate to
http://localhost:5173
npm run dev- Start development server with hot reloadnpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint for code quality
- Component development in isolation using the existing component library
- Type-first development with TypeScript interfaces
- Mobile-first responsive design testing
- Accessibility testing with screen readers and keyboard navigation
- Performance monitoring using browser dev tools
- Production build optimized for performance
- Static asset optimization with Vite
- Environment-specific configurations for staging/production
- Vercel deployment with automatic previews
- React Query for server state and caching
- React Context for authentication state
- Local state with useState for component-specific data
- Form state managed by React Hook Form
- Feature-based folder structure for scalability
- Separation of concerns between UI, business logic, and data
- Custom hooks for reusable logic
- Type definitions centralized in
/typesdirectory
- Code splitting with React.lazy for route-based chunks
- Image optimization with proper loading strategies
- Bundle analysis and optimization
- Caching strategies with React Query
Built with β€οΈ for Nigerian students by the BAABA.ng team.