Skip to content

anay-208/learningo

Repository files navigation

Learningo 🎓

Hacktoberfest 2025 Contributions Welcome License

AI-powered quiz and lesson generator for last-minute revision - completely free! 🚀


🧭 Table of Contents


Inspiration

As a high school student, One of my struggles is last minute revision. Thinking about this Problem, I developed a solution for it.

I've noticed similar apps, but I've noticed they're like $5-10/mo, which is a lot in India considering I'm a student. I realized if I develop the app myself, it would cost me <$1 in AI Costs(For my personal use), if I exceed the free tier.


File Structure

learningo/
├── src/
│   ├── actions/
│   │   ├── generate.ts
│   │   ├── lessons.ts
│   ├── app/
│   │   ├── auth/
│   │   │   └── sign-in/
│   │   ├── api/
│   │   │   ├──auth/
│   │   │   │  └── all/
│   │   │   └── sentry-example-api/
│   │   ├── course/
│   │   │   └──id/
│   │   ├── dashboard/
│   │   ├── generate/
│   │   │   ├── id/
│   │   ├── lesson/
│   │   │   └── id/
│   ├── components/
│   │   ├── home/
│   │   ├── lesson/
│   │   └── ui/
│   ├── db/
│   ├── emails/
│   ├── lib/
│   └── styles/
├── .gitignore
├── auth-schema.ts
├── components.json
└── CONTRIBUTING.md
├── drizzle.config.ts
├── eslint.config.mjs
├── LICENSE
├── next.config.ts
├── package.json
├── pnpm-lock.yaml
├── postcss.config.mjs
├── README.md
├── sentry.edge.config.ts
├── sentry.server.config.ts
└── tsconfig.json

What it does

The Web App, Powered by Gemini Generates Lessons & Questions based on your topic, and helps you revise with MCQ Questions.


How I built it

I Used Next.js, which is a React.js framework to build it. How it works is when you go to sign-in route, It is using Magic links for authentication, powered by better-auth0, and uses resend1 to send the email. After verification, you'll be signed in, where you can generate a lesson. When you generate a lesson, it is using the Vercel's AI SDK2 to generate Lessons with Gemini API3 which'll then display in the Home Page. You can click any lesson on Home page, and once you click, It'll generate Questions using the same way, and then you can practice.


Setup Instructions

Prerequisites

  • Node.js 18+ installed
  • pnpm package manager (npm install -g pnpm)
  • A PostgreSQL database (or use a service like Neon, Supabase, etc.)
  • Google Gemini API key
  • Resend API key for email authentication

Installation

  1. Clone the repository

    git clone https://github.com/anay-208/learningo.git
    cd learningo
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    Create a .env.local file in the root directory with the following variables:

    # Database
    DATABASE_URL="your_postgresql_connection_string"
    
    # Better Auth
    BETTER_AUTH_SECRET="your_secret_key_here"
    BETTER_AUTH_URL="http://localhost:3000"
    
    # Resend (for magic link emails)
    RESEND_API_KEY="your_resend_api_key"
    
    # Google Gemini AI
    GOOGLE_GENERATIVE_AI_API_KEY="your_gemini_api_key"
    
    # Sentry (optional - only needed if you want error tracking)
    # Leave this unset for local development to prevent sending alerts
    NEXT_PUBLIC_SENTRY_DSN="your_sentry_dsn_url"
  4. In the production, Vertex AI is used, which most of the people likely won't use, so feel free to change the code in your local system to use it

  5. Set up the database

    pnpm db:push
  6. Run the development server

    pnpm dev
  7. Open your browser

    Navigate to http://localhost:3000

Getting API Keys

  • Gemini API: Get your free API key from Google AI Studio
  • Resend API: Sign up at Resend for email services
  • Database: You can use Neon, Supabase, or any PostgreSQL provider

Tech Stack

  • Framework: Next.js 15
  • Language: TypeScript
  • Database: PostgreSQL with Drizzle ORM
  • Authentication: Better Auth with Magic Links
  • AI: Google Gemini API via Vercel AI SDK
  • Email: Resend
  • Styling: Tailwind CSS
  • UI Components: shadcn/ui

Contributing

We welcome contributions for Hacktoberfest and beyond! Please read CONTRIBUTING.md for guidelines on how to contribute to this project.


What's next for Learningo

As of now, the app will remain completely free.

🔝 Back to Top

About

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •