Skip to main content
This guide will help you set up Dependify locally for development. The system consists of three main components: a Next.js frontend, a FastAPI backend, and Modal serverless containers for parallel processing.

Prerequisites

Before you begin, ensure you have the following installed:
1

Node.js 18+ and pnpm

Install Node.js from nodejs.org and pnpm package manager:
npm install -g pnpm
2

Python 3.11+

Install Python 3.11 or higher from python.org
3

Git

Ensure Git is installed for version control and repository operations
4

API Keys

You’ll need accounts and API keys for:

Clone the Repository

First, clone the Dependify repository:
git clone https://github.com/kshitizz36/Dependify2.0.git
cd Dependify2.0

Backend Setup

1

Navigate to backend directory

cd backend
2

Create virtual environment

python -m venv venv
source venv/bin/activate
3

Install dependencies

pip install -r requirements.txt
Key dependencies include:
  • fastapi - High-performance API framework
  • modal - Serverless container orchestration
  • groq - AI inference SDK
  • gitpython - Git operations
  • supabase - Real-time database client
4

Configure environment variables

Create a .env file in the backend/ directory:
# AI & Processing
GROQ_API_KEY=your_groq_api_key

# Database
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_service_key

# GitHub Authentication & API
GITHUB_CLIENT_ID=your_github_oauth_client_id
GITHUB_CLIENT_SECRET=your_github_oauth_client_secret
GITHUB_TOKEN=your_github_classic_pat  # Requires 'repo' scope

# Security
API_SECRET_KEY=your_random_secret_key_here

# Frontend CORS
FRONTEND_URL=http://localhost:3000

# Server Configuration (optional)
PORT=5001
RATE_LIMIT_PER_MINUTE=10
RATE_LIMIT_PER_HOUR=100
See the Environment Variables page for detailed information on each variable.
5

Set up Modal secrets

Install Modal CLI and authenticate:
pip install modal
modal setup
Create Modal secrets for the containers:
# Create each secret interactively
modal secret create GROQ_API_KEY
modal secret create SUPABASE_URL
modal secret create SUPABASE_KEY
Modal secrets are required for the serverless containers to access Groq and Supabase. Without these, file processing will fail.
6

Run the backend server

python server.py
The server will start on http://localhost:5001 (or the port specified in your .env file).You should see:
============================================================
Starting Dependify API v2.0.0
============================================================
✅ Configuration validated successfully
CORS allowed origins: ['http://localhost:3000']
Rate limit: 100 requests/hour
============================================================

Frontend Setup

1

Navigate to frontend directory

Open a new terminal window:
cd frontend
2

Install dependencies

pnpm install
This will install all required packages including Next.js 15, React 19, Supabase client, and UI libraries.
3

Configure environment variables

Create a .env.local file in the frontend/ directory:
NEXT_PUBLIC_GITHUB_CLIENT_ID=your_github_oauth_client_id
NEXT_PUBLIC_API_URL=http://localhost:5001
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
The NEXT_PUBLIC_ prefix makes these variables available to the browser. The GITHUB_CLIENT_ID must match the one used in your backend.
4

Run the development server

pnpm dev
The frontend will start on http://localhost:3000 with Turbopack for fast refresh.

Deploy Modal Containers

Dependify uses Modal for parallel file processing. You need to deploy two container functions:
1

Deploy analysis container

From the backend/ directory:
modal deploy containers.py
This deploys the groq-read app that analyzes files for outdated syntax.
2

Deploy refactoring container

modal deploy modal_write.py
This deploys the groq-write app that refactors code using LLMs.
3

Verify deployment

Check your Modal dashboard at modal.com/apps to see your deployed functions.You should see:
  • groq-read with the run_script function
  • groq-write with the process_file function
Modal containers must be deployed even for local development. The backend calls these remote functions to process files in parallel.

Testing the Setup

1

Access the application

Open your browser and navigate to http://localhost:3000
2

Test GitHub OAuth

Click “Continue with GitHub” to test authentication flow. You’ll be redirected to GitHub for authorization.
Make sure your GitHub OAuth app’s callback URL is set to http://localhost:3000/auth/callback in your GitHub OAuth settings.
3

Test repository processing

After authentication:
  1. Paste a GitHub repository URL (try a small repo first)
  2. Click “Analyze Repository”
  3. Watch the real-time progress updates via Supabase
  4. Verify that files are processed and a PR is created
4

Check the API health

Visit http://localhost:5001/health to verify backend is running:
{
  "status": "healthy",
  "version": "2.0.0",
  "message": "Dependify API is running"
}
5

Explore API documentation

FastAPI provides interactive docs at:
  • Swagger UI: http://localhost:5001/docs
  • ReDoc: http://localhost:5001/redoc

Common Issues

If you see CORS errors in browser console:
  1. Verify FRONTEND_URL in backend .env is http://localhost:3000
  2. Restart the backend server after changing CORS settings
  3. Clear browser cache and reload
If GitHub authentication doesn’t work:
  1. Verify OAuth app callback URL is http://localhost:3000/auth/callback
  2. Check GITHUB_CLIENT_ID matches in both frontend and backend
  3. Ensure GITHUB_CLIENT_SECRET is set in backend .env
  4. Test OAuth flow using the redirect URL in browser

Next Steps

Environment Variables

Learn about all configuration options

Code Structure

Understand the codebase organization

Contributing

Start contributing to Dependify

Deployment

Deploy to production

Build docs developers (and LLMs) love