Skip to content

harikiran138/classnova

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClassNova - Complete React Project with Smooth Scrolling & Animations

A high-performance, accessibility-first educational technology platform for smart classrooms.

🎯 Project Overview

ClassNova is a modern React + TypeScript web application showcasing an affordable smart classroom solution. The project demonstrates best practices in web development, including smooth scrolling, scroll-triggered animations, offline-first design philosophy, and comprehensive design systems.

Technology Stack:

  • Framework: React 18 + TypeScript
  • Build Tool: Vite (5.4.19)
  • Styling: TailwindCSS 3.4 + custom animations
  • UI Components: Radix UI + shadcn components
  • Smooth Scrolling: Lenis (with prefers-reduced-motion support)
  • Animations: GSAP + ScrollTrigger (wired to Lenis)
  • Forms: React Hook Form + Zod validation
  • Routing: React Router v6
  • State Management: TanStack Query (React Query)
  • Icons: Lucide React
  • Notifications: Sonner toast library
  • Charts: Recharts

🚀 Quick Start

Installation

npm install

Development

npm run dev

Starts Vite dev server at http://localhost:8080

Production Build

npm run build

Outputs optimized build to /dist

Preview Built Site Locally

npm run preview

📚 What's Included in This Build

✨ Core Features Implemented

1. Lenis Smooth Scrolling

  • Modern, physics-based scroll library
  • Works seamlessly with mobile and desktop
  • Files: src/lib/use-lenis.tsx, src/lib/lenis-provider.tsx
  • Accessibility: Automatically disabled when user has prefers-reduced-motion setting enabled

2. Reduced Motion Support

  • Hook: src/lib/use-prefers-reduced-motion.ts
  • Respects system accessibility preferences
  • Disables Lenis and animations for users who prefer reduced motion
  • WCAG 2.1 compliant

3. Smart Anchor Navigation

  • Clicking navbar links smoothly scrolls to page sections using Lenis
  • No page reloads needed
  • Natural, elegant scrolling behavior
  • See: src/lib/lenis-provider.tsx (line 29-48)

4. GSAP + ScrollTrigger Integration

  • Scroll-driven animations wired to Lenis
  • Allows elements to animate based on scroll position
  • Hook: src/lib/use-gsap-scrolltrigger.ts
  • Usage: src/components/ScrollAnimationDemo.tsx

5. Scroll Animation Demo Component

  • Demonstrates IntersectionObserver-based fade-in/slide-up animations
  • Shows GSAP ScrollTrigger setup
  • Located in: src/components/ScrollAnimationDemo.tsx

6. CI/CD Pipeline

  • GitHub Actions workflow: .github/workflows/ci.yml
  • Runs on push/PR to main branch
  • Installs dependencies and builds project
  • Catches build errors early

