# Step 3 — Database Persistence Layer

This step adds the PHP repository layer for the existing MySQL schema.

## Rules preserved

- No database tables were changed.
- No database columns were renamed.
- No existing numerology calculator logic was rewritten.
- Database credentials remain outside the project code.
- SQL uses PDO prepared statements.
- The repository layer is separate from the calculation engine.

## Added

`src/Repository/`

- `UserRepository.php`
- `UserProfileRepository.php`
- `BirthNameRepository.php`
- `BirthProfileRepository.php`
- `NumerologyProfileRepository.php`
- `MissingNumberRepository.php`
- `PresentNumberRepository.php`
- `CalculationRunRepository.php`
- `PowerCycleRepository.php`
- `InterpretationRepository.php`
- `RepositoryFactory.php`

`src/bootstrap.php` loads the database class and repositories.

## Intended flow

Client/API → Calculator → Repository → Existing MySQL tables

The repositories do not calculate numerology values. They only persist and retrieve values produced by the existing calculation engine.

## Important

The actual database credentials remain in the blank configuration files and must not be placed in this project archive.

The next step after this layer is wiring one API calculation endpoint to the calculator + repositories and testing it against the live database.
