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

# Projects: 7days & UKCC

> One codebase, two brands — how 7days and UKCC differ and how the project is selected

The backend is a **single Symfony codebase that powers two brands**. They share all the
code; what differs is **configuration** — branding, integrations, feature toggles, and
infrastructure — selected at boot by a project code.

<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '1rem', margin: '1.5rem 0' }}>
  <div style={{ background: '#ffffff', border: '1px solid rgba(0,0,0,0.08)', borderRadius: '0.75rem', padding: '1.75rem', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
    <img src="https://mintcdn.com/7daysperformance/-UULmg5Xp5WiJ202/logo/7days.svg?fit=max&auto=format&n=-UULmg5Xp5WiJ202&q=85&s=bcacc7c2d6973bbebd117cad33d0fdc1" alt="7days Performance logo" style={{ height: '52px', width: 'auto' }} width="151" height="60" data-path="logo/7days.svg" />
  </div>

  <div style={{ background: '#9cadae', border: '1px solid rgba(155,155,155,0.58)', borderRadius: '0.75rem', padding: '1.75rem', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
    <img src="https://mintcdn.com/7daysperformance/-UULmg5Xp5WiJ202/logo/ukcc.svg?fit=max&auto=format&n=-UULmg5Xp5WiJ202&q=85&s=f167c6c17c6e37dc10109ce0e7101c31" alt="UKCC — UK Carp Competitions logo" style={{ height: '52px', width: 'auto' }} width="889" height="395" data-path="logo/ukcc.svg" />
  </div>
</div>

|              | 7days                         | UKCC                    |
| ------------ | ----------------------------- | ----------------------- |
| Project code | `7days`                       | `ukcarp`                |
| Brand        | 7days Performance             | UK Carp Competitions    |
| Domain       | `7daysperformance.co.uk`      | `ukcc.co.uk`            |
| Enum case    | `ProjectCodeEnum::SEVEN_DAYS` | `ProjectCodeEnum::UKCC` |

## How the project is selected

The active project comes from the **`PROJECT_CODE`** environment variable, exposed to the
container as the `project_code` parameter (`.env.example` defaults it to `7days`; the test
suite runs as `7days`).

At boot, `App\Kernel::configureContainer()` layers configuration in this order, so a
project file always overrides the shared defaults:

1. `config/project/default_parameters.yaml` — shared defaults (the 7days brand values live here as the base).
2. `config/project/{project_code}_parameters.yaml` — per-project overrides.
3. `config/{services}.yaml` — shared service wiring.
4. `config/project/{project_code}_config.yaml` — per-project service swaps.

The project code also selects **per-project templates** (`templates/project/{project_code}/`),
**assets** (`assets/images/weekdays/{project_code}`), and is available as a Twig global.

<Note>
  Everything project-specific lives under `config/project/`. To see exactly what a brand
  overrides, diff `7days_parameters.yaml` / `7days_config.yaml` against the `ukcarp_*`
  equivalents.
</Note>

## What differs between the two

Swapped via `{project_code}_config.yaml`:

| Concern                       | 7days                                          | UKCC                                      |
| ----------------------------- | ---------------------------------------------- | ----------------------------------------- |
| Transactional email           | SMTP.com (`SmtpComApiSender`)                  | Mailgun (`MailgunApiSender`)              |
| Suggested payment method      | `PaymentMethodProvider7days`                   | `PaymentMethodProviderUkcarp`             |
| Draw-results candidate policy | `SevenDaysDrawResultsCandidateSelectionPolicy` | `UkccDrawResultsCandidateSelectionPolicy` |

Set via `{project_code}_parameters.yaml`:

| Parameter                       | 7days                                   | UKCC                                             |
| ------------------------------- | --------------------------------------- | ------------------------------------------------ |
| `brand_color_main`              | `#2AA8F8`                               | `#03989e`                                        |
| `product_page_path`             | `product`                               | `competition`                                    |
| `draw_results_email_send_time`  | `22:30`                                 | `21:30`                                          |
| `checkout_idv_enabled`          | `true`                                  | `false`                                          |
| `admin_draw_winners_enabled`    | `false`                                 | `true`                                           |
| Stock management (`stock_mgmt`) | off                                     | on (`stock_mgmt_location: UKCC`, in-house stock) |
| Instant-win interstitials       | —                                       | carp / fishing category cross-sell               |
| Prize-delivery suppliers        | be2b, stjarna, voucherexpress, gold1, … | be2b, in-house stock, …                          |
| AWS autoscaling groups          | `P02` / `P03`                           | `PU02` / `PU03`                                  |

Databases are per-brand as well (e.g. `7days_draw`, `7days_user`, … via the `*_DATABASE_NAME`
env vars).

## Running a specific project locally

Set `PROJECT_CODE` before starting the app:

```bash theme={null}
# 7days (default)
PROJECT_CODE=7days

# UKCC
PROJECT_CODE=ukcarp
```

You'll also point the `*_DATABASE_NAME` env vars at that brand's databases. TODO: confirm
the exact local setup steps and seed data per project (see Developers → local setup).

## Open questions

* TODO: Document the **deploy pipeline per brand** (how each project's environments and
  autoscaling groups are targeted).
* TODO: Note anything that must be kept **in sync** when adding project-specific config
  (e.g. a new parameter needing a default plus both project overrides).
