An intelligent, adaptive learning platform that creates personalized educational content using AI-powered content generation. Learn Flow Maze provides an interactive card-based learning experience with progressive content loading and comprehensive quiz systems.
- AI-Powered Content Generation: Leverages the Infinite-Wiki engine for enhanced learning card creation
- Progressive Loading: Content loads section by section for optimal performance on all devices
- Interactive Learning Cards: Swipe-based navigation with intuitive gestures
- Adaptive Quizzes: Both traditional and progressive quiz generation with multiple question types
- Mobile-First Design: Optimized for both desktop and mobile learning experiences
- Personalized Topics: Choose your own learning topics or get AI-generated suggestions
- Session Tracking: Comprehensive progress tracking and mastery level monitoring
This project is built with modern web technologies:
- Frontend: React 18 with TypeScript
- Build Tool: Vite for fast development and optimized builds
- UI Framework: shadcn/ui components with Tailwind CSS
- Animations: Framer Motion for smooth interactions
- AI Integration: OpenRouter API for LLM services
- Content Engine: Infinite-Wiki engine for enhanced content generation
- Node.js (v16 or higher)
- npm or yarn package manager
- Clone the repository:
git clone <repository-url>
cd learn-flow-maze- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env- Configure your OpenRouter API key in
.env:
VITE_OPENROUTER_API_KEY=your_openrouter_api_key_here- Start the development server:
npm run devThe application will be available at http://localhost:8080 (or the next available port).
The app uses OpenRouter API to access various language models. To get an API key:
- Visit OpenRouter
- Sign up for an account
- Generate an API key
- Add it to your
.envfile
The application will gracefully degrade if no API key is provided, using fallback content generation.
Progressive loading can be toggled in the UI and is automatically disabled on mobile devices for optimal performance. You can customize this behavior in the LearnSession.tsx component.
- Start Session: Enter an OpenRouter API key (or use environment configuration)
- Choose Topic: Select a topic or use AI-generated suggestions
- Learn: Interact with cards using:
- Swipe Right: "Got it!" - move to next concept
- Swipe Left: "Review" - mark for later review
- Swipe Up: "Help" - get AI tutor assistance
- Swipe Down: "Explore" - discover related topics
- Tap: Take a quick quiz
- Progressive Loading: Content loads section by section as it's generated
- Traditional Loading: Complete cards are generated before display
- Mobile devices default to traditional loading for better performance
src/
├── components/ # React components
│ ├── ui/ # Reusable UI components (shadcn/ui)
│ ├── LearningCard.tsx # Main learning card component
│ ├── LearnSession.tsx # Main session management
│ └── QuizModal.tsx # Quiz interface
├── services/ # API and business logic
│ ├── apiKeyManager.ts # Centralized API key management
│ ├── openRouterService.ts # OpenRouter API integration
│ ├── progressiveCardService.ts # Progressive loading logic
│ └── infiniteWikiService.ts # Infinite-wiki engine integration
└── hooks/ # Custom React hooks
npm run dev- Start development servernpm run build- Build for productionnpm run build:gh-pages- Build for GitHub Pages deploymentnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run type-check- Run TypeScript compiler
This project includes automated GitHub Pages deployment via GitHub Actions.
-
Fork or clone this repository to your GitHub account
-
Enable GitHub Pages in your repository:
- Go to repository Settings → Pages
- Source: Deploy from a branch
- Branch: Select
gh-pages(will be created automatically)
-
Configure API Key (Optional):
- Go to repository Settings → Secrets and variables → Actions
- Add a new repository secret:
VITE_OPENROUTER_API_KEY - Set the value to your OpenRouter API key
- Uncomment the environment variable line in
.github/workflows/deploy.yml
-
Trigger deployment:
- Push to the
mainbranch or create a pull request - GitHub Actions will automatically build and deploy to GitHub Pages
- Your app will be available at:
https://yourusername.github.io/learn-flow-maze/
- Push to the
If you encounter a 404 error when accessing your GitHub Pages site, try these solutions:
Option 1: Use the spa-github-pages solution (Default) The project includes a 404.html file and routing scripts to handle client-side routing automatically. This should work for most cases.
Option 2: Use HashRouter instead of BrowserRouter If you still get 404 errors, you can switch to HashRouter by setting an environment variable:
- Add to your
.github/workflows/deploy.ymlin the build step:
- name: Build
run: npm run build
env:
VITE_USE_HASH_ROUTER: 'true'
NODE_ENV: production- Or build locally with:
VITE_USE_HASH_ROUTER=true npm run build:gh-pagesThis will change URLs from yourusername.github.io/learn-flow-maze/ to yourusername.github.io/learn-flow-maze/#/
If you prefer manual deployment:
# Build for GitHub Pages
npm run build:gh-pages
# The dist/ folder contains the built app ready for deploymentThe built application in the dist/ folder can be deployed to any static hosting service:
- Netlify: Drag and drop the
dist/folder - Vercel: Connect your repository and set build command to
npm run build - Firebase Hosting: Use
firebase deployafter configuring - Surge.sh: Use
surge dist/command
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with React and the modern web development ecosystem
- UI components powered by shadcn/ui
- AI capabilities provided by OpenRouter API
- Enhanced content generation via Infinite-Wiki engine