- Right click
- Paste
- Click Generate Results
And there you go! Ready to go flashcards for studying. Built for desktop (not mobile)
- UI made with react and built with vite
- Hosted on vercel
- AI supported by openrouter
- Storage with neon
- Deck creation
- Google authentication and deck saving
- Deck renaming, editing, and deletion
- Dark/light theming
- Node.js (v18 or higher)
- Git
- A Vercel account
- A Neon database account integrated with Vercel
- An OpenRouter API key
-
Clone the repository
git clone https://github.com/cyan-ding/flashcard-ai.git cd flashcard-ai
-
Install dependencies
npm install
-
Environment Configuration
Create a
.env.local
file in the root directory with the following variables for google auth:VITE_CLIENT_ID="your_google_client_id" VITE_CLIENT_SECRET="your_google_client_secret"
-
Vercel Configuration
- Push your code to a new github repository (or fork this one)
- Make a new project in Vercel
- Import your github repo
- Create environmental variables in Vercel:
api_key="your_openrouter_key"
-
Database Setup
- Create a new project in Neon using Vercel native integration
- New environmental variables should have been created by default if you are deploying with Vercel.
-
Start the Development Server
npm run dev
-
Deploy with Vercel
- Push your code to GitHub
- Import the repository in Vercel
- Make sure your environment variables are in the Vercel dashboard
- Deploy!
- If you encounter database connection issues, verify you have a
DATABASE_URL
in Vercel environment variables. - For API errors, check your OpenRouter API key and quota. By default, OpenRouter limits free models to 50 requests/day, unless you have purchased 10 credits, which raises the limit to 1000 requests/day for free models. Also check Vercel logs for errors from the app's serverless functions.
- Make sure all environment variables are properly set.
For issues or questions about self-hosting, please open an issue in the GitHub repository.