An AI-powered multi-tenant document analysis platform. Upload .txt files and analyze them using Google Gemini AI across multiple analysis types — all scoped to your organization.
🔗 Live Demo: multi-tenant-document-analysis.vercel.app
- Multi-tenant architecture — each user belongs to an organization; documents and analysis are fully isolated per org
- Organization-gated access — users must create or join an organization before analyzing documents
- AI-powered analysis via Google Gemini across 5 label types:
- 📝 Summary — concise overview of the document
- ❓ Q&A — question and answer extraction
- 🏷️ Entities — named entity recognition (people, places, orgs)
- 📤 Extract — key data and information extraction
- 💬 Sentiment — tone and sentiment analysis
- Authentication — sign up / sign in via Clerk
- File upload —
.txtfile support with cloud storage via Vercel Blob
| Layer | Technology |
|---|---|
| Framework | Next.js (App Router) |
| Auth | Clerk |
| Database | Neon (PostgreSQL) |
| ORM | Prisma |
| AI | Google Gemini |
| Storage | Vercel Blob |
| Styling | Tailwind CSS + shadcn/ui |
| Deployment | Vercel |
- Node.js 18+
- A Clerk account
- A Neon database
- A Google AI Studio API key
- A Vercel account (for Blob storage)
git clone https://github.com/AbdelAli-none/multi-tenant-document-analysis.git
cd multi-tenant-document-analysis
npm installCreate a .env.local file in the root directory:
# Database
DATABASE_URL=
# Clerk Auth
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard
# Google Gemini AI
GEMINI_API_KEY=
# Vercel Blob
BLOB_READ_WRITE_TOKEN=npx prisma generate
npx prisma db pushnpm run devMIT