RepoLens is a modern, full-stack web application designed to give developers deep, actionable insights into any public GitHub repository. Simply paste a GitHub URL, and RepoLens handles the rest, analyzing the directory structure, file types, contributor trends, and generating AI-powered code quality metrics.
- GitHub Repository Parsing: Instantly fetch and analyze repository structures, latest commits, and file distributions.
- AI-Powered Code Insights: Uses advanced AI integrations to provide qualitative feedback on repository architecture and potential improvements.
- Comprehensive Dashboard: Visualizes file metrics, large files, and historical insights.
- Authentication System: Fully integrated OAuth2 (Google & GitHub) as well as traditional Email/Password authentication securely stored via JWTs.
- Analysis History: Securely saves your past repository searches so you can revisit them anytime from your personalized dashboard.
RepoLens is built on the robust MERN stack alongside modern frontend tooling:
- Framework: React.js (via Vite)
- Styling: Tailwind CSS (with dynamic glassmorphism and modern UI effects)
- Routing: React Router DOM
- Deployment: Vercel
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB Atlas (via Mongoose)
- Authentication: Passport.js (Google OAuth2.0, GitHub OAuth2.0, Local strategy with bcrypt) & JSON Web Tokens (JWT)
- Deployment: Render
Repolens/
├── backend/ # Express server & API
│ ├── analyzers/ # Core repository analysis logic
│ ├── config/ # Passport.js OAuth configurations
│ ├── models/ # Mongoose DB schemas (Users, etc.)
│ ├── routes/ # API endpoint definitions
│ ├── services/ # Integrations (GitHub API, OpenRouter AI, Auth)
│ ├── server.js # Express application entry point
│ └── .env # Environment Variables
├── client/ # Vite + React frontend
│ ├── public/ # Static base assets
│ ├── src/
│ │ ├── assets/ # Images & Icons
│ │ ├── components/ # Reusable UI components (Navbar, ProtectedRoutes, etc.)
│ │ ├── context/ # Global React Contexts (AuthContext)
│ │ ├── pages/ # Application views (Home, Analyze, Sign In/Up)
│ │ ├── App.jsx # Client-side router configuration
│ │ └── index.css # Global TailwindCSS styles
│ ├── vercel.json # Vercel SPA Routing Configuration
│ └── vite.config.js # Vite bundler configuration
└── README.md
To run this application on your local machine, follow these steps:
git clone https://github.com/Ayushsharma1908/Repolens.git
cd RepolensYou will need to create two .env files.
Backend (backend/.env):
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_super_secure_jwt_secret
SESSION_SECRET=your_session_secret
# URLs
CLIENT_URL=http://localhost:5173
SERVER_URL=http://localhost:5000
# OAuth Credentials
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
# AI Intergration
OPENROUTER_API_KEY=your_openrouter_api_keyFrontend (client/.env):
VITE_API_URL=http://localhost:5000Open two terminal instances.
Terminal 1 (Backend):
cd backend
npm install
npm startTerminal 2 (Frontend):
cd client
npm install
npm run devThe frontend will be available at http://localhost:5173 and the backend will be running at http://localhost:5000.
RepoLens is designed to be fully deployable with strict CORS integrations between services.
- Client URL: Deployed onto Vercel.
- Server API: Hosted on a Render Web Service.
- Database: MongoDB Atlas.
Important for deployment: To ensure Google/GitHub OAuth callbacks work correctly, ensure that the
SERVER_URLis fully configured in the respective developer consoles without trailing slashes.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.
Distributed under the MIT License.