An intelligent flashcard generation platform with FastAPI backend and React frontend. Generate flashcards from PDFs or text using OpenAI's GPT-4o.
- Python 3.8+
- Node.js 18+
- ffmpeg (for audio processing) - Install with
brew install ffmpeg(macOS) orapt-get install ffmpeg(Linux) .envfile with your Supabase and OpenAI credentials (seeenv.example)
- Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Start the backend server
uvicorn main:app --reload --host 0.0.0.0 --port 8000The backend will be available at:
- API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Navigate to frontend directory
cd Frontend- Install dependencies
npm install- Start the development server
npm run devThe frontend will be available at:
- Frontend: http://localhost:8080 (or the port shown in terminal)
You can start both backend and frontend with one command:
./start-all.shThis script will:
- Start the backend on port 8000
- Start the frontend on port 8080
- Display both access URLs
- Generate flashcards from PDFs or text using AI
- Create decks manually with custom flashcards
- Edit existing decks and flashcards
- Multiple question types: MCQ, True/False, Free Response
- AI-powered answer evaluation
- User authentication with JWT
- Speech-to-text support for free response
- Deck management and study sessions
Make sure your .env file contains:
SUPABASE_URLSUPABASE_KEYSUPABASE_SERVICE_KEYOPENAI_API_KEYJWT_SECRET_KEY
See env.example for reference.
The application requires the following database columns:
decks.order_index- For folder-based deck ordering and podcast autoplayflashcards.audio_url- For voice mnemonic recordings
These should already be set up in your Supabase database. If you're setting up a new database, ensure these columns exist.
Once the backend is running, visit http://localhost:8000/docs for interactive API documentation.