7. Modular DIDAC Landing Sections

  • src/pages/Index.tsx now composes 18+ purpose-built sections from src/sections/*
  • Each section follows the DIDAC India 2025 blueprint with placeholder media + TODO markers
  • Easy to swap order, reuse in other routes, or hydrate with live CMS data later

8. Floating CTAs & Scroll Progress

  • src/sections/FloatingCtas.tsx exposes WhatsApp, DIDAC booking, and demo anchors
  • Includes smooth "Back to top" behavior and an accessible page-progress indicator
  • Buttons stay fixed on mobile/desktop to maximize demo conversions

📁 Project Structure

src/
├── components/
│   ├── Navigation.tsx              # Sticky navbar with anchor map
│   ├── ScrollAnimationDemo.tsx     # Animation showcase
│   └── ui/                         # Radix UI + shadcn components
├── sections/                       # Modular marketing sections (NEW)
│   ├── HeroSection.tsx
│   ├── TrustBanner.tsx
│   ├── ProblemSolutionSection.tsx
│   ├── ... (20 total per blueprint)
│   └── FloatingCtas.tsx            # WhatsApp / demo buttons + scroll progress
├── lib/
│   ├── use-lenis.tsx               # Lenis initialization hook (NEW)
│   ├── lenis-provider.tsx          # Provider component (NEW)
│   ├── lenis-context.tsx           # React context for Lenis (NEW)
│   ├── use-prefers-reduced-motion.ts # Accessibility hook (NEW)
│   ├── use-gsap-scrolltrigger.ts   # GSAP + ScrollTrigger hook (NEW)
│   └── utils.ts
├── pages/
│   ├── Index.tsx                   # Homepage (updated)
│   └── NotFound.tsx
├── hooks/
│   ├── use-mobile.tsx
│   └── use-toast.ts
├── App.tsx                         # Main app with providers
├── main.tsx                        # Entry point
└── index.css                       # Global styles

.github/
└── workflows/
    └── ci.yml                      # GitHub Actions CI (NEW)

public/
├── robots.txt
└── [favicon, assets]

🔗 Section Anchor Map

Anchor Section Component
#hero Hero + CTA HeroSection.tsx
#trust Brand trust banner TrustBanner.tsx
#problem Problem vs solution ProblemSolutionSection.tsx
#deployment 4-step setup SetupStepsSection.tsx
#features Feature grid FeatureGridSection.tsx
#hardware Hardware showcase HardwareShowcaseSection.tsx
#software Software interface SoftwareInterfaceSection.tsx
#timeline Build timeline DevelopmentTimelineSection.tsx
#team Team & advisors TeamSection.tsx
#benefits Key benefits/stats BenefitsSection.tsx
#pricing Plans PricingSection.tsx
#didac DIDAC banner DidacBannerSection.tsx
#stories Educator interviews TestimonialsSection.tsx
#impact Impact scenarios CaseStudiesSection.tsx
#transparency Metrics + risks TransparencySection.tsx
#faq Prototype FAQ FaqSection.tsx
#partners Collaborators PartnersSection.tsx
#comparison Smart board vs ClassNova ComparisonSection.tsx
#resources Briefings + downloads ResourcesSection.tsx
#demo Demo request form DemoRequestSection.tsx
#contact Footer contact FooterSection.tsx

🛠️ Key Files & Their Purpose

Lenis Integration

src/lib/use-lenis.tsx

  • Creates a Lenis instance
  • Runs RAF loop to keep Lenis updated
  • Returns ref to Lenis instance
  • Cleans up on unmount

src/lib/lenis-provider.tsx

  • Wraps app with Lenis initialization
  • Respects prefers-reduced-motion
  • Intercepts anchor link clicks to use smooth scroll
  • Exposes Lenis via React Context

src/lib/lenis-context.tsx

  • Context for accessing Lenis instance from any component
  • Useful for scroll-driven animations and advanced interactions

Accessibility

src/lib/use-prefers-reduced-motion.ts

  • Detects prefers-reduced-motion: reduce CSS media query
  • Returns boolean to disable animations
  • Updates dynamically if user changes OS settings
  • Used in LenisProvider to disable smooth scroll when needed

Animations with GSAP

src/lib/use-gsap-scrolltrigger.ts

  • Wires GSAP ScrollTrigger to Lenis
  • Creates proxy so ScrollTrigger reads scroll through Lenis
  • Syncs ScrollTrigger with Lenis scroll events
  • Cleans up triggers on unmount

src/components/ScrollAnimationDemo.tsx

  • Example of scroll-triggered animations
  • Uses IntersectionObserver for simple fade-in/slide-up
  • Integrates GSAP ScrollTrigger for scroll-sync animations
  • Demonstrates accessing Lenis via context

CI/CD

.github/workflows/ci.yml

  • Runs on every push to main
  • Installs Node 20, dependencies, and builds
  • Ensures no breaking changes merge to main
  • Easily extend to add tests, linting, etc.

🎨 Design System & Styling

Colors (Tailwind Extended)

  • Primary Orange: #FF7A00 (gradient warm)
  • Navy: #0A1628
  • Success Green: #10B981
  • Soft Blues/Purples: Custom palette
  • See tailwind.config.ts for full theme

Animations

  • Fade-in-up: 0.5s-0.7s, ease-out
  • Scale-in: 0.4s, ease-out
  • Float: Infinite gentle movement
  • Glow: Pulsing shadow effect
  • Accessible: All disabled when prefers-reduced-motion is set

Responsive Design

  • Mobile-first approach
  • Breakpoints: 640px (sm), 768px (md), 1024px (lg), 1280px (xl)
  • Container queries for flexible components
  • Touch-friendly tap targets (min 48px)

Premium UI Guidelines (2025 refresh)

Typography scale

  • H1: 52/60, bold
  • H2: 40/48, semibold
  • H3: 28/36, medium
  • Body: 18/32, regular
  • Eyebrow/caption: 12/18, uppercase, tracking 0.3em

Spacing rhythm

  • Sections: section-padding (clamp 64–96px)
  • Cards: 32px padding, 32px radius
  • Buttons: 48px min height, shared pill class
  • Grid gutters: 24px mobile, 32px desktop

Components

  • Use section-shell for all content widths
  • Cards rely on glass-panel or surface-panel
  • Primary CTA: btn-primary-pill; secondary: btn-ghost-pill
  • Keep icons, radiuses, and shadows consistent across sections

Color + balance

  • Deep navy background, soft grey/white surfaces
  • Orange reserved for CTAs/highlights; optional soft blue accent for trust states
  • Minimal gradients, generous negative space

Animation guidance

  • Default entrance: .animate-fade-up (20px lift, 0.6s)
  • Stagger cards by 80–120ms for premium feel
  • Avoid large parallax or bouncing; keep motion subtle and interruptible

Conversion & trust tips

  • Pair every CTA with a supporting line (e.g., “Wait time: 10 days”)
  • Keep testimonials short, human, and tied to real contexts
  • Surfaces referencing prototypes should mention transparency/roadmap
  • Highlight DIDAC presence + contact info in multiple sections

📊 Performance Optimizations

  • ✅ Vite fast HMR during dev
  • ✅ Code splitting via React Router
  • ✅ Lazy image loading (native browser support)
  • ✅ Tree-shaking unused code
  • ✅ Minified CSS + JS in production
  • ✅ Bundle analysis available via build output

Build Size Note: GSAP adds ~100KB to bundle. Consider lazy-loading if size becomes critical.


✅ Testing & Quality

Linting

npm run lint

ESLint checks TypeScript/TSX files for code quality.

Known Warnings (Safe):

  • Fast refresh warnings in UI library files (shadcn patterns, intentional)
  • These do not affect runtime or build

Type Checking

TypeScript strict mode enabled. All components are fully typed.

Build Verification

All recent builds succeed without errors:

  • npm run build completes in ~1.3s
  • ✓ No TypeScript errors
  • ✓ No critical ESLint errors
  • ✓ Output: ~520KB minified + gzipped

🌍 Accessibility (WCAG 2.1 AA)

Implemented:

  • Semantic HTML5 elements
  • ARIA labels on interactive components
  • Keyboard navigation (Tab, Enter, Esc)
  • Focus indicators visible
  • Color contrast ≥ 4.5:1 (WCAG AA)
  • Alt text on images
  • Form labels properly associated
  • prefers-reduced-motion respected
  • Screen reader friendly

Ready for:

  • Axe DevTools testing
  • WAVE accessibility audit
  • Lighthouse accessibility score

📱 Browser Support

Browser Min Version Status
Chrome 90+ ✅ Fully Supported
Firefox 88+ ✅ Fully Supported
Safari 14+ ✅ Fully Supported
Edge 90+ ✅ Fully Supported
iOS Safari 14+ ✅ Fully Supported
Chrome Mobile 90+ ✅ Fully Supported

🚀 Deployment

Static Hosting (Recommended for this site)

  • Build: npm run build
  • Deploy /dist folder to:
    • Vercel (with one-click GitHub integration)
    • Netlify (drop /dist or connect GitHub)
    • Cloudflare Pages
    • AWS S3 + CloudFront
    • Any static hosting provider

Environment Setup

  • No backend required
  • No environment variables needed for basic setup
  • Customize vite.config.ts for proxy/API if needed

📖 Next Steps & Improvements

Content & Design

  • Complete design system documentation in Storybook
  • Add more case studies and testimonials
  • Create blog section with markdown support
  • Add video hosting/playback optimization

Features

  • E-commerce cart for direct sales
  • Booking system with calendar integration
  • Live chat widget
  • School database search/filter
  • Mobile app landing pages

Performance

  • Add dynamic imports for GSAP (load only when scrolling features visible)
  • Image optimization pipeline (ImageOptim, Cloudinary)
  • Implement ISR if moving to Next.js
  • Service Worker for PWA capabilities

Monitoring

  • Set up error tracking (Sentry, Rollbar)
  • Analytics dashboard (Vercel Analytics, Plausible)
  • Performance monitoring (Web Vitals)
  • Conversion tracking (demo bookings, downloads)

Testing

  • Add Vitest unit tests
  • React Testing Library integration tests
  • E2E tests (Playwright, Cypress)
  • Accessibility automated testing
  • Visual regression testing

🤝 Contributing

  1. Create a feature branch: git checkout -b feature/your-feature
  2. Commit changes: git commit -m "Add feature description"
  3. Push to branch: git push origin feature/your-feature
  4. Open a Pull Request

Code Style:

  • Follow existing patterns in components
  • Use TypeScript for all files
  • Run lint before committing: npm run lint
  • Components are functional with hooks

📝 License

ClassNova © 2025. All rights reserved.

For licensing inquiries, contact: info@classnova.in


📞 Support & Contact


🎓 Learning Resources

Lenis & Smooth Scrolling

GSAP & ScrollTrigger

Accessibility

React & TypeScript

Styling & Design


📊 Project Changelog

Latest Updates (v1.1.0)

  • ✨ Added GSAP + ScrollTrigger integration
  • ✨ Added reduced-motion accessibility support
  • ✨ Added scroll animation demo component
  • ✨ Added GitHub Actions CI workflow
  • 🔧 Fixed ESLint errors (type safety improvements)
  • 📝 Expanded README with full documentation

Previous (v1.0.0)

  • 🚀 Initial Lenis smooth-scrolling integration
  • 🚀 Anchor link interception with smooth scroll
  • 📝 Basic project setup and documentation

Made with ❤️ for Indian Education. Designed for teachers, built for schools.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors