> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pre.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Importing Repos

> Reverse-engineer existing codebases and continue building with pre.dev.

pre.dev can import existing GitHub repositories, understand their architecture, and generate new specs that integrate with your established codebase.

```bash theme={null}
# Import Repository

> Search repositories...

  stripe-sync        private   Updated today
  nexus-api          private   Updated 2d ago
  quantum-ui         public    Updated today
  forge-cli          private   Updated 1w ago
  pulse-analytics    private   Updated 3d ago
  terraform-aws      public    Updated today
```

## How It Works

1. **Connect your repo** — Provide the GitHub repository URL or select from your connected repos
2. **Analysis** — pre.dev scans the codebase to understand:
   * Tech stack and framework
   * Project structure and patterns
   * Existing features and components
   * Database schema (if detectable)
   * API routes and contracts
3. **Spec generation** — Describe what you want to add, and pre.dev generates specs that fit within the existing architecture
4. **Build** — Agents implement new features following the patterns established in your codebase

## What Gets Analyzed

| Aspect            | What pre.dev Detects                                             |
| ----------------- | ---------------------------------------------------------------- |
| **Framework**     | React, Vue, Angular, Next.js, Express, Django, Rails, etc.       |
| **Language**      | TypeScript, JavaScript, Python, Go, Rust, and more               |
| **Structure**     | Folder organization, module patterns, component hierarchy        |
| **Patterns**      | State management approach, API layer design, auth implementation |
| **Dependencies**  | Package ecosystem, third-party integrations                      |
| **Configuration** | Build tools, linting rules, test setup                           |

## Use Cases

### Adding Features to Existing Apps

```
Import my e-commerce repo and add:
- A wishlist feature with sharing via link
- Product recommendations based on browsing history
- A loyalty points system
```

pre.dev generates specs that use your existing database schema, component library, and API patterns.

### Refactoring

```
Import my monolith and generate a plan to:
- Extract the payment processing into a microservice
- Add proper error handling across all API endpoints
- Migrate from REST to GraphQL for the frontend queries
```

### Onboarding to Unfamiliar Codebases

Import a repo you didn't write and let pre.dev explain its architecture, then generate specs for changes you need to make.

## Requirements

* The repository must be accessible (public or connected via GitHub OAuth)
* Supported languages and frameworks are detected automatically
* Large monorepos may take longer to analyze

## After Import

Once imported, your project works exactly like any other pre.dev project:

* View and edit the generated spec
* Use any [build mode](/coding-agent/building/build-modes)
* Agents write code that follows your existing patterns
* PRs are opened against your repo
