Initializing
Back to Projects
Year2025
DomainFrontend
AccessOpen Source
Complexity6.7 / 10
Live Link
Next.jsReactTypeScriptTailwind CSSMotionRechartsGoogle GeminiLucide IconsFramer Motion
FrontendProduction

Aasha Foundation — NGO Impact Platform

Modern NGO website with AI-powered chatbot, impact visualization, interactive calculators, and premium animations for community engagement and donation conversion.

Sections0
AI Chatbot Commands0+
Impact Metrics0+
Service Categories0

Table of Contents


The Challenge

Aasha Foundation is a non-profit organization dedicated to community upliftment through education, sustainable development, and livelihood initiatives in North-East India, particularly focusing on the Bodoland region. The organization needed a modern, engaging web presence that could effectively communicate their mission while facilitating donations and volunteer sign-ups.

The previous website was static and lacked the interactive capabilities needed to showcase the foundation's significant impact metrics (3,500+ volunteers, 250+ projects, 12,000+ lives impacted). The challenge was creating a visually compelling platform that could engage visitors, provide instant answers through AI assistance, and create meaningful conversion pathways for donations and volunteer registration.

The requirement: Build a modern, high-performance NGO website with AI-powered chatbot for instant visitor engagement, comprehensive impact visualization through charts and statistics, interactive calculators for donation impact, and premium animations for visual engagement.


Architecture & Solution

The platform is a single-page application built with Next.js App Router, featuring a component-based architecture:

Parsing system architecture diagram...

Page Structure

code
/
├── Hero
├── About
├── Services
├── Why Choose Us
├── Stats
├── Initiatives
├── Justice & Sustainability
├── Steps to Action
├── Focused Actions
├── Exclusive Course
├── Testimonials
├── Volunteer Impact
├── Blog
└── Final CTA

Tech Stack

LayerTechnologyVersion
FrameworkNext.js15.x
UI LibraryReact19.x
LanguageTypeScript5.x
StylingTailwind CSS4.x
AnimationMotion (Framer)12.x
ChartsRecharts3.x
IconsLucide React0.553+
AIGoogle Gemini1.17.x
FormsReact Hook Form + Zod
StateReact hooks
BuildNext.js Compiler

Key Engineering Decisions

1. Motion Animation Integration

Premium animations powered by Motion (Framer) for smooth, engaging user interactions:

typescript
// components/MagneticButton.tsx
'use client';

import React, { useRef, useState } from 'react';
import { motion } from 'motion/react';

export function MagneticButton({ children, className }: MagneticButtonProps) {
  const ref = useRef<HTMLButtonElement>(null);
  const [position, setPosition] = useState({ x: 0, y: 0 });

  const handleMouse = (e: React.MouseEvent<HTMLButtonElement>) => {
    const { clientX, clientY } = e;
    const { left, top, width, height } = ref.current!.getBoundingClientRect();
    const middleX = clientX - (left + width / 2);
    const middleY = clientY - (top + height / 2);
    setPosition({ x: middleX * 0.4, y: middleY * 0.4 });
  };

  const reset = () => setPosition({ x: 0, y: 0 });

  return (
    <motion.button
      ref={ref}
      onMouseMove={handleMouse}
      onMouseLeave={reset}
      animate={{ x: position.x, y: position.y }}
      transition={{ type: 'spring', stiffness: 150, damping: 15, mass: 0.1 }}
      className={className}
    >
      {children}
    </motion.button>
  );
}

2. Scroll-Based Parallax Effects

Parallax scrolling implemented with Motion's useScroll and useTransform hooks:

typescript
// app/page.tsx
const { scrollYProgress } = useScroll();
const scaleImage = useTransform(scrollYProgress, [0, 0.2], [1, 1.1]);
const y1 = useTransform(scrollYProgress, [0, 1], [0, -150]);
const y2 = useTransform(scrollYProgress, [0, 1], [0, 150]);

// Applied to background elements for depth
<motion.div style={{ y: y1 }} className="floating-element-1" />
<motion.div style={{ y: y2, scale: scaleImage }} className="floating-element-2" />

3. AI Chatbot with Gemini Integration

Interactive AI chatbot using Google Gemini API with custom system instructions:

