Free AI-powered study tools for Indian school students (Class 6–10) — paragraph writer, essay writer, speech writer, leave application generator, timetable maker, grammar improver, word meaning helper, answer simplifier, quiz generator, and topic explainer.
Built with Next.js 14 (App Router), TypeScript, Tailwind CSS, and a swappable AI provider layer (OpenAI / Claude / Gemini). Supabase is used for optional accounts, generation history, and saved timetables.
User → Tool page (app/tools/[slug]/page.tsx)
→ ToolShell (client component, renders form from lib/tools-config.ts)
→ POST /api/generate
→ lib/prompts.ts (builds the prompt for that tool)
→ lib/ai.ts (calls the configured AI provider)
→ lib/supabase.ts (logs the generation, if Supabase is configured)
← { output, provider }
→ ToolShell renders result, copy / regenerate / reset
Every tool page is generated from a single dynamic route (app/tools/[slug]/page.tsx)
driven by the central registry in lib/tools-config.ts. This keeps all 10 tools
consistent (same layout, FAQ, related tools, how-to-use) while giving each one a
unique URL, <title>, meta description, and content for SEO — edit one array to
add a new tool or change copy on an existing one.
app/
layout.tsx Root layout, fonts, global metadata
page.tsx Homepage
sitemap.ts Dynamic sitemap.xml
robots.ts robots.txt
tools/
page.tsx All-tools listing page
[slug]/page.tsx Dynamic tool page (SEO + form)
api/generate/route.ts Generation endpoint (validates + calls AI + logs)
about/, contact/, privacy-policy/, terms/, disclaimer/
components/
Navbar.tsx, Footer.tsx, AdSlot.tsx, FAQ.tsx, ToolCard.tsx, ToolShell.tsx
lib/
tools-config.ts Central registry: fields, copy, FAQs per tool
prompts.ts Prompt builder per tool
ai.ts Swappable AI provider abstraction
supabase.ts Supabase client + generation logging
utils.ts Small shared helpers
types/
tool.ts Shared TypeScript types
supabase/
schema.sql Full DB schema (profiles, tool_generations, saved_timetables, feedback)
| Table | Purpose |
|---|---|
profiles |
Extends auth.users with name, class, school |
tool_generations |
One row per AI generation (analytics + history) |
saved_timetables |
Saved timetables for logged-in users |
feedback |
Contact/feedback form submissions |
Row-Level Security is enabled on every table. Run supabase/schema.sql in your
Supabase project's SQL editor to set everything up.
lib/prompts.ts exports one buildPrompt(slug, inputs) function. Internally it
shares a BASE_RULES block (school-appropriate content, class-matched vocabulary,
non-robotic tone) across every tool, then applies a tool-specific builder function.
Add a new tool by adding an entry to PROMPT_BUILDERS and a matching config in
lib/tools-config.ts.
npm install
cp .env.example .env.local
# fill in at least one AI provider key in .env.local (see below)
npm run devVisit http://localhost:3000. The app runs even with no AI key configured —
lib/ai.ts falls back to a clearly-labelled demo response so you can see the full
UI before wiring up a real provider.
| Variable | Required | Notes |
|---|---|---|
AI_PROVIDER |
No | openai, claude, or gemini. Leave unset for demo mode. |
OPENAI_API_KEY / ANTHROPIC_API_KEY / GEMINI_API_KEY |
Yes (one) | Only the key matching AI_PROVIDER is used. |
NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY |
No | Enables accounts, saved timetables, feedback form writes from the browser. |
SUPABASE_SERVICE_ROLE_KEY |
No | Server-only. Enables generation history logging from /api/generate. Never expose this to the client. |
NEXT_PUBLIC_SITE_URL |
Recommended | Used for canonical URLs, sitemap, and Open Graph tags. |
NEXT_PUBLIC_ADS_ENABLED |
No | Set to true once AdSense is approved to render <AdSlot /> placeholders. |
- Create a free project at supabase.com.
- Go to SQL Editor → New query, paste the contents of
supabase/schema.sql, and run it. - Copy your Project URL and anon key from Project Settings → API into
.env.local. - Copy the
service_rolekey (also under Project Settings → API) intoSUPABASE_SERVICE_ROLE_KEY— keep this secret, server-side only.
- OpenAI: get a key from platform.openai.com, set
AI_PROVIDER=openaiandOPENAI_API_KEY. - Claude: get a key from console.anthropic.com, set
AI_PROVIDER=claudeandANTHROPIC_API_KEY. - Gemini: get a key from Google AI Studio, set
AI_PROVIDER=geminiandGEMINI_API_KEY.
- Push this project to a GitHub repository.
- Go to vercel.com/new and import the repo.
- Add the same environment variables from
.env.localin the Vercel project settings. - Deploy. Vercel will run
next buildautomatically. - Point your custom domain (e.g.
studysprint.in) at the Vercel project, and updateNEXT_PUBLIC_SITE_URLaccordingly.
/tools/paragraph-writer/class-8style class-specific landing pages for top 5 tools- Blog: "How to Write a Good Paragraph for Class 8"
- Blog: "Best Timetable Tips for School Students"
- Blog: "How to Improve Grammar for School Answers"
- Blog: "How to Write a Leave Application to Your Principal"
- Blog: "CBSE vs ICSE: How to Write Essays for Each Board"
/tools/paragraph-writer/examples— a gallery of sample outputs by topic- Comparison/landing page: "Best AI Homework Helper for Indian Students"
/subjects/science,/subjects/social-science,/subjects/englishtopic hubs- City/board-specific landing pages if you expand into tutoring or courses later
- Debate / GD argument generator
- Story writer (for English creative writing sections)
- Letter writer (informal letters, not just leave applications)
- Notes summarizer (long chapter → bullet notes)
- Flashcard generator from a topic
- Diary entry writer
- Project report outline generator
- Publish 2–4 blog posts a week targeting long-tail, homework-style queries ("how to write a paragraph on...")
- Get each tool page indexed via Google Search Console and submit the sitemap
- Build internal links between blog posts and the relevant tool page
- Add FAQ schema (JSON-LD) to tool pages to earn rich snippets
- Share useful outputs (timetables, quizzes) as shareable images for social platforms popular with students
- Apply for AdSense once you have consistent organic traffic and full legal pages (already included)
- Turn on
NEXT_PUBLIC_ADS_ENABLED=trueand replaceAdSlotinternals with real AdSense<ins>tags - Test ad density carefully — keep
below-resultandbetween-sectionsslots only at first - Consider a lightweight "StudySprint Plus" tier (saved history, unlimited generations, no ads) once traffic is meaningful