Greenfield scaffold for Linkder, a swipe-to-hire marketplace for local
professional services.
- pnpm/turbo monorepo: apps/web, packages/{shared,db}
- Postgres 16 + PostGIS via docker compose (ports 5442/6389 to avoid
clashing with other local stacks)
- Drizzle schema, 23 tables, geography(Point,4326) with GiST indexes
- Domain core in packages/shared: integer-cent money, status transition
graphs, deck ranking weights, cancellation policy — 46 unit tests
- Deck query: filtering in Postgres on the GiST index, ranking in JS so
the weights stay tunable — 18 integration tests against a seeded DB
- Deterministic seed placing pros at known distances, including three
that must NOT appear on a deck (out of radius, unverified, away)
- Next.js 15 app shell with a working swipe deck
- CI: typecheck, lint, test, build against live postgres+redis
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
22 lines
685 B
TypeScript
22 lines
685 B
TypeScript
import { config as loadEnv } from 'dotenv';
|
|
import type { NextConfig } from 'next';
|
|
|
|
// The monorepo keeps one .env at the root; Next only looks in the app directory.
|
|
loadEnv({ path: '../../.env' });
|
|
|
|
const config: NextConfig = {
|
|
reactStrictMode: true,
|
|
// The workspace packages ship TypeScript source, not build output.
|
|
transpilePackages: ['@linkder/db', '@linkder/shared'],
|
|
images: {
|
|
remotePatterns: [
|
|
{ protocol: 'https', hostname: 'picsum.photos' },
|
|
{ protocol: 'https', hostname: '**.r2.dev' },
|
|
],
|
|
},
|
|
// postgres-js opens raw sockets; it must not be bundled into the server chunk.
|
|
serverExternalPackages: ['postgres'],
|
|
};
|
|
|
|
export default config;
|