// app/page.tsx // This page doubles as: // 1. A landing page // 2. A product spec // 3. A reminder to future-me what the hell I was building // // If you’re reading this months later: hi 👋 // The product is the automation, not the UI. export default function Home() { return (
{/* -------------------------------------------------- Intro -------------------------------------------------- */}

Stripe → Xero automation

Automatically create and mark Xero invoices as paid when a Stripe payment succeeds.
Built for people who value time more than pressing buttons.

{/* -------------------------------------------------- High-level flow (human readable) -------------------------------------------------- */}

How it works (high level)

  1. Log in via magic link (passwordless)
  2. Connect your Stripe account
  3. Connect your Xero organisation
  4. A Stripe payment succeeds
  5. An invoice appears in Xero as paid
{/* -------------------------------------------------- Magic link auth – detailed flow -------------------------------------------------- */}

Login flow (magic link)

Authentication is passwordless. We only store intent and proof of login.

{/* Text-based flow diagram (easy to read + copy) */}
{`Browser
  |
  | POST /auth/login (email)
  v
Backend
  - find or create user
  - generate token
  - hash token
  - store login_tokens row
  - send email (SES)
  |
  v
Email (magic link)
  |
  | GET /auth/callback?token=XYZ
  v
Backend
  - hash token
  - validate token (unused + not expired)
  - mark token as used
  - create session
  |
  v
Set session cookie
`}
        
{/* Step-by-step breakdown */}
  1. User enters their email address.
  2. Backend creates (or finds) a user record and stores a one-time login token in login_tokens.
  3. An email is sent containing a short-lived magic link.
  4. When the link is clicked, the token is validated, marked as used, and a session is created.
  5. A secure session cookie is set. No passwords. No OAuth popups.
{/* -------------------------------------------------- Stripe → Xero automation flow -------------------------------------------------- */}

Stripe → Xero automation flow

{`Stripe payment succeeds
  |
  | Webhook
  v
Backend
  - verify Stripe event
  - map payment to customer
  - create Xero invoice
  - mark invoice as paid
  |
  v
Xero (reconciled automatically)
`}
        

Once connected, everything runs automatically. No manual reconciliation. No “awaiting payment” state.

{/* -------------------------------------------------- Proof -------------------------------------------------- */}

Proof, not promises

Your next Stripe payment will automatically reconcile in Xero.
No manual matching. No bookkeeping busywork.

{/* -------------------------------------------------- Pricing -------------------------------------------------- */}

Pricing

£200 / month — unlimited invoices.

{/* -------------------------------------------------- Footer / reminder -------------------------------------------------- */}

This page is intentionally simple.
The product is the automation, not the UI.

Implementation notes (for future me)

These are the only docs needed to implement magic-link auth with Next.js + AWS SES.

) }