Enhanced Version with Improved UI/UX & Gemini 2.5 Flash Integration
A modern, beautifully designed web application that transforms your study materials into interactive flashcards using Google's Gemini 2.5 Flash AI model.
-
Fixed API Integration
- β Now using Gemini 2.5 Flash (gemini-2.5-flash-preview) - no more bad request errors
- β Correct API endpoint implementation
- β Better error handling with helpful messages
- β API key validation on startup
- β 90-second timeout for longer content
-
Natural Scrollbars
- β Beautiful, native-looking scrollbars throughout the app
- β Properly positioned on the right edge
- β Smooth gradient colors matching the theme
- β WebKit and Firefox support
-
Study-Focused Design
- π― Calming color scheme: Deep blues and teals for focus
- π Active learning colors: Warm golds for answers, greens for progress
- π§ Serene gradients: Creating a peaceful study environment
- β¨ Professional polish: Subtle textures, shadows, and animations
-
Enhanced Responsiveness
- π± Perfect on all devices (mobile, tablet, desktop)
- π Smooth transitions and interactions
- π Touch-friendly controls
- π¨ Adaptive layouts
-
Better User Experience
- π‘ Helpful error messages with troubleshooting tips
- β‘ Faster feedback and loading states
- π― Clear visual hierarchy
- βΏ Improved accessibility
- Node.js (v18 or higher)
- npm or yarn
- A Gemini API key from Google AI Studio
-
Get Your Gemini API Key
1. Visit https://makersuite.google.com/app/apikey 2. Sign in with your Google account 3. Click "Create API Key" 4. Copy the generated key -
Install Dependencies
npm install
-
Configure API Key
Create a
.envfile in the root directory:GEMINI_API_KEY=your_actual_api_key_hereβ οΈ Important: Replace with your real API key! -
Start the Backend Server (Terminal 1)
npm run server
You should see:
================================= β FlashGen Backend Server π‘ Running on port 3001 π API Key: Configured β π€ Model: Gemini 2.5 Flash ================================= -
Start the Frontend (Terminal 2)
npm run dev
Open your browser to:
http://localhost:5173
- Copy your study notes or educational content
- Paste it into the text area (minimum 50 characters, ideal: 500-2000)
- Click "β¨ Generate Flashcards"
- Click "π Upload a file"
- Select a
.txt,.pdf,.docx, or.pptxfile - Wait for file confirmation
- Click "β¨ Generate Flashcards"
- π Click any card to flip between question and answer
βοΈ Use "Previous" and "Next" to navigate- β Mark cards as "Learned" to track progress
- π₯ Download as PDF for offline studying
- π Start over to reinforce learning
Primary Colors:
- Deep Focus Blue (#4a7ba7 β #6ea8d4): Questions - promotes concentration
- Knowledge Gold (#f39c12 β #feca57): Answers - warm and encouraging
- Success Green (#27ae60 β #82e0aa): Learned cards - positive reinforcement
Background:
- Calming gradient from deep blue to soft teal
- Creates a serene, distraction-free study space
- Reduces eye strain during long study sessions
Interactive Elements:
- Smooth transitions for focused experience
- Subtle shadows for depth without distraction
- Hover effects that guide without overwhelming
Solution:
- Ensure backend is running:
npm run server - Check terminal for "Server running on port 3001"
- Verify no other app is using port 3001
- Try restarting both servers
If you see "Bad Request" or "API Error":
-
Check your API key:
- Open
.envfile - Ensure format:
GEMINI_API_KEY=your_key(no spaces or quotes) - Verify key is valid at Google AI Studio
- Open
-
Ensure API is enabled:
- Go to Google Cloud Console
- Enable "Generative Language API"
- Check billing is configured (free tier available)
-
Try generating a new API key:
- Sometimes keys expire or have issues
- Create a fresh key and update
.env - Restart the backend server
| Problem | Solution |
|---|---|
| PDF not working | Ensure it's text-based, not scanned images. Try .docx instead |
| No text extracted | File may be corrupted. Try copying text manually |
| File too large | Keep files under 10MB. Use .txt for large content |
| Format not supported | Use .txt, .pdf, .docx, or .pptx only |
If generation is slow:
- Reduce text length (500-2000 characters is optimal)
- Check your internet connection
- Ensure backend server isn't overloaded
- Try closing other applications
Works perfectly on:
- π± Mobile phones (320px - 767px)
- π± Tablets (768px - 1024px)
- π» Laptops (1025px - 1399px)
- π₯οΈ Desktops (1400px+)
- π Smart Displays (Google Nest Hub, etc.)
- React 19
- Vite (Rolldown)
- CSS3 with modern gradients and animations
- Axios for API calls
- Node.js
- Express 5
- Google Gemini 2.5 Flash API
- Mammoth (DOCX)
- PDF.js (PDF)
- JSZip (PPTX)
-
Content Quality
- Use well-structured notes with clear concepts
- Include definitions, explanations, and examples
- Minimum 50 characters, ideal 500-2000
- Break very long content into sections
-
File Preparation
- PDF: Must be text-based (not scanned images)
- Word/PowerPoint: Clean up formatting first
- Remove unnecessary images or graphics
- Keep file size under 10MB
-
Studying Tips
- Review all cards before marking as learned
- Use the flip feature to actively recall
- Download PDF for offline review
- Reset and repeat for spaced repetition
- β Files processed locally in your browser
- β Only text sent to Gemini API for generation
- β No data stored on servers
- β API key kept secure in .env (never committed to git)
- β HTTPS recommended for production
- Large Files: Files over 5MB may be slow to process
- Scanned PDFs: Won't work - needs OCR conversion first
- Complex Layouts: Some PPTX layouts may not extract all text
- API Rate Limits: Gemini API has free tier limits
- Internet Required: Needs connection for AI generation
| Format | Extension | Notes |
|---|---|---|
| Text | .txt | Plain text files - most reliable |
| Must be text-based, not scanned | ||
| Word | .docx | Modern Word documents (not .doc) |
| PowerPoint | .pptx | Modern PowerPoint (not .ppt) |
- .doc (old Word) - convert to .docx
- .ppt (old PowerPoint) - convert to .pptx
- Image files (.jpg, .png) - use OCR first
- Scanned PDFs - convert or use text extraction tool
npm run buildThe built files will be in the dist directory.
For production, set:
GEMINI_API_KEY=your_production_key
NODE_ENV=production
PORT=3001
Feel free to:
- π Report bugs
- π‘ Suggest features
- π§ Submit pull requests
- π Improve documentation
MIT License - free for personal and educational use.
- Google Gemini Team for the amazing AI API
- React team for the powerful framework
- All open-source contributors
- The study community for feedback and ideas
Before asking for help:
- β Backend server running on port 3001?
- β Frontend running on port 5173?
- β .env file has valid API key?
- β Tried with simple text input?
- β Checked browser console (F12) for errors?
- β Checked backend terminal for messages?
- Check this README's troubleshooting section
- Look at browser console errors (F12)
- Check backend terminal output
- Verify all dependencies installed (
npm install) - Try with a fresh API key
Made with β€οΈ for students worldwide
Version 2.0 - Enhanced UI/UX Edition
Last Updated: February 2026
- β¨ AI-powered flashcard generation
- π¨ Beautiful, calming study-focused design
- π± Fully responsive on all devices
- π Multiple file format support
- π Progress tracking with visual counters
- π₯ PDF export for offline studying
- π― Natural, accessible UI
- β‘ Fast and reliable
- π Privacy-focused
- π Free to use
Start studying smarter today! π