
RubricAI is a powerful Next.js application designed for educators and students to evaluate assignments against custom rubrics using Genkit AI. It features batch processing, Cloudinary file storage, and academic integrity monitoring.
RubricAI is a full-stack web application that lets educators evaluate student assignments against custom rubrics using Google's Gemini AI (via Genkit). Upload documents in bulk, get structured per-criterion scores with actionable feedback, detect originality issues, and archive every report in a private evaluation library.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) + React 19 |
| AI | Genkit + Google Gemini (@genkit-ai/google-genai) |
| Database | Firebase Firestore (evaluations) · PostgreSQL via Prisma (auth) |
| Auth | Firebase Anonymous Auth + better-auth |
| File Storage | Cloudinary (PDF / DOCX / TXT uploads) |
| UI | shadcn/ui (Radix UI primitives) + Tailwind CSS |
| Deployment | Firebase App Hosting |
low risk, moderate risk, or needs review./library page./evaluation/[id].src/
├── ai/
│ ├── flows/
│ │ ├── parse-rubric-flow.ts # Structures free-form rubric text
│ │ ├── evaluate-assignment-flow.ts # Scores assignment against rubric
│ │ ├── detect-originality-issues-flow.ts # Originality analysis
│ │ └── provide-multilingual-feedback-flow.ts
│ └── genkit.ts # Genkit + Gemini configuration
├── app/
│ ├── (root)/
│ │ ├── page.tsx # Main evaluation workspace
│ │ ├── library/page.tsx # Evaluation history archive
│ │ └── evaluation/[id]/ # Individual report view
│ └── (auth)/api/ # better-auth API routes
├── components/
│ ├── EvaluationForm.tsx
│ ├── EvaluationResults.tsx
│ ├── EvaluationHistory.tsx
│ └── Header.tsx
├── firebase/ # Firestore hooks & Firebase config
└── prisma/schema.prisma # User / Session / Account models
bashpnpm install # or npm install
Create a .env file in the project root:
env# Google Gemini / Genkit GEMINI_API_KEY=your_gemini_api_key # Firebase (client-side) NEXT_PUBLIC_FIREBASE_API_KEY= NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN= NEXT_PUBLIC_FIREBASE_PROJECT_ID= NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET= NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID= NEXT_PUBLIC_FIREBASE_APP_ID= # Cloudinary NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloud_name NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET=your_unsigned_preset # PostgreSQL (for better-auth) DATABASE_URL=postgresql://user:password@host:5432/dbname # better-auth BETTER_AUTH_SECRET=a_long_random_secret BETTER_AUTH_URL=http://localhost:3000
bashpnpm prisma migrate deploy # or for local development pnpm prisma migrate dev
bashpnpm dev
Open http://localhost:3000.
To run the Genkit developer UI alongside the app:
bashpnpm genkit:dev
This project is optimized for Firebase App Hosting, which provides zero-config CI/CD from GitHub.
bashfirebase init apphosting
Follow the prompts to link your GitHub repository and create a backend.
Navigate to App Hosting → Backend Settings → Environment Variables and add all keys from your .env file.
Any push to your main branch triggers an automatic build and deployment. You can also deploy manually:
bashfirebase deploy
All evaluation data is stored under /users/{userId}/.... The firestore.rules file enforces:
userId field matching the path to prevent spoofing.deny rule blocks access to any unmatched path.