Skip to content

Srasti527/Easy-

Repository files navigation

EASYเค•เค•เฅเคทเคพ (Easy Classroom)

A comprehensive virtual classroom application designed specifically for rural diploma colleges facing challenges like low bandwidth, unreliable internet connectivity, and limited infrastructure.

๐ŸŒŸ Features

โœ… Mobile-First Design

  • Optimized for entry-level smartphones
  • Responsive interface that works on any device
  • Touch-friendly controls and navigation

โœ… Low Bandwidth Optimization

  • Adaptive audio streaming (16-128 kbps)
  • Video compression with quality adaptation
  • Offline-first architecture
  • Progressive Web App (PWA) capabilities

โœ… Audio-Focused Learning

  • High-quality audio transmission with minimal data usage
  • Noise reduction for rural environments
  • Audio-only session mode for 2G networks
  • Downloadable audio content

โœ… Interactive Features

  • Real-time polls and quizzes
  • Discussion boards with offline sync
  • Quiz results tracking
  • Engagement analytics

โœ… Offline Capabilities

  • Download sessions for offline viewing
  • Offline quiz completion with sync
  • Cached content for poor connectivity
  • Smart background sync

โœ… Educator Dashboard

  • Simple session creation and management
  • Minimal training required interface
  • Content upload with compression
  • Student engagement tracking

โœ… Rural-Specific Solutions

  • Connection quality adaptation
  • Graceful degradation for poor networks
  • Off-peak download recommendations
  • Local data storage optimization

๐Ÿ—๏ธ Architecture

Frontend

  • Next.js 14 - React framework with App Router
  • TypeScript - Type safety and better developer experience
  • Tailwind CSS - Utility-first CSS framework
  • Service Worker - Offline functionality and caching

Backend

  • Next.js API Routes - Serverless backend functions
  • SQLite - Lightweight database for rural deployment
  • better-sqlite3 - High-performance SQLite driver

Key Technologies

  • Web Audio API - Audio processing and streaming
  • IndexedDB - Client-side storage for offline content
  • WebRTC - Real-time communication (future enhancement)
  • Progressive Web App - Native app-like experience

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Git

Installation

  1. Clone the repository

    git clone <repository-url>
    cd EASYkaksha
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env.local

    Configure the following variables:

    DATABASE_PATH=./data/rural_classroom.db
    NEXTAUTH_SECRET=your-secret-key
    NEXTAUTH_URL=http://localhost:3000
  4. Initialize the database

    npm run db:init
  5. Start the development server

    npm run dev
  6. Open your browser Navigate to http://localhost:3000

๐Ÿ“ฑ Progressive Web App

Installing on Mobile Devices

  1. Android Chrome:

    • Open the app in Chrome
    • Tap the menu button (โ‹ฎ)
    • Select "Add to Home Screen"
    • Confirm installation
  2. iOS Safari:

    • Open the app in Safari
    • Tap the Share button
    • Select "Add to Home Screen"
    • Name your app and tap "Add"
  3. Desktop:

    • Look for the install prompt in the address bar
    • Click "Install" when prompted

๐ŸŽฏ Usage Guide

For Students

  1. Joining Sessions:

    • Browse active sessions on the homepage
    • Click "Join Live Session" for real-time classes
    • Use "Audio Only" mode for low bandwidth
  2. Offline Learning:

    • Go to Downloads section
    • Download content during off-peak hours (11 PM - 6 AM)
    • Access downloaded content without internet
  3. Interactive Features:

    • Participate in live polls during sessions
    • Complete quizzes (works offline)
    • Ask questions in discussion boards

For Educators

  1. Creating Sessions:

    • Access the Educator Dashboard
    • Click "New Session"
    • Choose audio-only for rural areas
    • Schedule for optimal connectivity times
  2. Content Management:

    • Upload compressed audio files
    • Create downloadable materials
    • Set up interactive polls and quizzes
  3. Monitoring Engagement:

    • Track student participation
    • View connection quality statistics
    • Adjust content based on network conditions

๐Ÿ”ง Configuration

Audio Quality Presets

export const AUDIO_PRESETS = {
  ultraLow: { bitrate: 16, sampleRate: 22050 }, // 2G networks
  low: { bitrate: 32, sampleRate: 44100 },      // Unstable 3G
  medium: { bitrate: 64, sampleRate: 44100 },   // Stable 3G/4G
  high: { bitrate: 128, sampleRate: 44100 }     // Good connection
}

