A production-ready MVP for AI-powered decentralized digital identity verification with blockchain-backed credentials.
npm install
npm run dev
# Visit http://localhost:3000
# Use demo@trustlessid.com for pre-populated accountSee MVP_SETUP_GUIDE.md for complete setup with:
- โ PostgreSQL database (Supabase)
- โ File uploads (Cloudinary)
- โ JWT authentication
- โ Persistent data
TL;DR:
cp .env.example .env.local
# Edit .env.local with your Supabase + Cloudinary credentials
npm install
npm run dev- AI Document Verification - Authenticity analysis with confidence scoring
- Fraud Detection - Risk assessment with synthetic identity detection
- Blockchain Credentials - SHA-256 hashed, tamper-proof credentials
- Zero Data Exposure - Privacy-preserving public verification
- Real File Uploads - PDF, JPEG, PNG support via Cloudinary
- Persistent Storage - PostgreSQL database via Supabase
| Page | Route | Description |
|---|---|---|
| Landing | / |
Hero, problem statement, features, tech stack |
| Login | /login |
Email-based authentication with JWT |
| Dashboard | /dashboard |
User profile, documents, credentials, activity |
| Create Identity | /create-identity |
5-step wizard with file upload |
| Verify | /verify |
Public credential verification |
- Next.js 16 (App Router) + TypeScript
- Tailwind CSS + shadcn/ui components
- Framer Motion (animations)
- React Context (state management)
- Next.js API Routes (serverless functions)
- Supabase (PostgreSQL database + auth)
- Cloudinary (file storage + CDN)
- JWT (authentication tokens)
- Row Level Security (RLS) policies
- JWT token-based authentication
- Input validation and sanitization
- Environment variable protection
trustless-id/
โโโ src/
โ โโโ app/ # Next.js App Router
โ โ โโโ api/
โ โ โ โโโ auth/ # JWT authentication
โ โ โ โโโ ai/ # AI verification endpoints
โ โ โ โโโ documents/ # Document CRUD
โ โ โ โโโ credentials/ # Credential issuance
โ โ โ โโโ verify/ # Public verification
โ โ โ โโโ upload/ # File upload to Cloudinary
โ โ โโโ login/ # Auth page
โ โ โโโ dashboard/ # User dashboard
โ โ โโโ create-identity/ # Identity wizard
โ โ โโโ verify/ # Public verification
โ โโโ components/
โ โ โโโ ui/ # shadcn/ui primitives
โ โ โโโ landing/ # Landing page sections
โ โ โโโ shared/ # Navbar, Footer, Logo
โ โโโ lib/
โ โ โโโ supabase/ # Supabase client (browser + server)
โ โ โโโ db.ts # Database operations
โ โ โโโ auth.tsx # Auth context & hooks
โ โ โโโ jwt.ts # JWT utilities
โ โ โโโ crypto.ts # SHA-256 hashing
โ โ โโโ cloudinary.ts # File upload utilities
โ โ โโโ mock-data.ts # Mock data for demo mode
โ โโโ types/ # TypeScript definitions
โโโ supabase-schema.sql # Database schema
โโโ MVP_SETUP_GUIDE.md # Detailed setup instructions
โโโ TEAM_TASKS.md # Team task assignments
โโโ .env.example # Environment variables template
| Endpoint | Method | Description |
|---|---|---|
/api/auth/login |
POST | JWT authentication |
/api/documents |
GET/POST | Document management |
/api/credentials |
GET/POST | Credential issuance |
/api/verify |
GET | Public verification |
/api/ai/analyze |
POST | Document analysis |
/api/ai/fraud-detection |
POST | Fraud scoring |
/api/upload |
POST | File upload to Cloudinary |
Visit http://localhost:3000 to see the product overview.
- Click "Get Started" or go to
/login - Enter any email (demo mode accepts all)
- Use
demo@trustlessid.comfor a pre-populated account
- Go to
/create-identity - Complete the 5-step wizard:
- Basic Details
- Document Upload (real file upload with Cloudinary)
- AI Verification (mock processing with database storage)
- Fraud Analysis
- Credential Confirmation (with blockchain hash)
- Go to
/verify - Try these demo credential IDs:
cred_a1b2c3d4e5f6cred_g7h8i9j0k1l2cred_m3n4o5p6q7r8
Required for full MVP mode:
# Supabase (get from https://app.supabase.com)
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# Cloudinary (get from https://cloudinary.com)
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret
# JWT Secret (generate random 32+ chars)
JWT_SECRET=your-super-secret-jwt-key-min-32-chars-long
# App URL
NEXT_PUBLIC_APP_URL=http://localhost:3000See MVP_SETUP_GUIDE.md for detailed setup.
npm run dev # Start development server (localhost:3000)
npm run build # Build for production
npm run start # Run production build
npm run lint # Check for code issuesThe PostgreSQL schema is in supabase-schema.sql. It includes:
- 6 tables: users, documents, credentials, verification_results, fraud_results, activity_logs
- Row Level Security (RLS) policies for data protection
- Indexes for query performance
- Auto-generated UUIDs and timestamps
- Foreign key relationships with cascading deletes
To set up:
- Create a Supabase project
- Run the SQL schema in the SQL Editor
- Copy your API keys to
.env.local
# Install Vercel CLI
npm i -g vercel
# Deploy
vercelAdd these in Vercel dashboard โ Settings โ Environment Variables:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYNEXT_PUBLIC_CLOUDINARY_CLOUD_NAMECLOUDINARY_API_KEYCLOUDINARY_API_SECRETJWT_SECRET
This is an MVP demo with some simulated services:
- AI Services: Document analysis returns mock results (architecture ready for real API)
- Blockchain: Credential hashes are generated but not yet on-chain (ready for integration)
- Authentication: Email-only, no password required (JWT-secured)
All data is stored in real PostgreSQL and files in real Cloudinary storage.
Built for hackathon demonstration purposes.
- UI Components: shadcn/ui
- Icons: Lucide React
- Database: Supabase
- Storage: Cloudinary
- Framework: Next.js
Ready to build the future of digital identity! ๐