Offline-First Learning Platform for Rural Schools
RuralEdu is a specialized educational platform designed to bridge the digital divide by ensuring learning continues even when the internet doesn't.
RuralEdu is an offline-first educational platform designed for schools in rural and low-connectivity regions.
The platform allows students and teachers to access learning content even without internet connectivity. It utilizes Progressive Web App (PWA) technology to bridge the gap between digital resources and physical limitations.
- Reliability: Guarantees uptime regardless of network status.
- Performance: Optimized for older hardware and slow data speeds.
- Accessibility: Simple, lightweight UI for diverse user groups.
| Component | Technology | Role |
|---|---|---|
| Framework | Next.js (App Router) | Handles both Frontend and Backend API routes. |
| Language | TypeScript | Ensures type safety for complex offline sync logic. |
| Persistence | PostgreSQL + Prisma | Reliable relational data storage and schema management. |
| Offline Layer | Service Workers + IndexedDB | Manages asset caching and local browser storage. |
| Caching | Redis | Speeds up server-side responses for global content. |
| Infrastructure | Docker | Standardizes the dev/prod environment. |
Annotation: This is the core engine of RuralEdu.
- Service Workers: Intercept network requests to serve cached content when offline.
- IndexedDB: Stores heavy educational content (lessons/quizzes) locally, bypassing the 5MB limits of standard LocalStorage.
- Background Sync: Automatically detects when the user regains 2G/3G connectivity and pushes queued progress to the server.
- Static Site Generation (SSG): Pre-renders lessons at build time for near-instant loading.
├── app/ # Next.js App Router (Pages & API Routes)
├── components/ # Reusable UI (Buttons, Cards, Lesson Viewers)
├── lib/ # Database clients (Prisma) and utility functions
├── public/ # PWA Manifest, icons, and static assets
├── prisma/ # Database schema and migrations
└── docker-compose.yml # Container orchestration for PG and Redis
- Node.js: v18.0 or higher
- Docker: Required for running local DB and Cache services
- npm/yarn: For dependency management
-
Clone the repository:
git clone https://github.com/kalviumcommunity/S64-jan26-Team01-Next.js-RuralEdu.git cd frontend -
Install dependencies:
npm install
-
Set up Environment Variables:
cp .env.example .env
-
Initialize the Database:
npx prisma migrate dev
-
Start the development server:
npm run dev
To spin up the entire stack (Next.js, Postgres, Redis) instantly:
docker-compose up -d- User: Stores profiles for Students and Teachers.
- Course/Lesson: Hierarchical structure for educational content.
- Quiz: Assessment metadata and questions.
- Progress: A synchronization-heavy table tracking lesson completion and scores.
- Educational Access: Removes the "Internet Tax" on education.
- Target Users: Rural schools, under-resourced communities, and mobile learners.
- Inclusivity: Supports 2G conditions and low-spec mobile devices.
Distributed under the MIT License. See LICENSE for more information.