A personalized micro-learning platform that adapts to your competence and engagement levels, powered by AI and built for a Hackathon.
- AI-Powered Personalization: Content adapts based on learning style and competence level
- Micro-Learning Focus: Short, focused sessions that maximize retention
- Real-time Adaptation: Content adjusts based on engagement patterns
- Progress Tracking: Detailed analytics on learning journey and competence growth
- Competence Assessment: Continuous evaluation of learning progress
- Engagement Analysis: Real-time tracking of user engagement and attention
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Supabase
- AI/ML: Groq API (Llama), Google Gemini API
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- UI Components: Framer Motion, Lucide React
Before you begin, ensure you have the following installed:
- Node.js 18+
- npm or yarn
- A Supabase account
- Groq API key
- Google Gemini API key
git clone <repository-url>
cd micro-learning-enginenpm install
# or
yarn installCopy the environment template and fill in your API keys:
cp env.template .env.localUpdate .env.local with your actual API keys:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url_here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here
# Groq API Configuration
GROQ_API_KEY=your_groq_api_key_here
GROQ_MODEL_ID=llama3-8b-8192
# Gemini API Configuration
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL_ID=gemini-pro
# Next.js Configuration
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret_here
# Application Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000
NODE_ENV=developmentThis is the magic part - we'll set up your database using JavaScript! π
npm run setup-dbThis command will:
- Connect to your Supabase project using the service role key
- Create all necessary tables, indexes, and policies
- Insert sample learning modules
- Set up Row Level Security (RLS)
No SQL client installation needed! Everything is handled through JavaScript and your Supabase environment variables.
npm run devOpen http://localhost:3000 in your browser.
micro-learning-engine/
βββ app/ # Next.js app directory
β βββ api/ # API routes
β βββ dashboard/ # Dashboard pages
β βββ learn/ # Learning module pages
β βββ demo/ # Demo page
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
βββ components/ # React components
β βββ LearningCard.tsx # Module display card
β βββ QuestionCard.tsx # Quiz question component
β βββ ProgressBar.tsx # Progress tracking
βββ hooks/ # Custom React hooks
β βββ useLearningEngine.ts
β βββ useEngagementTracking.ts
βββ lib/ # Core utilities
β βββ supabase.ts # Database client & types
β βββ groq.ts # Groq API integration
β βββ gemini.ts # Gemini API integration
β βββ learning-engine.ts # Core learning logic
βββ scripts/ # Database setup scripts
β βββ setup-database.js # JavaScript database setup
βββ types/ # TypeScript type definitions
βββ public/ # Static assets
The LearningEngine class handles:
- User competence tracking
- Content personalization
- Session management
- Progress analytics
- Engagement analysis
- Groq API: Content generation and competence assessment
- Gemini API: Engagement analysis and learning path recommendations
Real-time tracking of:
- Scroll depth
- Time on page
- Click interactions
- Pause/resume patterns
- Focus time
POST /api/learning/generate-content- Generate personalized contentPOST /api/learning/assess-competence- Assess user competencePOST /api/learning/analyze-engagement- Analyze engagement patternsPOST /api/learning/recommend-path- Get learning recommendations
- User starts a learning session
- System generates personalized content based on competence level
- User interacts with content and answers questions
- System tracks engagement and updates competence
- System recommends next learning steps
The learning engine can be customized through:
- Competence thresholds
- Engagement sensitivity
- Content difficulty levels
- Learning style preferences
Track learning progress with:
- Completion rates
- Competence scores
- Engagement metrics
- Learning velocity
- Time-to-mastery
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy!
The app can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
This project was built with the following deliverables:
- Target: B2C learners, students, professionals seeking skill development
- Pain Points: One-size-fits-all content, learning fatigue, lack of personalization
- Freemium Model: Basic features free, premium analytics and advanced AI
- Subscription Tiers: Individual, Team, Enterprise
- Revenue Streams: Subscriptions, corporate training, API licensing
- Phase 1: MVP with core features
- Phase 2: Mobile app, advanced analytics
- Phase 3: Enterprise features, white-label solutions
- Phase 4: Global expansion, AI model improvements