Skip to content

midhunann/grabbtech

Repository files navigation

GRABB Private Limited

A high-performance, enterprise-grade Next.js application showcasing advanced web development techniques, performance optimization strategies, and modern React patterns. Built as a comprehensive website for an IT training institute with focus on scalability, performance, and developer experience.

Table of Contents

# Section
1 Technical Architecture
2 Performance Engineering
3 Data Flow & State Management
4 Design System & Styling
5 Interactive Features
6 Performance Monitoring
7 Development Workflow
8 SEO & Accessibility
9 Build & Deployment
10 Code Quality & Testing
11 Key Metrics & Achievements

Technical Architecture

Framework & Core Technologies

  • Next.js 15 with App Router for modern React development
  • TypeScript for type safety and enhanced developer experience
  • Tailwind CSS for utility-first styling with custom design system
  • Framer Motion & GSAP for advanced animations and interactions
  • React Simple Maps for interactive geographical data visualization

Component Architecture

src/components/
├── ui/                     # Radix UI + shadcn/ui base components
├── layout/                 # Header, Footer, Navigation components
├── lazy/                   # Dynamically imported heavy components
├── common/                 # Shared utilities (ClientProviders, LazyHydrate)
├── home/                   # Homepage-specific components
├── about/                  # About page components with animations
├── programs/               # Complex filtering and pagination logic
├── contact/                # Forms with validation and map integration
└── performance/            # Real-time performance monitoring

Performance Engineering

Bundle Optimization Strategy

  • Code Splitting: Route-based and component-based splitting
  • Dynamic Imports: Lazy loading for heavy interactive components
  • Tree Shaking: Optimized imports and bundle analyzer integration
  • Bundle Budget: Strict performance budgets with monitoring

Performance Budget Configuration

export const PERFORMANCE_BUDGET = {
  bundles: {
    maxInitialJS: 400,    // KB - Initial bundle size limit
    maxTotalJS: 800,      // KB - Total JS after code splitting
    maxCSS: 100,          // KB - CSS bundle limit
    maxImages: 200,       // KB - Image bundle per page
  },
  webVitals: {
    lcp: { good: 2500 },  // Largest Contentful Paint
    inp: { good: 200 },   // Interaction to Next Paint
    cls: { good: 0.1 },   // Cumulative Layout Shift
  }
};

Lazy Loading Implementation

  • Component-level: Heavy components loaded on demand
  • Route-level: Page components with loading fallbacks
  • Image optimization: Next.js Image with modern formats (WebP, AVIF)
  • Font optimization: Self-hosted fonts with preloading

Data Flow & State Management

Data Architecture

src/data/
├── types.ts              # TypeScript interfaces and types
├── company.ts            # Business information and constants
├── programs.ts           # Course catalog with filtering types
├── districts.ts          # Geographical data for map visualization
├── education.ts          # Statistical data and partnerships
└── index.ts              # Centralized exports

State Management Pattern

  • Local State: React useState for component-specific state
  • Shared State: Context providers for cross-component data
  • Form State: React Hook Form with Zod validation
  • Animation State: Framer Motion's built-in state management

Data Flow Example

// Programs page data flow
programs (static)  filtering logic  pagination  UI rendering
     
[Raw Data]  [Filter Functions]  [Paginated Results]  [Grid Component]

Design System & Styling

CSS Architecture

  • Custom Properties: CSS variables for theming and consistency
  • Component Variants: Class Variance Authority for component styles
  • Utility Classes: Tailwind CSS with custom extensions
  • Animation System: Framer Motion variants and GSAP timelines

Design Token Structure

:root {
  /* Brand Colors */
  --color-deep-indigo: #2A2A72;
  --color-sky-blue: #009FFD;
  --color-coral-red: #ff4242;
  
  /* Typography */
  --font-primary: 'Manrope';
  --font-secondary: 'Raleway';
}

Interactive Features

District Map Implementation

  • react-simple-maps: SVG-based interactive map of Tamil Nadu
  • Real-time Data: Hover states with statistical overlays
  • Performance Optimized: Memoized components and efficient re-renders
  • Responsive Design: Adaptive layout for mobile and desktop

Animation System

