A TypeScript React application that extracts flashcards from Wikipedia articles or custom text using OpenAI's API. Pre-requisites: Node.js and npm (v23.11.0).
- Install dependencies:
npm install - Set up environment: Copy
template.envto.envand add your API keys - Start development:
npm run dev
Open your browser and navigate to http://localhost:3000 (opens automatically)
- Enter a Wikipedia URL or custom text
- Toggle mock mode if needed
- Click "Generate Flashcards"
- View cards in card/list view
- Export as CSV or JSON
- Run tests:
npm test - Coverage report:
npm test -- --coverage - Run specific test:
npm test -- [test-file-path]
Enables pre-defined responses without API calls for faster development and testing. Toggle the switch in the UI before generating flashcards.