Turn any GitHub repo into an interactive map of its architecture, modules, and risks.
GitVerse is built for the moment you open a new codebase and ask: βWhere do I start?β
Open-source and internal repos are hard to contribute to because context is scattered across folders, commits, and tribal knowledge.
Repos are larger, teams are more distributed, and AI can finally summarize + connect the dots fast enough to change the contributor experience.
Paste a repo β GitVerse builds a visual map + AI onboarding so contributors can understand architecture and pick a starting point in minutes.
- Faster onboarding for new contributors
- Clearer ownership and hotspots
- Better PR quality (less back-and-forth)
- Paste a GitHub URL
- GitVerse generates:
- Architecture / module map (visual)
- Modules + dependencies
- Top risks / hotspots
- 3 concrete improvement suggestions
- Click a module β ask AI: βWhat does this do?β βWhere should I start contributing?β
- Visualize repository structure and key paths
- Explore commits/branches and contributor activity
- Ask AI questions about files, folders, and architecture
- Generate analysis jobs and track progress
npm install
cp .env.example .env.local
cp .env.local .env
npm run prisma:generate
npm run prisma:migrate
npm run devGitVerse is designed to make contributing to unfamiliar repos easier:
- βHow do I run this project?β
- βWhere is auth?β
- βExplain this folder like Iβm new.β
- βGive me 3 beginner-friendly issues.β
Thatβs the MVP: turn repo complexity into a contributor roadmap.
- Next.js 14 (App Router), React, TypeScript, Tailwind
- Prisma + Postgres (Neon)
- Gemini for AI analysis
- D3/Recharts for visualizations
- Auth: NextAuth (Google) + credentials
gitverse-nextjs/
βββ app/
β βββ api/ # API routes
β β βββ auth/ # Authentication endpoints
β β βββ repositories/ # Repository management
β β βββ ai/ # AI-powered features
β β βββ users/ # User management
β β βββ integrations/ # Git platform integrations
β βββ (pages)/ # Page routes
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
βββ src/
β βββ components/ # React components
β β βββ ai/ # AI components
β β βββ auth/ # Authentication components
β β βββ layout/ # Layout components
β β βββ repository/ # Repository components
β β βββ ui/ # Reusable UI components
β β βββ visualizations/ # Data visualization components
β βββ contexts/ # React contexts
β βββ hooks/ # Custom React hooks
β βββ pages/ # Page components
β βββ services/ # API service functions
β βββ utils/ # Utility functions
βββ lib/
β βββ services/ # Backend services
β β βββ gitService.ts # Git operations
β β βββ geminiService.ts # AI integration
β β βββ repositoryService.ts # Repository logic
β βββ prisma.ts # Prisma client
β βββ auth.ts # Authentication utilities
β βββ middleware.ts # Auth middleware
βββ prisma/
β βββ schema.prisma # Database schema
βββ public/ # Static assets
βββ package.json # Dependencies
- Primary: Deep Blue (#1E3A8A) - Professional and trustworthy
- Secondary: Slate Gray (#475569) - Neutral and sophisticated
- Accent: Electric Green (#10B981) - Active elements and success states
- Supporting: Orange (#F59E0B) for warnings, Red (#EF4444) for errors
- Headings: Inter
- Body: Source Sans 3
- Code: JetBrains Mono
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run Next.js linternpm run format- Format code with Prettiernpm run prisma:generate- Generate Prisma clientnpm run prisma:migrate- Run database migrationsnpm run prisma:studio- Open Prisma Studio
All API routes are available under /api:
/api/auth/*- Authentication (login, signup, logout, me)/api/repositories- Repository CRUD operations/api/repositories/[id]- Specific repository operations/api/repositories/[id]/stats- Repository statistics/api/repositories/[id]/analyze- Trigger repository analysis/api/ai/analyze-repository- AI repository analysis/api/ai/analyze-code- AI code analysis/api/ai/chat- AI chat interface/api/users/profile- User profile management/api/integrations/*- Git platform integrations
To ensure consistent performance and predictability, paginated API endpoints in GitVerse use cursor-based pagination instead of traditional offset pagination.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit |
number |
10 |
The maximum number of items to return (clamped to max 50 for safety). |
cursor |
string |
null |
The ID of the last item received in the previous page. Omit for the first page. |
GET /api/auth/sessions?limit=20&cursor=clq123abcAll paginated endpoints return an object containing an items array and a nextCursor string. If nextCursor is present, it indicates there is more data available.
{
"items": [
{ "id": "clq123abd", "expires": "2026-05-21T00:00:00.000Z" },
{ "id": "clq123abe", "expires": "2026-05-20T00:00:00.000Z" }
],
"nextCursor": "clq123abf"
}When fetching data in the UI (e.g., via infinite scrolling or "Load More" buttons), keep track of the nextCursor and pass it to subsequent requests. Avoid duplicate fetches by ensuring UI loading states block concurrent requests.
const loadMore = async () => {
if (!nextCursor || isLoading) return;
setIsLoading(true);
try {
const res = await fetch(`/api/auth/sessions?limit=20&cursor=${nextCursor}`);
const data = await res.json();
setItems((prev) => [...prev, ...data.items]);
setNextCursor(data.nextCursor);
} finally {
setIsLoading(false);
}
};Before deploying, add these in Vercel Dashboard β Project β Settings β Environment Variables:
| Variable | Required | Description | Example |
|---|---|---|---|
DATABASE_URL |
Yes | PostgreSQL connection string (Neon recommended) | postgresql://user:pass@host/db |
JWT_SECRET |
No (if NEXTAUTH_SECRET is set) |
Secret key for JWT signing (fallback for NEXTAUTH_SECRET) |
openssl rand -base64 32 |
GEMINI_API_KEY |
Yes | Google Gemini API key | Get from Google AI Studio |
NEXTAUTH_URL |
Yes | Your deployed Vercel URL | https://your-app.vercel.app |
NEXTAUTH_SECRET |
Yes | NextAuth session signing secret | openssl rand -base64 32 |
GOOGLE_CLIENT_ID |
No (required for OAuth) | Google OAuth client ID | From Google Cloud Console |
GOOGLE_CLIENT_SECRET |
No (required for OAuth) | Google OAuth client secret | From Google Cloud Console |
NEXT_PUBLIC_API_URL |
Optional | API URL for client-side calls | Defaults to current domain |
- Push your code to GitHub.
- Import the project in the Vercel dashboard.
- Under Settings β Environment Variables, add every variable listed in the Environment Variables section below. Vercel automatically makes them available at build time and runtime.
- For
NEXTAUTH_URL, set the value to your Vercel deployment URL (e.g.https://gitverse.vercel.app). In local development, set it tohttp://localhost:3000in your.env.localto avoid missing-URL warnings. - Mark sensitive secrets (e.g.
JWT_SECRET,NEXTAUTH_SECRET,GOOGLE_CLIENT_SECRET,GEMINI_API_KEY) as Sensitive in Vercel so they are never exposed in logs.
- For
- Click Deploy.
Tip: Vercel re-deploys automatically on every push to
main. If you update an environment variable in the dashboard, trigger a redeploy from Deployments β Redeploy for the new value to take effect.
- Push your code to GitHub
- Go to vercel.com then Import Project
- Select your GitHub repository
- Add all required environment variables from the checklist above
- Click Deploy
- In Google Cloud Console, add your Vercel URL as an OAuth redirect URI
Build failing on Vercel?
- Ensure all required environment variables are set
- Check build logs under Vercel Dashboard β Deployments β Build Logs
Database connection errors?
- Verify
DATABASE_URLis a valid PostgreSQL connection string - If using Neon, make sure the database is not paused
- Neon free tier pauses after inactivity β wake it up from the Neon dashboard
Google OAuth not working?
- Ensure
NEXTAUTH_URLexactly matches your Vercel deployment URL - Add
https://your-app.vercel.app/api/auth/callback/googleto Authorized Redirect URIs in Google Cloud Console - Check
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETare correctly copied
AI analysis not working?
- Verify
GEMINI_API_KEYis valid and has not exceeded quota - Check Google AI Studio for API usage limits
Environment variables not updating?
- After changing env vars in Vercel dashboard, trigger a Redeploy manually
- Vercel does not auto-redeploy when env vars change
- Push your code to GitHub
- Import project in Vercel
- Add environment variables in Vercel dashboard
- Deploy!
Add these in Vercel Dashboard β Settings β Environment Variables:
| Variable | Required | When needed |
|---|---|---|
DATABASE_URL |
β Always | PostgreSQL connection string (use NeonDB pooler URL) |
NEXTAUTH_SECRET |
β Always | Session encryption β generate with openssl rand -base64 32 |
NEXTAUTH_URL |
β Always | Your production domain e.g. https://your-app.vercel.app |
GEMINI_API_KEY |
β Always | Google Gemini AI β get from aistudio.google.com |
JWT_SECRET |
β Always | JWT signing secret |
GOOGLE_CLIENT_ID |
β‘ OAuth | Only if using Google login |
GOOGLE_CLIENT_SECRET |
β‘ OAuth | Only if using Google login |
GITHUB_APP_ID |
β‘ PR Reviews | Only if using GitHub App integration |
GITHUB_APP_PRIVATE_KEY |
β‘ PR Reviews | Only if using GitHub App integration |
GITHUB_WEBHOOK_SECRET |
β‘ PR Reviews | Only if using GitHub webhooks |
ANALYSIS_RUNNER_SECRET |
β‘ Cron | Required for scheduled analysis jobs on Vercel |
GITVERSE_ANALYSIS_BACKEND |
β‘ Cron | URL of your analysis worker backend |
SMTP_HOST |
β‘ Email | Only if using password reset emails |
SMTP_USER |
β‘ Email | Only if using password reset emails |
SMTP_PASS |
β‘ Email | Only if using password reset emails |
- Wrong DATABASE_URL β Use the pooler URL from NeonDB for Vercel (not direct connection)
- Missing NEXTAUTH_URL β Must be set to your exact production domain
- GITHUB_APP_PRIVATE_KEY format β Paste with literal
\nbetween lines, wrapped in quotes - ANALYSIS_RUNNER_SECRET not set β Recommended for security; without it, the cron endpoint runs unauthenticated on Vercel
docker build -t gitverse-nextjs .
docker run -p 3000:3000 gitverse-nextjsThis repo includes App Hosting config in apphosting.yaml.
- Create Secret Manager entries (names must match
apphosting.yaml):
firebase apphosting:secrets:set webapp-firebase-api-key
firebase apphosting:secrets:set gemini-api-key
firebase apphosting:secrets:set database-url
firebase apphosting:secrets:set jwt-secret
firebase apphosting:secrets:set nextauth-url
firebase apphosting:secrets:set nextauth-secret
firebase apphosting:secrets:set google-client-id
firebase apphosting:secrets:set google-client-secret- Deploy:
firebase deploy- In Google Cloud Console (OAuth client), add redirect URI:
https://<your-domain>/api/auth/callback/google
Required:
DATABASE_URL- PostgreSQL connection stringJWT_SECRET- JWT secret keyGEMINI_API_KEY- Google Gemini API key
OAuth (Google / NextAuth):
NEXTAUTH_URL- Deployed base URL (e.g.https://<your-domain>)NEXTAUTH_SECRET- Session/JWT signing secret (generate withopenssl rand -base64 32)GOOGLE_CLIENT_ID- Google OAuth client id (required only if Google sign-in is enabled)GOOGLE_CLIENT_SECRET- Google OAuth client secret (required only if Google sign-in is enabled)
Optional:
JWT_SECRET- JWT signing secret (fallback/alternate secret configuration)NEXT_PUBLIC_API_URL- API URL for client-side (defaults to current domain)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
A huge thank you to all contributors who have helped improve GitVerse β€οΈ Your efforts make this project stronger, more reliable, and more impactful for the community.
This project is licensed under the MIT License.
- Next.js team for the amazing framework
- Vercel for hosting solutions
- Google for Gemini AI
- NeonDB for serverless PostgreSQL
- All contributors and users of GitVerse
Made with β€οΈ by the GitVerse Team