This is a starter kit for building an AI-powered math problem generator application. The goal is to create a standalone prototype that uses AI to generate math word problems suitable for Primary 5 students, saves the problems and user submissions to a database, and provides personalized feedback.
- Frontend Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Database: Supabase
- AI Integration: Google Generative AI (Gemini)
git clone <your-repo-url>
cd math-problem-generator- Go to https://supabase.com and create a free account
- Create a new project
- Go to Settings → API to find your:
- Project URL (starts with
https://) - Anon/Public Key
- Project URL (starts with
- In your Supabase dashboard, go to SQL Editor
- Copy and paste the contents of
database.sql - Click "Run" to create the tables and policies
- Go to Google AI Studio
- Create a new API key for Gemini
- Copy
.env.local.exampleto.env.local:cp .env.local.example .env.local
- Edit
.env.localand add your actual keys:NEXT_PUBLIC_SUPABASE_URL=your_actual_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_actual_supabase_anon_key GOOGLE_API_KEY=your_actual_google_api_key
npm installnpm run dev
Open http://localhost:3000 in your browser.