Skip to content

adityak74/leanlearn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

leanlearn Logo

πŸŽ“ leanlearn

License: ISC Node.js Version Cloudflare Pages React Router Better Auth Deploy to Cloudflare

leanlearn is a modern, high-performance Learning Management System (LMS) built for speed and simplicity. It leverages a Cloudflare-native stack (Pages, D1, Workers) to provide a "Lean" experience for both learners and developers.

Explore the Docs Β· Report Bug Β· Request Feature


πŸ“Έ Preview

Get Started
Get Started with leanlearn

Dashboard
Intuitive Student Dashboard

Course Complete
Course Completion View

Certificate
Generated Digital Certificate

User Profile
Detailed Learner Profile & Progress

Sign In
Secure Authentication

✨ Key Features

  • πŸ” Robust Authentication: Secure Google OAuth integration powered by Better Auth.
  • πŸ“– Structured Learning: Hierarchical courses, chapters, and activities (Text/Video).
  • πŸ“ˆ Progress Persistence: Real-time progress tracking with automatic saving to Cloudflare D1.
  • πŸŽ“ Automated Certification: Earn printable A4 landscape certificates upon 100% course completion.
  • πŸ“Š Learner Profile: Aggregated statistics including average progress and earned certificates.
  • ⚑ Performance Optimized: Parallel data fetching, aggressive asset caching, and minimal bundle size.

πŸ›  Tech Stack

πŸš€ Getting Started

Prerequisites

  • Node.js >= 20
  • Cloudflare Wrangler CLI

Quick Setup

  1. Clone the repository:

    git clone https://github.com/adityak74/leanlearn.git
    cd leanlearn
  2. Install dependencies:

    npm install
  3. Configure Environment: Create a .dev.vars file for local development:

    BETTER_AUTH_SECRET="your_secret"
    BETTER_AUTH_URL="http://localhost:5173"
    GOOGLE_CLIENT_ID="your_google_id"
    GOOGLE_CLIENT_SECRET="your_google_secret"
  4. Initialize Local Database:

    npx drizzle-kit push --config=drizzle.dev.config.ts
    node scripts/seed-local.js
  5. Start Developing:

    npm run dev

For detailed instructions, see the Setup Guide.

πŸ“ Project Structure

β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ db/          # Schema and Database Helpers
β”‚   β”œβ”€β”€ lib/         # Shared libraries (Auth client, etc.)
β”‚   β”œβ”€β”€ routes/      # Page routes and API endpoints
β”‚   β”œβ”€β”€ styles/      # Global styling (app.css)
β”‚   β”œβ”€β”€ root.tsx     # Root layout and global providers
β”‚   └── server.ts    # Hono server entry point
β”œβ”€β”€ migrations/      # D1 migration files
β”œβ”€β”€ scripts/         # Seeding and maintenance scripts
β”œβ”€β”€ tests/           # Vitest integration tests
└── wrangler.jsonc   # Cloudflare deployment config

πŸ§ͺ Testing

Run the automated test suite to verify business logic:

npm test

☁️ Deployment

One-Click Deploy

You can deploy this entire stack (including D1 database setup) directly to Cloudflare using the button below:

Deploy to Cloudflare

Manual Deployment

Deploy to Cloudflare Pages manually using the Wrangler CLI:

npm run deploy

Note: Ensure you have your D1 database and KV namespaces configured in wrangler.jsonc before manual deployment.

πŸ“„ License

Distributed under the MIT License. See LICENSE.md for more information.


Built with ❀️ by Aditya Karnam

About

πŸŽ“ A modern, high-performance LMS built for speed and simplicity. Leverages a Cloudflare-native stack (Pages, D1, Workers, React Router v7) for a "Lean" experience. ⚑

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors