How a-dot614/phone-internally-saas works
Phone SaaS is a multi-tenant bulk outbound calling platform with a React workspace and Laravel API. The principal workflow accepts CSV rows or API lookup entries, validates and records them, then starts credit-checked queued processing; Kolz dispatch and webhook results complete the lookup. Separate branches cover authentication, tenant-scoped workspace operations, credit-pack checkout and billing, and SaaS administration. The README documents these capabilities, but job dispatch internals and several frontend page/API connections were not sampled, so those links are omitted or marked unverified.
Main entry points: auth.php API routes · App.tsx Route and session app · Tenant.php Tenant and user · BillingController.php Billing and checkout
Components 26
Web application
- Route and session app
frontend/src/App.tsx - API client
frontend/src/api.ts - Workspace pages
frontend/src/pages - Marketing pages
frontend/src/pages
API and access
- API routes
backend/routes/auth.php - Authentication
backend/app/Http/Controllers/AuthController.php - API key management
backend/app/Http/Controllers/ApiKeyController.php - API key authentication
backend/app/Http/Middleware/AuthenticateApiKey.php - Admin overview
backend/app/Http/Controllers/AdminController.php
Lookup processing
- CSV uploads
backend/app/Http/Controllers/UploadController.php - API lookups
backend/app/Http/Controllers/Api/V1/LookupController.php - Row ingestion
backend/app/Services/RowIngestor.php - Processing starter
backend/app/Services/UploadStarter.php - Queued row processing
backend/app/Jobs/ProcessRowJob.php - Kolz API client
backend/app/Services/KolzClient.php - Kolz calling service
- Kolz result webhook
backend/app/Http/Controllers/Webhooks/KolzWebhookController.php
Credits and billing
- Credit ledger service
backend/app/Services/CreditService.php - Billing and checkout
backend/app/Http/Controllers/BillingController.php - Stripe webhook
backend/app/Http/Controllers/Webhooks/StripeWebhookController.php
Tenant data
- Upload and row records
backend/app/Models/CsvUpload.php - Tenant and user
backend/app/Models/Tenant.php - Tenant context
backend/app/Context/TenantContext.php
Other components
- Visitor
- Workspace user
- Stripe
Connections 34
- Visitor → Route and session app: opens
frontend/src/App.tsx - Workspace user → Route and session app: uses
frontend/src/App.tsx - Route and session app → Workspace pages: routes
frontend/src/App.tsx - Route and session app → Marketing pages: routes
frontend/src/App.tsx - Route and session app → API client: checks session
frontend/src/App.tsx - Workspace pages → API client: requests
frontend/src/api.ts - API client → API routes: calls
backend/routes/auth.php - API routes → Authentication: routes to
backend/routes/auth.php - API routes → CSV uploads: routes to
backend/routes/auth.php - API routes → API lookups: routes to
backend/routes/auth.php - API routes → Billing and checkout: routes to
backend/routes/auth.php - API routes → API key management: routes to
backend/routes/auth.php - API routes → Admin overview: routes to
backend/routes/auth.php - API routes → API key authentication: authenticates API
- CSV uploads → Row ingestion: ingests rows
backend/app/Http/Controllers/UploadController.php - CSV uploads → Processing starter: starts processing
backend/app/Http/Controllers/UploadController.php - API lookups → Row ingestion: ingests rows
backend/app/Http/Controllers/Api/V1/LookupController.php - API lookups → Processing starter: starts processing
backend/app/Http/Controllers/Api/V1/LookupController.php - Row ingestion → Upload and row records: writes rows
backend/app/Services/RowIngestor.php - Processing starter → Credit ledger service: checks credits
backend/app/Services/UploadStarter.php - Processing starter → Queued row processing: queues jobs
backend/app/Services/UploadStarter.php - Queued row processing → Kolz API client: calls
- Kolz calling service → Kolz API client: uses client
- Kolz result webhook → Upload and row records: records results
backend/app/Http/Controllers/Webhooks/KolzWebhookController.php - Upload and row records → Tenant and user: belongs to
backend/app/Models/CsvUpload.php - Billing and checkout → Credit ledger service: reads balance
backend/app/Http/Controllers/BillingController.php - Billing and checkout → Stripe: creates checkout
backend/app/Http/Controllers/BillingController.php - Billing and checkout → Tenant and user: creates payment
backend/app/Http/Controllers/BillingController.php - Stripe → Stripe webhook: sends events
- Stripe webhook → Credit ledger service: adds or deducts
backend/app/Http/Controllers/Webhooks/StripeWebhookController.php - Stripe webhook → Tenant and user: loads tenant
backend/app/Http/Controllers/Webhooks/StripeWebhookController.php - Admin overview → Upload and row records: lists uploads
backend/app/Http/Controllers/AdminController.php - Admin overview → Tenant and user: lists tenants
backend/app/Http/Controllers/AdminController.php - Tenant context → Tenant and user: sets scope context