← Back to homepage

Technical workings

How the offline app, the CRM API and lead capture work together — plus what is already in the app.

1. Lead capture form Ready

The request form posts directly to the CRM LeadIntake API — without an intermediary server.

Form (testwebsite/index.html)

<!-- POST via fetch → https://launcherp.be/api/v1/leads -->
{
  "name":      "...",        // name
  "email":     "...",        // email (required)
  "company":   "...",        // company
  "plan":      "hidden",     // chosen plan (from prijzen.html)
  "source":    "salesonipad" // source → lead is tagged in CRM
}

✓ Honeypot field website filters bots. ✓ Network error → clean message, no lost lead.

CRM side (Laravel)

// config/cors.php
'paths' => ['api/*', 'sanctum/csrf-cookie'],
'allowed_origins' => [env('APP_URL'), 'https://salesonipad.com'],

// bootstrap/app.php — CSRF exception for the lead endpoint
->withMiddleware(function (Middleware $middleware) {
    $middleware->validateCsrfTokens(except: ['api/v1/leads']);
})

✓ Existing LeadIntakeController processes the data; no new backend needed.

2. Dataflow & sync Existing

The app already syncs with the CRM API using the same patterns as orders. These modules run and only need to be connected.

2-way lead sync — scripts/leads.js

2-way opportunity sync — scripts/opportunities.js

Credit notes — pdf.js: creditNotaFromFactuur

Delta-sync — scripts/novasync.js

3. Security & data

What happens on the iPad and in the CRM.

ComponentHow it works
PIN protectionLocks the app against unauthorized use
Dropbox backupOAuth 2.0 PKCE — one-tap backup, restore later on the same/new iPad
Offline queueOpen orders survive a restart; separate backup queue
Peppol-readyFields for e-invoicing are present; the CRM module generates the UBL e-invoice as a download. Sending via a Peppol Access Point is not yet operational.
PWA / offlineService worker caches the entire app — works without a network
🌐 PWA installation

The app is a Progressive Web App: sales reps install it on their iPad without the App Store and it works fully offline.

4. Bundle architecture Design

The combination uses the existing sync — no new infrastructure.

Flow

1. CRM account created (Stripe checkout)
2. SalesOnIPad licence linked to the CRM company
3. App knows via config which sync endpoint to use
4. Sync runs automatically — users see "synchronized" in the app
5. Cancelling the CRM = sync stops; the app keeps working locally
🔌 No new code needed

Orders, leads, opportunities and credit notes already use the same sync pattern. The field sales module connects them to the CRM dashboard.

5. Roadmap

What still needs to happen to go live with the integration.

StepWorkStatus
1. Lead capture onlinePosting form to API + CORSReady (testwebsite)
2. Field sales moduleActivating CRM modules + pricingNext step
3. Connect syncLinking endpoints per customerPilot
4. Upsell in checkoutStripe + welcome pageExtension

Curious how it looks on the iPad?

See the data flow Request a demo