typescript
// components/AIChatBot.tsx
const SYSTEM_INSTRUCTION = `
You are the "Aasha Impact Assistant", a friendly and professional AI representative...

Key Information about Aasha:
- Mission: Empowering communities through education, sustainable development...
- Vision: A self-reliant, sustainable and dignified society.
- Impact: 3,500+ active volunteers, 250+ projects completed, 12,000+ lives impacted.
- Programs: Skilling Bodoland Initiative, Resilient Futures, O1 Weaves...
- Focus: Women empowerment, healthcare, education for all...
`;

async function handleSendMessage() {
  if (!ai || !input.trim()) return;
  
  setMessages(prev => [...prev, { role: 'user', text: input }]);
  setIsLoading(true);
  
  const response = await ai.models.generateContent({
    model: 'gemini-2.0-flash',
    contents: [{ role: 'user', parts: [{ text: input }] }],
    config: {
      systemInstruction: SYSTEM_INSTRUCTION,
    },
  });
  
  setMessages(prev => [...prev, { role: 'bot', text: response.text }]);
  setIsLoading(false);
}

4. Impact Visualization with Recharts

Comprehensive impact data visualization using Recharts:

typescript
// components/ImpactCharts.tsx
export function ImpactCharts() {
  const pieData = [
    { name: 'Education', value: 35, fill: '#c49a3b' },
    { name: 'Healthcare', value: 25, fill: '#a67c2e' },
    { name: 'Livelihood', value: 20, fill: '#d4a94b' },
    { name: 'Environment', value: 15, fill: '#8b6914' },
    { name: 'Disaster Relief', value: 5, fill: '#6b5210' },
  ];

  return (
    <ResponsiveContainer width="100%" height={300}>
      <PieChart>
        <Pie
          data={pieData}
          cx="50%"
          cy="50%"
          innerRadius={60}
          outerRadius={100}
          paddingAngle={5}
          dataKey="value"
        >
          {pieData.map((entry, index) => (
            <Cell key={`cell-${index}`} fill={entry.fill} />
          ))}
        </Pie>
        <Tooltip />
      </PieChart>
    </ResponsiveContainer>
  );
}

5. Interactive Impact Calculator

Engaging donation impact calculator showing real-time impact visualization:

typescript
// components/ImpactCalculator.tsx
export function ImpactCalculator() {
  const [donationAmount, setDonationAmount] = useState(500);
  
  const impactMetrics = {
    mealsProvided: Math.floor(donationAmount / 30),
    booksProvided: Math.floor(donationAmount / 150),
    medicalKits: Math.floor(donationAmount / 200),
    saplingsPlanted: Math.floor(donationAmount / 25),
  };

  return (
    <div className="calculator-container">
      <input 
        type="range" 
        min="100" 
        max="10000" 
        value={donationAmount}
        onChange={(e) => setDonationAmount(Number(e.target.value))}
      />
      <div className="impact-display">
        <span>{impactMetrics.mealsProvided} meals</span>
        <span>{impactMetrics.booksProvided} books</span>
        <span>{impactMetrics.saplingsPlanted} saplings</span>
      </div>
    </div>
  );
}

Frontend Components

Section Components (18 Total)

ComponentFeatures
HeroParallax background, animated CTA, scale transform on scroll
AboutMission/vision, history timeline
Services7 service categories with icons
WhyChooseUsFloating decorative elements, parallax
StatsAnimated counters for key metrics
InitiativesProject cards with hover effects
JusticeSustainabilityEnvironmental focus section
StepsToActionGuide to getting involved
FocusedActionsCall-to-action sections
ExclusiveCourseEducational program promotion
TestimonialsClient quotes with carousel
VolunteerImpactVolunteer statistics
BlogRecent articles grid
FinalCTADonation prompt section

Utility Components

ComponentPurpose
NavbarResponsive navigation with mobile menu
FooterContact info, social links
MagneticButtonPhysics-based magnetic hover effect
AnimatedCounterNumber counting animation
ScrollProgressReading progress indicator
CustomCursorBranded cursor follower
AIChatBotGemini-powered assistant
GalleryCarouselImage gallery with navigation
HistoryTimelineOrganizational history
ImpactChartsData visualization
ImpactCalculatorDonation impact calculator
DonateButtonProminent donation CTA

AI Integration

Aasha Impact Assistant

