Kineon Partner Portal
- Stack
- Supabase · Next.js · Tailwind · Netlify · Shopify Plus · Designed with Claude Design · Superfiliate · Make
Overview
Platform for a medical-device company to run its professional partner program end to end: self-serve onboarding with Shopify checkout, a partner dashboard with training, toolbox and ordering, network clinic management, and a full admin back office. Built on Next.js 15 App Router and Supabase, with Row Level Security isolating data by role, passwordless sign-in, and a signed Shopify webhook as the single source of payment truth.
Built during my time at Step Labs
How it's built
-
Architecture
Six roles (core partner, network admin, clinic, clinic staff, team member, Kineon admin) with non-overlapping route surfaces: /portal, /network-admin, /admin. Access is enforced once in middleware.ts and re-checked server-side in each layout, and it fails closed in production if auth is misconfigured. Mutations run as Server Actions that resolve the acting partner on the server, never from client input. Payment is never handled in-app: checkout happens on Shopify, and an HMAC-verified orders/paid webhook activates the partner idempotently.
-
Data Layer
Supabase Postgres with 85 versioned SQL migrations and RLS on every table. Three separate append-only event logs (partner lifecycle, toolbox views, webinar engagement) feed the admin reports without being merged into one polymorphic table. Content (training, toolbox, announcements, product catalog, volume pricing) lives in the database and is editable from the admin, with derived states such as draft, scheduled, live and expired computed rather than stored. Storage buckets handle thumbnails and PDFs. A bulk-import script with a custom CSV parser migrated about 1,500 legacy partners, idempotent by external ID.
-
Custom Code
- Passwordless auth: 6-digit sign-in code via signInWithOtp and verifyOtp, replacing emailed links after mail scanners were consuming single-use tokens.
- Zero-friction post-payment login: a single-use activation ticket (hashed in the DB, redeemed through an atomic SECURITY DEFINER RPC) signs the partner in after checkout without sending an email.
- Shopify integration: cart permalinks with partner attribution, plus volume-discount pricing reconciled with Shopify's automatic discounts.
- Make.com sync: Postgres AFTER INSERT triggers via pg_net push new partners to external systems, and a bearer-authenticated callback writes the Superfiliate code back.
- Analytics: PostHog (client and server, behind a reverse proxy) and Meta Pixel, with a typed event union so a typo becomes a compile error.
- Partner rewards engine: referral milestones and discount-code issuance and voiding against Shopify.
-
Components
Design handed off from Claude Design and ported 1:1 into scoped, per-route CSS driven by shared design tokens. Highlights:
- Onboarding flow with Google Places autocomplete
- Welcome checklist and training journey with sequential locking
- Toolbox with a ⌘K command palette
- Grid/list asset browser
- Volume-tier ordering portal with a persistent cart
- Network roster with a collapsible hierarchy
- Hand-rolled SVG trend chart
- Admin CRUD modals (catalog, toolbox, announcements, changelog)
- Responsive admin shell with an off-canvas drawer
Wanna talk? Send me a message.
bianca@bimevi.dev