Modern full-stack rebuild of Smart Study from plain JavaScript into a Vercel + Neon architecture with server-side AI routing, persistence, installable PWA, and Android APK pipeline.

HF_API_TOKEN)GEMINI_API_KEY)HF_API_TOKEN)npm install
cp .env.example .env.local
npm run db:push
npm run dev
Required env:
DATABASE_URL=postgresql://...
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
NEXTAUTH_SECRET=...
NEXTAUTH_URL=http://localhost:3000
GEMINI_API_KEY=...
GEMINI_MODEL=gemini-2.5-flash
HF_API_TOKEN=hf_xxx
HF_MODEL_ID=mistralai/Mistral-7B-Instruct-v0.3
DATABASE_URL, HF_API_TOKEN, HF_MODEL_ID.npm run db:pushPWA files:
public/manifest.webmanifestpublic/sw.jspublic/icons/*Install prompt appears on supported browsers after first load.
Generate premium class branding assets:
npm run assets:brand
Outputs:
public/brand/premium-icon.pngpublic/brand/app-preview.gifIf GEMINI_API_KEY is set, script also attempts Gemini image generation and writes:
public/brand/premium-icon-gemini.pngThis repo includes Capacitor and CI workflow:
capacitor.config.tsmobile-web/.github/workflows/android-release.ymlOn GitHub Release publish, workflow builds app-debug.apk and attaches it to the release assets.
HF_MODEL_ID.HF_MODEL_ID.lib/ai.ts to call your endpoint/provider.Description:
AI-powered study platform with Next.js, Neon Postgres, Hugging Face inference, PWA install support, and Android APK releases.
Topics/Tags:
nextjs, typescript, vercel, neon, postgres, prisma, pwa, android, capacitor, ai, huggingface, study-app
npm run dev - local developmentnpm run build - production buildnpm run start - start servernpm run lint - lint projectnpm run db:push - push Prisma schema to Neonnpm run db:studio - open Prisma Studionpm run mobile:sync - sync Capacitornpm run mobile:open - open Android projectnpm run assets:brand - generate icon + preview GIF assetsapp/
api/
ai/
profile/
study-items/
layout.tsx
page.tsx
lib/
ai.ts
db.ts
fallback.ts
prisma/
schema.prisma
public/
icons/
manifest.webmanifest
sw.js
mobile-web/
.github/workflows/android-release.yml
Legacy plain-JS files are still present in history; v4 runtime uses the new Next.js codepath.