The AI chatbot is powered by Google Gemini API with custom system instructions:

Capabilities:

  • Answer questions about mission and vision
  • Explain programs and initiatives
  • Provide impact statistics
  • Guide users to donate or volunteer
  • Handle multilingual queries (Bodo, Assamese, Hindi)
  • Direct to appropriate sections

System Instructions Include:

  • Organization history and mission
  • Key programs (Skilling Bodoland, Resilient Futures, O1 Weaves, etc.)
  • Impact metrics (3,500+ volunteers, 250+ projects, 12,000+ lives)
  • Donation and volunteer information
  • Language preferences

Accessibility Features:

  • Focus trap for keyboard navigation
  • ESC key to close
  • Smooth open/close animations
  • Auto-scroll to new messages

Data Visualization

Impact Charts Components

  1. Pie Chart - Program distribution across categories
  2. Bar Chart - Annual project completion trends
  3. Line Chart - Growth trajectory over years
  4. Area Chart - Cumulative impact over time

Metrics Displayed

MetricValue
Active Volunteers3,500+
Projects Completed250+
Lives Impacted12,000+
Programs Running7+
Districts Covered15+

Interactive Features

Animated Counters

Number counters with smooth animation for key statistics:

typescript
// components/AnimatedCounter.tsx
export function AnimatedCounter({ end, suffix = '' }: CounterProps) {
  const [count, setCount] = useState(0);
  
  useEffect(() => {
    const duration = 2000;
    const steps = 60;
    const increment = end / steps;
    const stepDuration = duration / steps;
    
    let current = 0;
    const timer = setInterval(() => {
      current += increment;
      if (current >= end) {
        setCount(end);
        clearInterval(timer);
      } else {
        setCount(Math.floor(current));
      }
    }, stepDuration);
    
    return () => clearInterval(timer);
  }, [end]);

  return <span>{count.toLocaleString()}{suffix}</span>;
}

Custom Cursor

Branded cursor follower for enhanced user experience:

typescript
// components/CustomCursor.tsx
export function CustomCursor() {
  const { scrollYProgress } = useScroll();
  const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });
  
  useEffect(() => {
    const updateMousePosition = (e: MouseEvent) => {
      setMousePosition({ x: e.clientX, y: e.clientY });
    };
    window.addEventListener('mousemove', updateMousePosition);
    return () => window.removeEventListener('mousemove', updateMousePosition);
  }, []);

  return (
    <motion.div
      className="custom-cursor"
      animate={{ x: mousePosition.x, y: mousePosition.y }}
      transition={{ type: 'spring', stiffness: 500, damping: 28 }}
    />
  );
}

Deployment

Development

bash
# Install dependencies
npm install

# Set environment variables
# Create .env.local with GEMINI_API_KEY

# Run development server
npm run dev

Production Build

bash
# Build for production
npm run build

# Start production server
npm start

Environment Variables

VariableRequiredDescription
GEMINI_API_KEYYesGoogle Gemini API key for AI chatbot

Roadmap

  • Phase 1 — Core Platform (Complete) - Next.js 15, Tailwind CSS 4
  • Phase 2 — UI Components (Complete) - 18 section components
  • Phase 3 — AI Integration (Complete) - Gemini-powered chatbot
  • Phase 4 — Data Visualization (Complete) - Impact charts and metrics
  • Phase 5 — Interactive Features (Complete) - Calculator, animations
  • Phase 6 — Backend Integration (In Progress) - Donation processing
  • Phase 7 — Admin Dashboard (Planned) - Content management
  • Phase 8 — Volunteer Portal (Planned) - Registration and tracking
  • Phase 9 — Multi-language Support (Planned) - Bodo, Assamese, Hindi

Conclusion

The Aasha Foundation NGO platform delivers a modern, engaging web presence that effectively communicates the organization's mission while providing clear pathways for donations and volunteer sign-ups. The AI-powered chatbot provides instant visitor engagement, while comprehensive impact visualization helps donors understand the tangible results of their contributions.

The premium animations and interactive features create an engaging user experience that sets this NGO website apart from traditional static presentations. The mobile-responsive design ensures accessibility across all devices, while the component-based architecture enables easy maintainability and future expansion.

Architecture Feedback

Spotted a potential optimization or antipattern? Let me know.

Submit a Technical Suggestion