A web application for generating and managing flashcards using AI.
To run this application, you need to set up the following environment variables:
- Create a
.env
file in the root directory of the project. - Add the following variables:
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_key
SUPABASE_SERVICE_KEY=your_supabase_service_key (optional)
OPENAI_API_KEY=your_openai_api_key
To use the flashcard generation feature, you need an OpenAI API key:
- Sign up for an OpenAI account at https://platform.openai.com
- Navigate to your API keys section
- Generate a new API key
- Add the API key to your
.env
file asOPENAI_API_KEY
# Install dependencies
npm install
# Start the development server
npm run dev
The project uses a comprehensive testing strategy with multiple layers:
# Run unit tests
npm run test:unit
Uses Vitest with React Testing Library for:
- Component testing
- Hook testing
- Utility function testing
- API route validation testing
# Run E2E tests
npm run test:e2e
Uses Playwright for:
- Critical user flow testing
- Cross-browser testing (Chrome, Firefox, Safari, Edge)
- API integration testing
# Run API tests
npm run test:api
Uses Mocha/Chai for:
- REST endpoint testing
- Database integration testing
- Authentication flow testing
# Run all tests
npm test