Skip to content

NDB-7/flexnotes

Repository files navigation

✨ FlexNotes - AI-Powered Study Set Generator

Generate quizzes, flashcards, and concise notes from your study material with the click of a button.

Demo

🧠 Purpose & Technical Challenges

I built FlexNotes so I could prepare for exams efficiently using active recall, saving time by having AI create and format study material for me. Once I realized this app could benefit other students, I worked on scaling and promoting it, diversifying the generated material.

1. The ETL Pipeline

The biggest challenge was supporting a variety of data sources and saving the generated content in a relational format for the database.

  • Extraction: Handling different data sources, including scraping text from web pages, transcribing videos with YouTube’s API, extracting data from Office files, and fetching linked files with Google Drive’s API.
  • Transformation: Testing out various schemas and picking the most robust, ensuring reliable, accurate generation from the Gemini API.
  • Loading: Storing the generated results as relational data in the SQL database, linked to the correct user account and organized optimally for fast queries.

2. User Account/Data Management

A key priority was giving the user control over their data, allowing them to delete their account, data, and cancel their subscription. Implementing a reliable subscription system through the Stripe API required thorough testing and validation to ensure that a user’s permissions are always synced with their subscription status.

🛠️  Tech Stack

  • React + Next.js for fast development, load times, and API routes
  • PostgreSQL + Supabase for file storage and saving user data
  • Google Gemini API for generating structured study sets
  • Stripe API for handling payments and permissions for paid users

⚙️ Quick Start

Follow these steps to run the project locally:

  1. Clone the repository:
git clone https://github.com/NDB-7/FlexNotes.git
cd FlexNotes
  1. Install dependencies:
npm install
  1. Set up environment variables: Create a .env.local file in the root directory and add the necessary API keys and database credentials.
# Supabase Database (create a Supabase project and click the "Connect" button)
DATABASE_URL="..."
DIRECT_URL="..."

# Supabase Auth (in "Authentication" section of Supabase project settings)
NEXT_PUBLIC_SUPABASE_URL="..."
NEXT_PUBLIC_SUPABASE_ANON_KEY=""..."
SUPABASE_SERVICE_KEY="..."

# Google API Keys (generate Gemini key in Google AI Studio and Drive key on GCP)
GEMINI_API_KEY="..."
DRIVE_API_KEY="..."

# Webhook (used for receiving feedback)
WEBHOOK_URL="..."

# Current URL (used for auth redirect)
NEXT_PUBLIC_CURRENT_URL="http://localhost:3000"

# Stripe (use the Stripe CLI to generate)
STRIPE_SECRET_KEY="..."
STRIPE_WEBHOOK_SECRET="..."
  1. Run the development server:
npm run dev

About

An AI tool converting your lectures and notes into study sets!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published