# Company & Period Selection Rules

## Store Factories (MANDATORY)
- Companies: Use `createCompaniesStore()` from `shared/frontend/stores/companies.js`
- Periods: Use `createAccountingPeriodStore()` from `shared/frontend/stores/accountingPeriod.js`
- Never implement custom company/period stores

## Components
- Use `CompanySelector.vue` from `shared/frontend/components/`
- Use `PeriodSelector.vue` from `shared/frontend/components/`
- Use `AppHeader.vue` layout from `shared/frontend/components/layout/`

## Backend Endpoints
- Use `create_companies_router()` factory from `shared/routes/companies.py`
- Use `create_calendar_router()` factory from `shared/routes/calendar.py`

## Company Access Validation (2-step)
1. Check `current_user.companies` (fast, from JWT)
2. Validate against Oracle DB (authoritative)
