RepoLens is a web platform that lets developers upload a software repository as a ZIP file and then interact with it using natural language. Once uploaded, the system processes the codebase, generates semantic embeddings for its contents, and enables engineers to ask questions like "where is authentication handled?" or "which files deal with payments?" and get accurate, cited answers pointing to specific files and line numbers.
Shortening the onboarding ramp-up, RepoLens is designed to make any codebase instantly queryable in plain English.
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS, Monaco Editor (for visual file previews), and Lucide React.
- Backend: NestJS, Multer (for ZIP uploads), adm-zip (for extraction), Passport & JWT.
- Database & AI: PostgreSQL with the
pgvectorextension, Prisma ORM, Gemini Embeddings API (text-embedding-004), and Google Gemini 2.5 Flash.
Make sure you have the following installed:
- Node.js (v18+ recommended)
- Docker & Docker Compose (to run PostgreSQL with
pgvector) - Git
git clone https://github.com/Yuvraj-025/RepoLens.git
cd RepoLensInstall dependencies for both the frontend and the backend applications:
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm installCreate a .env file in the backend/ directory:
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/repolens?schema=public"
JWT_SECRET="your-super-secret-jwt-key"
GEMINI_API_KEY="your-gemini-api-key"
GEMINI_CHAT_MODEL="gemini-2.5-flash"
PORT=3001Create a .env file in the frontend/ directory:
NEXT_PUBLIC_API_URL="http://localhost:3001"Apply the database schema and migrations to the local PostgreSQL database using Prisma:
cd backend
npx prisma db push-
Spin up the Database:
docker-compose up -d
-
Start Backend Server:
cd backend npm run start:dev -
Start Frontend Server:
cd frontend npm run dev
The application will be accessible at http://localhost:3000. The NestJS API server will run at http://localhost:3001.
RepoLens includes a GitHub Actions CI workflow configured at .github/workflows/ci.yml.
The pipeline automatically triggers on any push or pull request to the main branch, performing the following checks:
- Backend CI: Installs dependencies and runs
npm run build(generates the Prisma client and compiles the NestJS project). - Frontend CI: Installs dependencies and runs
npm run build(verifies Next.js compilation).
RepoLens is configured to deploy directly from the main branch to Render.
Render databases come with native support for extensions like pgvector.
- Create a new PostgreSQL database on Render.
- Choose a name and region.
- Save the Internal Database URL for the backend configuration.
- Create a new Web Service on Render and connect your GitHub repository.
- Configure settings:
- Root Directory:
backend - Branch:
main - Build Command:
npm install --include=dev && npm run build - Start Command:
node dist/main.js(ornpm run start) - Release Command (Optional but Recommended):
npx prisma db push
- Root Directory:
- Add the following Environment Variables in the service settings:
DATABASE_URL: Your Render Internal Database URLJWT_SECRET: A secure random JWT secret stringGEMINI_API_KEY: Your Google AI Studio Gemini API KeyFRONTEND_URL: Your Render frontend URL (e.g.,https://repolens.onrender.com)NODE_ENV:production
Since Next.js 14 requires server-side execution, deploy the frontend as a Render Web Service.
- Create a new Web Service on Render and connect your GitHub repository.
- Configure settings:
- Root Directory:
frontend - Branch:
main - Build Command:
npm install && npm run build - Start Command:
npm run start
- Root Directory:
- Add the following Environment Variable:
NEXT_PUBLIC_API_URL: Your Render backend Web Service URL (e.g.,https://repolens-backend.onrender.com)
- Once the frontend is running, ensure you copy its live URL and update the
FRONTEND_URLvariable in your backend service settings.