Skip to main content
Welcome to Repolyze! This guide will help you set up your development environment and make your first contribution.

Prerequisites

Before you begin, ensure you have the following installed:

Node.js

Version 18.0 or higher

pnpm

Recommended package manager

Git

For version control
1

Verify Node.js version

node --version  # Should be >= 18.0.0
If you need to install or update Node.js, visit nodejs.org
2

Install pnpm

npm install -g pnpm
While you can use npm or yarn, pnpm is recommended for faster installs and better disk space usage.
3

Fork and clone the repository

First, fork the repository on GitHub, then clone your fork:
git clone https://github.com/YOUR_USERNAME/Repolyze.git
cd Repolyze
Add the upstream remote to keep your fork in sync:
git remote add upstream https://github.com/OssiumOfficial/Repolyze.git
4

Install dependencies

pnpm install
This will install all project dependencies and run Prisma code generation automatically.
5

Set up environment variables

Copy the example environment file:
cp .env.example .env.local
Edit .env.local and add your API keys:
.env.local
# ===========================================
# REQUIRED
# ===========================================

# GitHub Personal Access Token
# Get yours at: https://github.com/settings/tokens
# Required scopes: repo, read:user
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx

# OpenRouter API Key
# Get yours at: https://openrouter.ai/keys
OPENROUTER_API_KEY=sk-or-xxxxxxxxxxxxxxxxxxxx

# ===========================================
# OPTIONAL
# ===========================================

# Site URL (for SEO and social sharing)
NEXT_PUBLIC_SITE_URL=http://localhost:3000

# Cache duration in seconds (default: 3600)
CACHE_TTL=3600
GitHub Personal Access Token:
  1. Go to GitHub SettingsDeveloper settingsPersonal access tokensTokens (classic)
  2. Click “Generate new token (classic)”
  3. Select scopes: repo, read:user
  4. Copy the token and add it to .env.local
OpenRouter API Key:
  1. Go to OpenRouter
  2. Sign up and navigate to SettingsAPI Keys
  3. Create a new key and add it to .env.local
6

Start the development server

pnpm dev
Open http://localhost:3000 in your browser to see the application running.

Development Workflow

Available Scripts

pnpm dev        # Start development server at localhost:3000

Making Changes

1

Create a feature branch

Always create a new branch for your changes:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-description
Use descriptive branch names that indicate the type of change:
  • feature/ for new features
  • fix/ for bug fixes
  • docs/ for documentation changes
  • refactor/ for code refactoring
2

Make your changes

Edit the code as needed. The development server will automatically reload when you save files.
3

Test your changes

Before committing, ensure your changes don’t break anything:
pnpm lint        # Check for linting errors
pnpm type-check  # Verify TypeScript types
pnpm build       # Test production build
4

Commit your changes

Follow the commit conventions when writing commit messages:
git add .
git commit -m "feat: add amazing new feature"
5

Push and open a pull request

git push origin feature/your-feature-name
Then go to GitHub and open a pull request against the main branch of the upstream repository.

Testing Your Changes

Testing the API Endpoints

Test the analyze endpoint locally:
curl -X POST http://localhost:3000/api/analyze \
  -H "Content-Type: application/json" \
  -d '{"repoUrl": "https://github.com/ig-imanish/mx-icons"}'
Test the branches endpoint:
curl "http://localhost:3000/api/branches?repo=ig-imanish/mx-icons"
Test the share page:
open http://localhost:3000/share/ig-imanish/mx-icons

Common Issues

If port 3000 is already in use, you can specify a different port:
PORT=3001 pnpm dev
If you encounter Prisma-related errors, try regenerating the client:
npx prisma generate
Ensure all required environment variables are set in .env.local. Restart the development server after changing environment variables.
The development server includes rate limiting. If you hit the limit, you can:
  • Wait for the limit to reset (1 minute for burst, 24 hours for daily)
  • Temporarily disable rate limiting in app/api/analyze/route.ts (not recommended for production)

Next Steps

Guidelines

Learn about our coding standards and PR process

Architecture

Understand the codebase structure

Need Help?

GitHub Discussions

Ask questions and discuss ideas

Twitter

Quick questions and updates

Build docs developers (and LLMs) love