Connection Quality Thresholds

// Latency-based quality detection
if (latency > 1000) quality = 'poor'
else if (latency > 500) quality = 'fair'
else quality = 'good'

๐Ÿ› ๏ธ Development

Project Structure

src/
โ”œโ”€โ”€ app/                 # Next.js App Router
โ”‚   โ”œโ”€โ”€ api/            # API routes
โ”‚   โ”œโ”€โ”€ educator/       # Educator dashboard
โ”‚   โ””โ”€โ”€ globals.css     # Global styles
โ”œโ”€โ”€ components/         # React components
โ”‚   โ”œโ”€โ”€ ui/            # UI components
โ”‚   โ”œโ”€โ”€ layout/        # Layout components
โ”‚   โ”œโ”€โ”€ sessions/      # Session-related components
โ”‚   โ”œโ”€โ”€ interactive/   # Polls, quizzes
โ”‚   โ”œโ”€โ”€ media/         # Audio/video components
โ”‚   โ””โ”€โ”€ downloads/     # Download management
โ”œโ”€โ”€ lib/               # Utility libraries
โ”œโ”€โ”€ types/             # TypeScript type definitions
โ”œโ”€โ”€ utils/             # Helper functions
โ””โ”€โ”€ hooks/             # Custom React hooks

Key Components

  • AudioPlayer: Adaptive audio streaming with offline support
  • SessionList: Real-time session management with filtering
  • QuizComponent: Interactive quizzes with offline sync
  • DownloadManager: Offline content management
  • ConnectionStatus: Real-time connectivity monitoring

Database Schema

The application uses SQLite with the following key tables:

  • users - User management
  • sessions - Session data
  • session_participants - Attendance tracking
  • messages - Chat and discussions
  • quizzes / quiz_results - Assessment system
  • downloadable_content - Offline resources
  • offline_sync_queue - Rural network sync management

๐ŸŒ Deployment

Production Deployment

  1. Build the application

    npm run build
  2. Environment setup

    NODE_ENV=production
    DATABASE_PATH=/var/lib/rural-classroom/database.db
  3. Deploy options:

    • Vercel: npm run deploy:vercel
    • Local Server: npm start
    • Docker: docker build -t rural-classroom .

Rural College Deployment

For rural colleges with limited infrastructure:

  1. Local Server Setup:

    # Install on local server/laptop
    git clone <repo>
    npm install --production
    npm run build
    
    # Start with PM2 for reliability
    npm install -g pm2
    pm2 start npm --name "rural-classroom" -- start
  2. Network Setup:

  3. Offline Package:

    • Pre-download course materials
    • Set up local content server
    • Sync during internet availability windows

๐Ÿ“Š Performance Optimization

Bandwidth Optimization

  • Images served as WebP with fallbacks
  • CSS and JS minification
  • Gzip compression enabled
  • Lazy loading for non-critical content

Caching Strategy

  • Static assets cached for 1 year
  • API responses cached for 5 minutes
  • Offline-first service worker implementation
  • Smart background sync for rural networks

Mobile Performance

  • Code splitting for faster initial loads
  • Optimized bundle sizes
  • Touch gesture optimization
  • Battery usage minimization

๐Ÿ› Troubleshooting

Common Issues

  1. Audio not playing:

    • Check browser audio permissions
    • Verify Web Audio API support
    • Try different audio format
  2. Offline content not syncing:

    • Check service worker registration
    • Verify IndexedDB support
    • Clear browser cache and retry
  3. Poor video quality:

    • Switch to audio-only mode
    • Check connection quality indicator
    • Try during off-peak hours

Browser Compatibility

  • Chrome 80+ (recommended)
  • Firefox 75+
  • Safari 13+
  • Edge 80+

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly on mobile devices
  5. Submit a pull request

Development Guidelines

  • Follow TypeScript best practices
  • Ensure mobile responsiveness
  • Test offline functionality
  • Consider rural network conditions
  • Add appropriate error handling

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Designed for rural diploma colleges across India
  • Built with accessibility and low-bandwidth scenarios in mind
  • Inspired by the challenges of digital divide in education
  • Thanks to the open-source community for the tools and libraries

๐Ÿ“ž Support

For technical support or questions:


EASYเค•เค•เฅเคทเคพ - Bridging the educational divide, one connection at a time. ๐ŸŒฑ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors