- Node.js (v18 or higher) - Check with:
node --version - npm or yarn - Check with:
npm --versionoryarn --version - Git - Check with:
git --version - Redis (Optional but recommended for caching) - Install with:
brew install redis(macOS) or check your OS package manager
Install dependencies for both backend and frontend:
# Install backend dependencies
cd GitHub_summarizer/backend
npm install
# Install frontend dependencies
cd ../frontend
npm installCreate a .env file in the backend directory:
cd GitHub_summarizer/backend
touch .envAdd the following to backend/.env:
# Required: Google Gemini API Key for LLM analysis
GEMINI_API_KEY=your_gemini_api_key_here
# Optional: Backend port (defaults to 3001)
PORT=3001
# Optional: Redis URL (if using Redis, otherwise uses in-memory cache)
REDIS_URL=redis://localhost:6379To get a Gemini API Key:
- Go to https://makersuite.google.com/app/apikey
- Create a new API key
- Copy and paste it into your
.envfile
The frontend expects the backend on port 3001 by default. If you change the backend port, update the frontend configuration:
Option A: Create a .env file in the frontend directory:
cd GitHub_summarizer/frontend
touch .envAdd to frontend/.env:
VITE_SERVER_URL=http://localhost:3001If you have Redis installed:
# macOS
brew services start redis
# Linux
sudo systemctl start redis
# Or run directly
redis-serverIf Redis is not running, the app will use an in-memory cache (data lost on restart).
Open a terminal and run:
cd GitHub_summarizer/backend
npm startYou should see:
🚀 Server running on port 3001
📡 Backend URL: http://localhost:3001
🔗 Health check: http://localhost:3001/api/health
Note: The backend uses Node.js v18. If you see an engine warning but it still works, you can ignore it.
Open a new terminal and run:
cd GitHub_summarizer/frontend
npm run devYou should see output like:
VITE v6.x.x ready in xxx ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
Open your browser and navigate to:
http://localhost:5173
(Or the port shown in your terminal)
If you want to run everything quickly:
Terminal 1 (Backend):
cd GitHub_summarizer/backend && npm startTerminal 2 (Frontend):
cd GitHub_summarizer/frontend && npm run devTerminal 3 (Redis - Optional):
redis-serverIf port 3001 or 5173 is already in use:
- Backend: Change
PORTinbackend/.env(default is 3001) - Frontend: Vite will automatically use the next available port
- Note: Port 5000 is often used by macOS services, so we use 3001 by default
- Check that the backend is running on the correct port
- Verify
VITE_SERVER_URLinfrontend/.envmatches the backend port - Check browser console for CORS errors
- Make sure
GEMINI_API_KEYis set inbackend/.env - Restart the backend server after adding the key
- The app will work without Redis (uses in-memory cache)
- If you want Redis, make sure it's running:
redis-cli pingshould returnPONG
GitHub_summarizer/
├── backend/ # Express.js API server
│ ├── src/
│ │ ├── index.js # Server entry point
│ │ ├── controllers/ # API controllers
│ │ ├── routes/ # API routes
│ │ ├── services/ # External services (Git)
│ │ └── utils/ # Utilities (LLM, Redis, etc.)
│ └── .env # Environment variables
│
└── frontend/ # React + Vite application
├── src/
│ ├── pages/ # Main pages
│ ├── components/ # UI components
│ └── utils/ # Frontend utilities
└── .env # Frontend environment variables (optional)
POST /api/repos/clone- Clone and analyze a GitHub repository- Body:
{ "repoUrl": "https://github.com/owner/repo" }
- Body:
- Backend auto-restarts with nodemon (if configured)
- Frontend has hot-reload enabled by Vite
- Check browser console and terminal for errors
- Backend logs will show analysis progress