# CSP Radar CSP Radar is a SaaS platform that helps web developers collect and analyze Content Security Policy (CSP) violation reports from their websites in real time. It provides tools to monitor policy violations, build and refine CSP policies, and manage multiple sites across organizations — all without breaking production traffic. ## Tech Stack - **Backend Framework**: Laravel 11.x (PHP 8.3+) - **Frontend Framework**: React 19 via Inertia.js (React + TypeScript) - **Styling**: Tailwind CSS v4 + Radix UI components (shadcn/ui style) - **Asset Bundler**: Vite - **Billing**: Stripe (via Laravel Cashier) ## Architecture Overview - **Monolith**: It is a standard Laravel monolith utilizing Inertia.js to serve React frontend components from `resources/js/pages`. - **Database**: Standard Laravel Eloquent ORM. Models are in `app/Models`. - **Reports Collection**: Receives real-time CSP violation reports at a dynamic wildcard subdomain or designated endpoint. - **Organization & Multi-tenancy**: Features organization-level limitations (e.g., limits on the number of sites per organization, report quotas). ## Key Directories - `app/Http/Controllers/`: Backend logic and API/Inertia endpoints. - `resources/js/`: Frontend React application. - `resources/js/pages/`: Inertia pages. - `resources/js/components/`: Reusable React components (Radix UI / Tailwind). - `routes/`: Standard Laravel routing (web.php, api.php). - `config/`: Laravel configurations. ## Development & Local Setup - `npm run dev`: Starts the Vite dev server and runs Laravel artisan commands concurrently (via `concurrently` in `package.json`). - Uses `stripe listen` for testing webhooks locally.