Generate quizzes, flashcards, and concise notes from your study material with the click of a button.
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.
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.
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.
- 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
Follow these steps to run the project locally:
- Clone the repository:
git clone https://github.com/NDB-7/FlexNotes.git
cd FlexNotes
- Install dependencies:
npm install
- 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="..."
- Run the development server:
npm run dev
