๐ง Gaia Flashcard Generator
August 23, 2025 ยท View on GitHub
A lightweight, AI-powered flashcard application that leverages Gaia Node capabilities to create personalized learning experiences. Transform any topic into interactive flashcards with markdown support and a beautiful, modern interface.
โจ Features
- ๐ค AI-Powered Generation: Automatically create flashcards from any topic using Gaia Node
- ๐ Markdown Support: Rich text formatting with headers, lists, code blocks, and inline code
- ๐จ Modern UI: Vibrant gradient design with glassmorphism effects
- ๐ฑ Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- ๐ Interactive Cards: Smooth flip animations with 3D effects
- โก Real-time Generation: Dynamic flashcard creation with loading states
- ๐ฏ Quick Prompts: Pre-defined topic suggestions for instant learning
๐ What This App Does
Gaia Flashcards simplifies the learning process by:
- Topic Input: Enter any subject you want to learn about
- AI Processing: Uses your Gaia Node to generate relevant questions and answers
- Interactive Learning: Review flashcards with smooth flip animations
- Progress Tracking: Monitor token usage and generation statistics
Perfect for:
- ๐ Students preparing for exams
- ๐งโ๐ป Developers learning new technologies
- ๐ Educators creating study materials
- ๐ง Anyone wanting to improve memorization
๐ ๏ธ Technology Stack
- Frontend: HTML5, CSS3, Bootstrap 5.3.2, Vanilla JavaScript
- Backend: Express.js v5.1.0
- AI Integration: OpenAI SDK v5.15.0 (Gaia Node compatible)
- Runtime: Node.js v18+
- Styling: Custom CSS with gradients and glassmorphism effects
๐ Prerequisites
Before running this application, ensure you have:
- Node.js v18 or higher (Download here)
- npm (comes with Node.js)
- Gaia Node or OpenAI API access
- A modern web browser
๐ง Installation & Setup
1. Clone the Repository
git clone <repository-url>
cd gaia-flashcards
2. Install Dependencies
npm install
3. Environment Configuration
Create a .env file in the root directory (optional):
# Gaia Node Configuration
GAIA_NODE_URL=https://your-gaia-node-url.gaia.domains/v1
GAIA_API_KEY=your-api-key
Note: If you don't set these environment variables, the app will use default Gaia Node settings:
- Default URL:
https://0xee7253294f6580c32c3ed745fe578b2eb8220f46.gaia.domains/v1 - Default API Key:
gaia
4. Start the Application
npm start
# or
node server.js
5. Open in Browser
Navigate to: http://localhost:3000
๐ฎ How to Use
Basic Usage
-
Enter a Topic: Type any subject in the input field
Example: "Basics of Quantum Computing" -
Generate Flashcards: Click the "Generate Flashcards" button
-
Review Cards: Click on any flashcard to flip between question and answer
-
Try Quick Prompts: Use the suggested topics for instant learning
Advanced Features
- Markdown Content: The AI can generate flashcards with formatted text, code examples, and lists
- Multiple Topics: Generate multiple sets of flashcards for different subjects
- Token Tracking: Monitor your API usage with the token counter
๐ API Configuration
Using Your Own Gaia Node
- Replace the
GAIA_NODE_URLwith your node's URL - Set your
GAIA_API_KEYif required - Restart the server
๐ Project Structure
gaia-flashcards/
โโโ public/
โ โโโ index.html # Main application interface
โ โโโ style.css # Custom styling and animations
โโโ server.js # Express.js server and API endpoints
โโโ package.json # Dependencies and scripts
โโโ package-lock.json # Dependency lock file
โโโ README.md # This file
๐จ Customization
Changing Colors
The app uses CSS variables for easy theming. Edit public/style.css:
:root {
--primary-gradient: linear-gradient(135deg, #your-color 0%, #your-color 100%);
--secondary-gradient: linear-gradient(135deg, #your-color 0%, #your-color 100%);
/* ... more variables */
}
Modifying AI Behavior
Edit the prompts in server.js:
const questionPrompt = `Your custom prompt for generating questions...`;
const answerPrompt = `Your custom prompt for generating answers...`;
๐ Troubleshooting
Common Issues
Server won't start:
- Ensure Node.js v18+ is installed
- Check if port 3000 is available
- Run
npm installto install dependencies
Flashcards not generating:
- Verify your Gaia Node/API configuration
- Check network connectivity
- Ensure your API key has sufficient credits
UI issues:
- Clear browser cache
- Ensure JavaScript is enabled
- Try a different browser
Performance Tips
- Shorter topics generate faster
- Simple language works better with AI
- Monitor token usage to manage costs
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request