A Duolingo-style learning platform for kids aged 6-18 to learn AI and entrepreneurship through gamified experiences.
- Node.js 18+
- Supabase account
- Vercel account (for deployment)
-
Clone the repository ```bash git clone cd bloolabb ```
-
Install dependencies ```bash npm install ```
-
Set up environment variables Create a
.env.localfile with your Supabase credentials: ```env NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_service_role_key ``` -
Run database migrations Execute the SQL scripts in the
scripts/folder in order: ```bashscripts/001_create_database_schema.sql scripts/002_create_profile_trigger.sql scripts/003_seed_learning_content.sql scripts/004_seed_exercises.sql scripts/005_seed_badges.sql scripts/007_create_admin_system.sql scripts/008_security_improvements.sql scripts/009_create_admin_user.sql ```
-
Start development server ```bash npm run dev ```
- Frontend: Next.js 14 (App Router), React, TypeScript
- Styling: Tailwind CSS v4, shadcn/ui components
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth with Row Level Security
- Deployment: Vercel
``` ├── app/ # Next.js app directory │ ├── (auth)/ # Authentication pages │ ├── admin/ # Admin dashboard │ ├── dashboard/ # User dashboard │ ├── learn/ # Learning content │ └── api/ # API routes ├── components/ # Reusable components │ ├── dashboard/ # Dashboard-specific components │ ├── exercises/ # Exercise components │ ├── learn/ # Learning components │ └── ui/ # Base UI components ├── lib/ # Utility libraries │ ├── supabase/ # Supabase client configuration │ └── utils.ts # Helper functions └── scripts/ # Database migration scripts ```
- Gamified Learning: XP points, streaks, badges, leaderboards
- Interactive Exercises: Multiple choice, fill-in-blank, case studies
- Progress Tracking: Visual progress bars and completion tracking
- Multi-language Support: English, Arabic, French
- Responsive Design: Works on desktop, tablet, and mobile
- Content Management: Edit lessons, exercises, and learning tracks
- User Management: View and manage student accounts
- Analytics Dashboard: Track platform usage and student progress
- Admin Authentication: Secure role-based access control
-
Create a new lesson: ```sql INSERT INTO lessons (module_id, title, content, xp_reward, order_index) VALUES ('module-id', 'Lesson Title', 'Lesson content...', 50, 1); ```
-
Add exercises to the lesson: ```sql INSERT INTO exercises (lesson_id, type, question, options, correct_answer, explanation) VALUES ('lesson-id', 'multiple_choice', 'Question?', ARRAY['Option 1', 'Option 2', 'Option 3', 'Option 4'], 'Option 1', 'Explanation...'); ```
- Colors: Edit
app/globals.cssto modify the color scheme - Components: Modify components in
components/ui/for base styling - Layout: Update
components/dashboard/for dashboard-specific layouts
- Database: Add new exercise type to the
exercise_typeenum - Component: Create new exercise component in
components/exercises/ - Engine: Update
components/exercises/exercise-engine.tsxto handle the new type
Default Admin Credentials:
- Email:
zvmmed@gmail.com - Password: ``
Access the admin dashboard at /admin/login
GET /api/tracks- Get all learning tracksGET /api/user/profile- Get user profilePOST /api/exercises/submit- Submit exercise answersGET /api/user/progress- Get user progressPOST /api/badges/check- Check for new badges
-
Connect to Vercel: ```bash vercel --prod ```
-
Set environment variables in Vercel dashboard
-
Configure Supabase redirect URLs for production
- Create Supabase project
- Run migration scripts in order
- Enable Row Level Security on all tables
- Configure authentication settings
- Row Level Security (RLS): All database tables protected
- Admin Role Verification: Middleware checks admin permissions
- Input Validation: All user inputs validated and sanitized
- Rate Limiting: API endpoints protected against abuse
- Authentication Loop: Check middleware configuration and Supabase setup
- Database Errors: Ensure all migration scripts ran successfully
- Admin Access: Verify admin user was created with correct permissions
- Styling Issues: Check Tailwind CSS configuration and custom properties
Add console logs with console.log("[v0] message") for debugging.
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Make changes and test thoroughly
- Submit a pull request with detailed description
This project is proprietary software owned by bloolabb. All rights reserved.
For technical support or questions:
- Create an issue in the repository
- Contact the development team
- Check the troubleshooting section above
Made with ❤️ for amazing kids learning AI and entrepreneurship!