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

# Preparing Your Codebase

> Set up your repository and environment so Blitzy can build and test your code

export const WistiaVideo = ({mediaId}) => <div style={{
  position: 'relative',
  paddingTop: '56.25%',
  overflow: 'hidden',
  borderRadius: '8px'
}}>
    <iframe src={`https://fast.wistia.net/embed/iframe/${mediaId}?videoFoam=true`} title="Wistia video player" allowTransparency="true" frameBorder="0" scrolling="no" allowFullScreen style={{
  position: 'absolute',
  top: 0,
  left: 0,
  width: '100%',
  height: '100%'
}} />
  </div>;

Blitzy works with both single and multi-repository projects. Choose your repository structure first, then configure the environment Blitzy needs to build and test your code.

<Note>
  **Jump to:** [Repository Structures](#repository-structures) | [Environment](#understanding-your-environment) | [What Blitzy Needs](#what-blitzy-needs)
</Note>

<WistiaVideo mediaId="afq5po68oa" />

## Repository Structures

<Tabs>
  <Tab title="Single Repository">
    For projects in a single repository, Blitzy clones your codebase, creates an isolated `blitzy` branch, and generates code that integrates with your existing architecture.

    **Best for:** Monolithic applications, standalone services, or projects with all code in one repository.
  </Tab>

  <Tab title="Multi-Repository">
    For projects split across repos, Blitzy uses **Git submodules** to read code from all your repositories at once.

    **Best for:** Microservice architectures, shared internal libraries, or projects where code generation requires context from multiple repositories.

    See the **[Git Submodules Integration Guide](/administration/submodules)** for configuration instructions.
  </Tab>
</Tabs>

***

## Understanding Your Environment

The more environment access you give Blitzy, the more it can validate - from basic compilation checks to full end-to-end testing with databases and external APIs.

### Why Environment Configuration Matters

When generating code, Blitzy compiles and tests your codebase in isolated environments before creating pull requests. This catches errors early and ensures code builds successfully.

<Steps>
  <Step title="Source Code Only">
    Static analysis of your codebase
  </Step>

  <Step title="+ Compiler Access">
    Compilation checks and build validation
  </Step>

  <Step title="+ Runtime Access">
    Internal component testing with mocks/stubs
  </Step>

  <Step title="+ Database">
    Full database integration testing
  </Step>

  <Step title="+ API Schema & 1P/3P API Access">
    End-to-end workflows with all external dependencies
  </Step>
</Steps>

### What Blitzy Needs

To enable runtime validation, configure:

<CardGroup cols={3}>
  <Card title="Build Instructions" icon="terminal">
    Commands to install dependencies, compile, and run tests
  </Card>

  <Card title="Environment Variables" icon="key">
    Required variables and secrets (stored securely)
  </Card>

  <Card title="Connected Repositories" icon="diagram-project">
    Which codebases Blitzy can access and modify
  </Card>
</CardGroup>

See the **[Environment Configuration](/administration/environments)** guide for detailed setup instructions and security protocols.

<Warning>
  **Ensure all internal dependencies are active before running a project.** Internal libraries and custom packages must be fully configured and accessible - not commented out or stubbed. Blitzy builds around the dependencies it finds at generation time, and Refine PR cannot add dependencies that were missing when Blitzy started.
</Warning>

***

## Next Step

<Card title="Set Up Your Project" icon="arrow-right" href="/project-lifecycle/sharing">
  Ready to go? Set up your first project and start generating code with Blitzy.
</Card>
