Everything now renders inside a phone illustration on the entry screen, with a five-tab bar. The frame lives in the root layout rather than one page, so sign-in, onboarding and the job form are inside it too. - Entry screen is the product running, not a marketing page: a live swipeable deck of real verified pros with a trade-filter strip above the card. deck.showcase is the only public procedure in that router and writes nothing, so an anonymous right swipe reaches no one. - Settings: notification preferences (new table, defaults returned when no row exists), signed-in devices, GDPR export, deletion request. Closes the setEmail finding: an unverified address is no longer written to users.email, which is UNIQUE -- claiming a stranger's address used to block them from ever signing up with Google, and the uniqueness error leaked whether an address was registered. Now parked in email_change_requests until a token proves ownership. - Profile: for a pro it leads with their REAL deck card, rendered by the same exported <Card> clients swipe, so the two cannot drift. Adds pro.previewCard (works at draft/pending, where publicProfile 404s) and pro.reorderMedia (photo position 0 is the deck card). Warns before an edit that would send a verified pro back for review, rather than after it silently drops them off the deck. Clients get a thin profile plus a route into pro onboarding -- supply is the launch blocker. - Dev login: +34600000000 / 000000, behind THREE guards (NODE_ENV, an explicit ALLOW_DEV_LOGIN flag, and an exact number match). It overwrites the stored code rather than skipping verification, so the real expiry, attempt cap and single-use consumption still apply. - Seed uses portrait photos. The cards previously showed picsum stock scenery -- a locksmith standing on a railway track. Fixes found along the way: the card's name rendered ink-950 navy on a dark photo because globals.css sets h1..h6 colour in @layer base, which beat the inherited text-white; and the card referenced --color-go-500, --border and --card, none of which exist, so the SEND JOB stamp had no colour. Also adds public/sw.js as a kill-switch: a service worker left registered on localhost:3000 by a different project was intercepting this app's chunks. typecheck, lint clean; 186 tests pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Linkder
Swipe-to-hire marketplace for local professional services. A client describes a job once, then swipes through verified local pros — plumbers, electricians, handymen. A right swipe sends the job to that pro; the pro accepts; chat, quote, booking, escrow payment and reviews all happen in the app.
Web first. The API layer is designed so a React Native app can reuse it verbatim.
Status
M0 — foundation. Complete and verified.
| Milestone | State |
|---|---|
| M0 Foundation — monorepo, Postgres+PostGIS, schema, CI, app shell | ✅ done |
| M1 Auth & profiles | ⬜ next |
| M2 Verification & admin queue | ⬜ |
| M3 The deck (jobs, swipes, requests, matches) | 🟡 deck query + swipe UI working; needs auth + tRPC |
| M4 Chat & scheduling | ⬜ |
| M5 Payments & escrow | ⬜ |
| M6 Reviews & ranking | ⬜ |
| M7 Launch readiness | ⬜ |
Quick start
pnpm install
cp .env.example .env # ports 5442 / 6389 to avoid clashing with other local stacks
pnpm services:up # postgres+postgis and redis in docker
pnpm db:migrate
pnpm db:seed
pnpm dev # http://localhost:3000
The landing page lists the seeded job. Open its deck to swipe.
Layout
apps/web Next.js 15 (App Router) — client, pro and admin UIs
apps/worker BullMQ worker (M3+): request expiry, payouts, reminders
packages/shared money, state machines, ranking weights, zod schemas — no I/O, fully unit tested
packages/db Drizzle schema, migrations, the deck query
packages/api tRPC routers (M1) — the contract mobile will reuse
packages/ui shared components (M1)
Where the important decisions live
packages/shared/src/state-machines.ts— every legal status transition. Mutations must callassertTransition; nothing jumps fromscheduledtocompletedbecause a payload said so.packages/shared/src/ranking.ts— the deck scoring weights. This is the product; expect to tune it weekly against booking conversion.packages/shared/src/money.ts— integer cents only.splitChargealways sums back to the original amount.packages/db/src/queries/deck.ts— the deck query. Filtering runs in Postgres on a GiST index (ST_DWithin), ranking runs in JS so the weights stay tunable.
Testing
pnpm test # everything
pnpm --filter @linkder/shared test # 46 unit tests, no database needed
pnpm --filter @linkder/db test # 18 integration tests, needs a seeded database
The seed is deterministic: every pro sits at a known distance and bearing from the city centre, and the fixture job sits exactly at the centre. So the expected deck is an exact list, not a vague "roughly the nearby ones". The seed deliberately includes pros that must not appear:
| Pro | Why they must be excluded |
|---|---|
| Pau Ribas | 22 km away but only travels 5 km |
| Unverified Ulla | 1 km away, verification still pending |
| Away Arnau | verified, but is_accepting_jobs = false |
Notes and gotchas
- PostGIS type generation. drizzle-kit quotes type names it does not recognise, which turns
geography(Point,4326)into an invalid quoted identifier.packages/db/scripts/fix-postgis.mjsunquotes them and runs automatically as part ofpnpm db:generate. If you ever rundrizzle-kit generatedirectly, run the script afterwards. - Geography, not geometry. Distances come back in metres and
ST_DWithinis correct anywhere without picking a projection per city. Do not replace it with hand-rolled haversine — it will not use the GiST index. - Ports. Postgres is on
5442and Redis on6389, not the defaults, so the stack can run alongside other local projects. - The swipe write is currently a Next server action (
apps/web/src/app/deck/[jobId]/actions.ts) and trusts the caller. It moves into a tRPC procedure with a real session check in M1/M3. It must not ship as-is. pnpm db:seedtruncates everything. It is for local and CI only.
Before taking real money
Flagged in the plan, unresolved by design — these are business decisions, not code:
- Escrow. Holding client funds between charge and transfer is escrow-adjacent. Stripe Connect separate charges & transfers is the sanctioned marketplace pattern, but confirm the specific flow, merchant-of-record and VAT/invoicing position for your jurisdiction with Stripe.
- Cold start. 30–50 verified pros must exist in the launch city before any client opens the app. An empty deck kills the product on day one. This is the real launch blocker, not code.
- Trade liability. Licence and insurance checks are the legal exposure of the whole business. The admin review queue in M2 is not an afterthought.