Inlaya is a Next.js app for importing a GitHub repository, browsing its issues, and working on those issues inside a live E2B sandbox with AI-assisted edit flows.
- Connects a user account to GitHub
- Imports a repository into the app as a project
- Lists GitHub issues for that project
- Starts one shared sandbox per project
- Lets users inspect files, run commands, view diffs, and prepare AI-assisted edits
- Persists issue chat history in Postgres through Prisma
- Sign in with Clerk.
- Connect GitHub.
- Import a repository on
/projects/new. - Open
/projects/[id]to browse issues and manage the sandbox. - Open
/projects/[id]/issues/[issueNumber]to work on a specific issue. - Reuse the same project sandbox for file operations, commands, diffs, and AI edit preparation.
- Next.js App Router
- React
- Clerk
- Prisma + PostgreSQL
- GitHub App / GitHub OAuth
- E2B sandboxes
- OpenRouter for AI edit generation and model selection
- src/app App Router pages, layouts, and API routes
- src/components UI components for project, issue, and sandbox workflows
- src/server Server-side modules for GitHub, sandbox, chat, AI, and database access
- prisma/schema.prisma Prisma data model and relations
- docs/architecture.md Higher-level frontend, API, and sandbox architecture
- docs/database.md Human-readable explanation of the Prisma models
- Node.js
pnpm- PostgreSQL database
- Clerk project credentials
- GitHub App credentials
- E2B API key
- OpenRouter API key (
OPENROUTER_API_KEY)
The app validates its environment in src/env.js.
Server-side variables:
APP_URL— public application origin, such ashttp://localhost:3000locally orhttps://inlaya.raghavgaba.mein productionDATABASE_URLCLERK_SECRET_KEYGITHUB_APP_IDGITHUB_APP_PRIVATE_KEYGITHUB_APP_CALLBACK_URLGITHUB_APP_CLIENT_IDGITHUB_APP_CLIENT_SECRETGITHUB_APP_INSTALL_URLOPENROUTER_API_KEYOPENROUTER_MODELOTEL_SERVICE_NAME— service name shown in Jaeger; defaults toinlaya-agentOTEL_TRACES_EXPORTER—"otlp"(default),"console", or"none"OTEL_EXPORTER_OTLP_TRACES_ENDPOINT— complete OTLP/HTTP trace endpoint; defaults tohttp://localhost:4318/v1/tracesOTEL_EXPORTER_OTLP_HEADERS— optional OTLP authentication headers supplied by a hosted tracing provider; keep this value secretE2B_API_KEYE2B_SANDBOX_TEMPLATE
Client-side variables:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYNEXT_PUBLIC_CLERK_SIGN_IN_URLNEXT_PUBLIC_CLERK_SIGN_UP_URLNEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL
Install dependencies:
pnpm installRun the app locally:
pnpm devBefore adding a model to AGENT_MODELS:
- Check its
supported_parametersin OpenRouter's public/api/v1/modelsmetadata. - Confirm whether it supports both
toolsandstructured_outputs. - Set
supportsStrictToolArgumentsexplicitly in the model configuration. - Run
pnpm test -- src/lib/__tests__/agent-models.test.ts src/server/ai/providers/__tests__/tool-strictness.test.ts.
Unknown models default to non-strict tool arguments. Local Zod validation remains required even when OpenRouter strict tool arguments are enabled.
Start the local Jaeger service:
docker compose up -d jaegerRun the app with pnpm dev, then complete an agent request. Open
http://localhost:16686, select the inlaya-agent
service, choose Find Traces, and open the sandbox_agent.run trace.
The local Jaeger service accepts OTLP/HTTP traces on port 4318 and stores
them in memory, so its traces are cleared when the container is removed.
To return temporarily to terminal output instead of Jaeger, set:
OTEL_TRACES_EXPORTER=consoleUseful commands:
pnpm buildProduction build. This is the most reliable verification command in this repo.pnpm typecheckRun TypeScript without emitting files.pnpm db:migrateCreate and apply Prisma development migrations.pnpm db:generateRegenerate Prisma client types.pnpm db:pushPush schema changes without creating a migration.pnpm db:studioOpen Prisma Studio.
The database schema lives in prisma/schema.prisma.
For a human-readable walkthrough of the models and why they exist, see docs/database.md.
For the overall app structure, API layout, and sandbox lifecycle, see docs/architecture.md.
Canonical developer-facing tool contracts live in docs/tools.md.
- docs/tools.md
Canonical contracts for sandbox tools, including
glob_filesandsearch_code.
pnpm buildis more trustworthy thanpnpm typecheckwhen.next/typesis stale.- Some TypeScript errors in this repo disappear after a successful build regenerates Next artifacts.
- Sandbox state is now persisted per project in Prisma, but the live connected E2B session still lives in memory while the server process is alive.
If you change the Prisma schema, run:
pnpm db:migrateBefore shipping changes, prefer verifying with:
pnpm build
pnpm typecheck