Smart-Study

Smart Study Hub v4

Next.js TypeScript Neon Prisma PWA Ready Android APK

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.

Smart Study Preview

Live Stack

Core Features

Quick Start

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

Deploy To Vercel + Neon

  1. Import this repo in Vercel.
  2. Add DATABASE_URL, HF_API_TOKEN, HF_MODEL_ID.
  3. Provision Neon DB and copy connection string.
  4. Run Prisma schema push once:
    • local: npm run db:push
    • or Vercel build command extension if preferred.

PWA

PWA files:

Install prompt appears on supported browsers after first load.

Brand Assets (Icon + GIF)

Generate premium class branding assets:

npm run assets:brand

Outputs:

If GEMINI_API_KEY is set, script also attempts Gemini image generation and writes:

Android APK (Real Native Package)

This repo includes Capacitor and CI workflow:

On GitHub Release publish, workflow builds app-debug.apk and attaches it to the release assets.

Hugging Face / Custom Model Notes

Repo Description & Tags (GitHub settings suggestion)

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

Scripts

Project Structure

app/
  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.