Skip to content

Open Curriculum Library of Bangladesh a wiki for the national curriculum of Bangladesh, which has free academic learning resources for every single Bangladeshi on the surface of this planet. It is free, open source and community managed.

Notifications You must be signed in to change notification settings

captainaraf/oclb

Repository files navigation

Approximately 90% of the source code was written by AI, there is no point in being slow and inefficient simply to manually code everything. What matters is delivering value to people.

OCLB (Open Curriculum Library Bangladesh)

Mobile-first, open-source knowledge platform for Bangladesh national curriculum students.

What this implementation includes

  • Class → Group → Subject → Chapter → Topic curriculum hierarchy in Supabase
  • Topic-wise article system with Markdown + LaTeX support
  • Contributor tracking per article
  • Reputation-based contribution workflow
  • Proposal and approval flow for low-reputation users
  • Product suggestion system where any user/visitor can submit feature requests, updates, and bug reports
  • AI actions via Groq GPT OSS 120B:
    • Generate missing article drafts
    • Review and improve existing articles
    • Step-by-step problem solver
    • Topic recommendation from a student problem description
  • Google OAuth-only authentication (via Supabase)
  • Profile page (reputation, edit history, proposals)
  • Admin panel:
    • Monitor users
    • Manually set reputation
    • Update user roles
    • Review proposals
    • Review/manage product suggestions (status, priority, notes)
    • Manage class/group/subject/chapter/topic records

Stack

  • Next.js App Router + TypeScript
  • Supabase (Postgres + Auth + RLS + RPC)
  • Groq API using GPT OSS 120B
  • react-markdown + remark-math + rehype-katex

Data model note

  • One topic = one article.
  • Final model is topic-only: content is stored in curriculum_topics.body_markdown.
  • No separate articles table is used in the final schema, so duplicate article rows per topic are impossible.
  • Topic title is the content title; topic body_markdown is the content body.

Setup

  1. Install dependencies:
npm install
  1. Configure environment:
cp .env.example .env.local

Fill all values in .env.local.

  1. In Supabase SQL editor, run files in this order:

  2. supabase/migrations/202602200001_initial.sql

  3. supabase/seed/202602200002_curriculum_seed.sql

  4. supabase/seed/202602200003_content_seed.sql

  5. In Supabase Auth settings:

  • Enable Google provider
  • Set callback URL to: https://YOUR_DOMAIN/auth/callback (or http://localhost:3000/auth/callback for local)
  1. Run dev server:
npm run dev

Google login policy

No email/password flows are implemented. Contribution actions require Google OAuth session.

Reputation behavior

  • High-reputation users can publish directly.
  • Others can still propose changes.
  • Qualified reviewers approve/reject proposals.
  • Rewards are tracked in reputation_events and aggregated in user_profiles.reputation.
  • Thresholds and reward values are configurable in reputation_policy.

AI note

AI-generated content is intentionally routed through contributor moderation flow to keep factual quality aligned with syllabus expectations.

About

Open Curriculum Library of Bangladesh a wiki for the national curriculum of Bangladesh, which has free academic learning resources for every single Bangladeshi on the surface of this planet. It is free, open source and community managed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published