// Framer Motion variants pattern
const containerVariants = {
  hidden: { opacity: 0 },
  visible: {
    opacity: 1,
    transition: { staggerChildren: 0.1 }
  }
};

const itemVariants = {
  hidden: { y: 20, opacity: 0 },
  visible: { y: 0, opacity: 1 }
};

Performance Monitoring

Real-time Web Vitals Dashboard

  • Core Web Vitals: LCP, INP, CLS tracking
  • Custom Metrics: Bundle size monitoring
  • Performance Budget: Automated alerts for budget violations
  • Development Tools: Live performance insights at /performance

Monitoring Implementation

// Web Vitals integration
import { onCLS, onINP, onFCP, onLCP, onTTFB } from 'web-vitals';

export function useReportWebVitals() {
  useEffect(() => {
    onLCP(metric => console.log('LCP:', metric));
    onINP(metric => console.log('INP:', metric));
    // Real-time performance tracking
  }, []);
}

Development Workflow

Code Organization Patterns

  1. Barrel Exports: Centralized imports from data modules
  2. Component Composition: Reusable UI components with variants
  3. Custom Hooks: Extracting logic for reusability
  4. TypeScript Strict Mode: Enhanced type checking and safety

SEO & Accessibility

Technical SEO Implementation

  • Structured Data: JSON-LD for organization, local business
  • Meta Tags: Dynamic generation per page
  • Open Graph: Social media optimization
  • Sitemap: Automatic generation with Next.js
  • Robots.txt: Search engine directives

Accessibility Features

  • ARIA Labels: Comprehensive labeling for screen readers
  • Keyboard Navigation: Full keyboard accessibility
  • Focus Management: Proper focus states and trapping
  • Color Contrast: WCAG 2.1 AA compliance
  • Semantic HTML: Proper heading hierarchy and landmarks

Build & Deployment

Build Optimization

// next.config.ts highlights
const nextConfig = {
  experimental: {
    optimizePackageImports: ['lucide-react', 'framer-motion'],
    optimizeCss: true,
  },
  images: {
    formats: ['image/avif', 'image/webp'],
    minimumCacheTTL: 60,
  },
  compress: true,
  generateEtags: true,
};

Deployment Strategy

  • Vercel Platform: Optimized for Next.js applications
  • Edge Functions: Middleware for caching and security headers
  • ISR (Incremental Static Regeneration): About page with 1-hour revalidation
  • Domain Management: SEO-friendly redirects and canonical URLs

Code Quality & Testing

Development Standards

  • ESLint: Next.js and TypeScript rules
  • TypeScript: Strict mode with comprehensive typing
  • Component Testing: Isolated component development
  • Performance Testing: Automated performance validation

File Organization

src/
├── app/                    # Next.js 15 App Router
│   ├── layout.tsx         # Root layout with providers
│   ├── globals.css        # Design system and base styles
│   └── */page.tsx         # Route components
├── components/
│   ├── ui/                # Radix UI + shadcn base components
│   ├── lazy/              # Dynamic import wrappers
│   └── */                 # Feature-specific components
├── config/
│   ├── seo.ts            # SEO configuration and metadata
│   ├── performance.ts     # Performance budgets and monitoring
│   └── *.ts              # Various configuration files
├── data/                  # Static data and type definitions
├── hooks/                 # Custom React hooks
├── lib/                   # Utility functions
└── middleware.ts          # Edge middleware for caching/security

Key Metrics & Achievements

Performance Metrics

  • Bundle Size: 332KB initial (34% reduction from baseline)
  • Core Web Vitals: All metrics in "Good" range
  • Lighthouse Score: 90+ across all categories
  • Load Time: <2.5s LCP on 3G networks

Technical Highlights

  • Component Architecture: 50+ reusable components
  • Type Safety: 100% TypeScript coverage
  • Performance Budget: Automated monitoring and alerts
  • SEO Score: 95+ with comprehensive structured data
  • Accessibility: WCAG 2.1 AA compliant

This project demonstrates modern web development practices including performance optimization, accessibility, SEO, and scalable React architecture patterns.

About

a website for grabbtech pvt ltd

Resources

Stars

Watchers

Forks

Contributors

Languages