# BrandsTrack Technical Specification

## Stack
Laravel 13 API/application layer, MySQL/MariaDB, database or Redis queues, Blade dashboard, optional React/Next.js client.

## Domains
Identity/organizations; Intelligence; Evidence; Entity resolution; Executive; Reputation; Competitors; Crisis; Communications; Billing; API; Audit.

## API
/v1/auth/register
/v1/auth/login
/v1/companies
/v1/companies/{company}
/v1/companies/{company}/analyze
/v1/companies/{company}/reputation
/v1/executives
/v1/monitoring-items
/v1/crisis
/v1/communications
/v1/api-keys
/v1/billing

## AI orchestration
Ingest -> normalize -> deduplicate -> evidence store -> entity matching -> AI extraction -> impact/risk/opportunity detection -> alerts -> briefing -> human review -> action -> outcome measurement.

## Security
HTTPS; hashed API keys; Sanctum tokens; organization-level authorization; audit logs; rate limits; webhook signature verification; secret values in environment; backups; least privilege.

## Data connectors
RSS baseline; adapters should be implemented per licensed provider for news, search, social and other public datasets. Each connector must persist source, URL, timestamp, raw/normalized content and retrieval status.

## Queues
Ingestion, analysis, alerting, report generation, notifications and scheduled briefings should run asynchronously.

## Deployment
Web root must point to Laravel public/ directory. Never expose application root or .env.
