Arkive

Phase 2 core infrastructure API guard feature system complete

As of
Version3.0.0
Kindplan
Length1,407 words, about 6 min
Tagsplanliving-planphase-2api-guardrlsapiauthenticationfeature-system

Milestone: The architectural backbone is live. withApiGuard is implemented and tested. The feature registry exists. You could add any feature safely from here.

Learning payoff: Middleware patterns, centralized auth, feature flags, the "why" behind the architecture.

Completed: October 2026 — walkthrough in Phase 2 walkthrough

Gate: ✅ Met — Pre 2 foundation hardening complete was required before beginning the original Phase 2 tasks.

#TaskComplexityLearningStatus
2.1Implement resolveApiCaller(req) in packages/core/src/api/auth.ts — cookie sessions; Bearer API keys fail closed until Phase 9🔴🔐 🧩✅
2.2Implement withApiGuard(handler, opts) in packages/core/src/api/guard.ts (see With API guard and Phase 2 build rules and target design)🔴🔐 🧩✅
2.3Wire withRLS inside withApiGuard🔴🔐 🗄️✅
2.4Add basic request logging inside withApiGuard (method, path, userId, latency)🟡🧩✅
2.5Add auth failure logging inside withApiGuard🟡🧩✅
2.6Define FeatureManifest type in packages/features-registry🟡📦✅
2.7Implement ALL_FEATURES array in packages/features-registry/src/index.ts — start with an empty array🟡📦✅
2.8Create user_feature_entitlements table in packages/core with userId, featureKey, RLS policy🔴🗄️ 🔐✅
2.9Implement getEnabledFeatures(tx) in packages/core — reads from entitlements table under RLS🟡🗄️✅
2.10Write a seed script to enable all features for your own user account during development (shipped as packages/ops, below)🟢🗄️✅
2.11Create a test API route /api/health using withApiGuard to verify the full guard chain works🟡🧩 🔐✅
2.12Verify 401 is returned when unauthenticated; 403 when a feature is disabled🟢✅

Phase 2 Exit Criteria: ✅ All met, re-proven on main in lesson 8. withApiGuard is implemented and the /api/health route correctly returns 401/403 in the right conditions. The feature system can enable/disable features per user.

  • withApiGuard is implemented and tested: 14 unit tests and 5 integration tests in packages/core.
  • /api/health returns 401 without a session and 200 with one, checked with curl -i and a signed-in browser.
  • The 403 for a disabled feature is pinned by packages/core/tests/integration/guard.test.ts (responds 403 to a user who is not entitled to the feature). /api/health belongs to no feature, so it can't return 403 by design.
  • pnpm ops:entitlements:grant --email <you> --all enables features per user. Disabling is a DELETE with the privileged role. ALL_FEATURES is still empty, so nothing is granted until Phase 4 registers Taxila.

Lessons

Phase 2 is built piece by piece, with Pratik learning as it goes (how we build). By default the coach hands over one small, explained piece at a time, and the two discuss it before it's final. Pratik writes the steps they call core themselves, and can ask the coach to code work with no learning payoff. Lessons run one at a time, in this order, each in its own thread. A lesson starts only after the previous lesson's PR is merged. The order starts with the smallest, self-contained work and builds up to the guard.

LessonBriefTasksWhat Pratik learns
1 ✅Lesson 1 (tasks 2.6, 2.7): FeatureManifest and ALL_FEATURES2.6, 2.7TypeScript types, package exports, Vitest, branch → PR
2 ✅Lesson 2 (task 2.1): resolveApiCaller2.1sessions vs. Bearer tokens, discriminated unions, mocking
3 ✅Lesson 3 (tasks 2.8, 2.9): entitlements table and getEnabledFeatures2.8, 2.9schema, migrations, RLS policies, grants, integration tests
4 ✅Lesson 4 (tasks 2.2, 2.3): withApiGuard with withRLS2.2, 2.3higher-order functions, generics, transactions
5 ✅Lesson 5 (tasks 2.4, 2.5): request and auth-failure logging2.4, 2.5structured logging, ESLint overrides
6 ✅Lesson 6 (tasks 2.11, 2.12): /api/health and guard verification2.11, 2.12route handlers, testing HTTP by hand
7 ✅Lesson 7 (task 2.10): dev entitlement seed script2.10scripts, database roles, idempotent writes
8 ✅Lesson 8: Phase 2 close-outnonewriting it up

To start a lesson, open a new thread and paste this, changing the lesson number:

Code
Coach me through Phase 2 lesson 1, piece by piece as contracts.md describes:
hand me one explained piece at a time, and I'll say which ones I write myself. Read AGENTS.md,
docs/04-plans/phase-2-core-infrastructure-api-guard-feature-system/contracts.md
and that lesson's brief (the plan's Lessons table links each one) before we start.

Every brief has the same parts: what gets built, the concepts, what the coach reads first, numbered steps, which steps are good to write yourself, questions to check understanding, and when the lesson is done. The coach builds from the target design in Phase 2 build rules and target design, which changes when Pratik's own design wins.

Close-out (lesson 8): the coach wrote Phase 2 walkthrough, marked this plan complete the way Pre-2 was closed, replaced the sketch in With API guard with the shipped behaviour, updated "Where things stand" in the agent guide, and recorded the phase's learnings in 09-notes/ (publish: false). The brief is Lesson 8: Phase 2 close-out.

Design decisions made while planning (details in Phase 2 build rules and target design; each can be revisited in its lesson):

  • Bearer API keys resolve to no caller (401) until Phase 9 adds api_keys.
  • getEnabledFeatures takes the guard's RLS transaction and returns feature keys, so packages/core stays feature-agnostic.
  • Users can read their own entitlements but can't write any. Only the privileged role writes them.
  • The guard checks scope before opening the transaction and checks the feature inside it.
  • Lesson 1: features are identified by key (not slug), object shapes are interfaces, and rollout gating stays out of the registry (post-MVP, B5).
  • Lesson 2: the caller variants are named interfaces with kind: 'key', and any Authorization header resolves to no caller, even alongside a valid session.
  • Lesson 3: entitlements use a composite primary key (user_id, feature_key) with no surrogate id, user_id references profiles, and app_runtime can only SELECT them.
  • After lesson 3: resolveApiCaller returns undefined, not null, for no caller (coding standard: prefer undefined).
  • Lesson 4: handlers read caller.userId (no separate userId), feature stays optional and skips the entitlements query when unset, and the shared test helpers live in packages/core/tests/helpers/.
  • Lesson 5: one place logs (withApiGuard); the checks live in authorizeAndHandle, which returns a response or a denial. api.denied logs the client's code, every event carries userId (null without a caller), and error logs drop Drizzle's query parameters.
  • /api/health requires a session but no feature. The 403 path is proven by lesson 4's integration test.
  • Lesson 6: /api/health returns { status: 'ok' }, and the database client is created on first use (getUnsafeDb()), because next build imports every route module and CI's build has no DATABASE_URL.
  • Lesson 7: the seed is entitlements grant in a dedicated packages/ops package for privileged scripts, which nothing may import. It runs under tsx with dotenv-cli, writes only with --apply, and --apply is one INSERT … ON CONFLICT DO NOTHING RETURNING.

Implementation notes:

  • Task 2.10 shipped as a package, not a registry script. packages/ops holds privileged scripts (dev seeds, provisioning, break-glass), runs them as the postgres role through withPrivilegedDb, and nothing may import it. The dependency direction gained a side branch, ops → registry, foundation (contracts).
  • The guard's order changed from the planning sketch. The scope check runs before the transaction and the feature check inside it, so a rejected key never takes a pooled connection and entitlements are read under RLS. With API guard now describes the shipped order.
  • Tasks 2.4 and 2.5 already cover Phase 10's 10.1 and 10.2 (request and auth-failure logging inside withApiGuard), and the guard's errors already use 10.5's { error, code } shape. Phase 10 still owns the shape for handler errors.
  • Late fixes landed as post notes in earlier walkthroughs: the Data API roles (Phase 1.1 and Pre-2, sidekick#17), the lazy database client (Pre-2, sidekick#21), the ops boundaries element (Pre-2, sidekick#23) and pnpm build approvals (Phase 0, sidekick#14). The walkthrough lists them.
  • Added beyond the original list: a startup check for required variables (apps/web/src/instrumentation.ts, sidekick#22), shared test helpers in packages/core/tests/helpers/ (sidekick#18), and the interface lint rule (sidekick#10).

Carried forward, not built in Phase 2:

  • ops follow-ups: a revoke command, a pnpm ops <noun> <verb> dispatcher with the second command, and a --target check once a second environment exists (B6).
  • CLI design belongs to Phase 9's apps/cli, which calls the API with a key. ops logic moves into admin endpoints when a command is retired; only its interface carries over (Phase 9 API keys CLI).
  • A public liveness probe would be a recorded exception to require-api-guard, decided by Pratik (B7).
  • getClaims() instead of getUser() is the known latency lever, at the cost of revoked sessions working until their token expires (B8).
Arkive

Index

Notes, decisions, and progress on my journey as I build Project Sidekick — built in the open; written as it happens.

Tags (145)

View

233 entries.

As ofTitleKind
2026-10-24Lesson 8: Phase 2 close-outplan phase-2 task guidanceplan
2026-10-24Phase 2 lesson 7 walkthrough: the ops package and entitlements grantbuild walkthrough phase-2 feature-system database postgresql cliguidance
2026-10-24Phase 2 walkthroughbuild walkthrough phase-2 api-guard feature-system rls authenticationguidance
2026-10-24Phase 2 lesson 3 walkthrough: entitlementsbuild walkthrough phase-2 feature-system database drizzle rls postgresql testingguidance
2026-10-24Phase 2 lesson 4 walkthrough: withApiGuardbuild walkthrough phase-2 api-guard rls api authentication testingguidance
2026-10-24Phase 2 lesson 5 walkthrough: request and auth-failure loggingbuild walkthrough phase-2 api-guard observability eslint testingguidance
2026-10-24Phase 2 lesson 6 walkthrough: /api/health and guard verificationbuild walkthrough phase-2 api-guard api nextjs testingguidance
2026-10-24Phase 2 lesson 2 walkthrough: resolveApiCallerbuild walkthrough phase-2 api-guard authentication supabase testingguidance
2026-10-24Lesson 7 (task 2.10): dev entitlement seed scriptplan phase-2 task feature-system database postgresqlplan
2026-10-24Phase 2 build rules and target designplan phase-2 api-guard rls api authentication typescript guidanceplan
2026-10-24Phase 2 lesson 1 walkthrough: feature registrybuild walkthrough phase-2 feature-system typescript monorepo testingguidance
2026-10-24Pre-2 walkthroughbuild walkthrough pre-2 rls supabase drizzle postgresql testing eslintguidance
2026-10-24Agent guideai-coding agent gateway agent-guidance rls supabase drizzle api react prettierguidance
2026-10-24Backlogged unplannedplan living-plan backlog feature-system taxila zinsser alter-ego parrot rls supabaseplan
2026-10-24Commands and environmentai-coding command environment agent-guidance prettier pnpm cliguidance
2026-10-24Living implementation planplan living-plan taxila zinsser alter-ego war-room factory parrot core-driveplan
2026-10-24Phase 2 core infrastructure API guard feature system completeReadingplan living-plan phase-2 api-guard rls api authentication feature-systemplan
2026-10-24Phase 3 graph store metadata serviceplan living-plan phase-3 api-guard rls postgresql api offline graphplan
2026-10-24Phase 9 API keys CLIplan living-plan phase-9 taxila api-guard rls api authentication cliplan
2026-10-24With API guardsystem-design security api-guard rls api authentication typescriptspec
2026-10-23Lesson 3 (tasks 2.8, 2.9): entitlements table and getEnabledFeaturesplan phase-2 task feature-system database drizzle rls postgresql testingplan
2026-10-23Lesson 4 (tasks 2.2, 2.3): withApiGuard with withRLSplan phase-2 task api-guard rls api security testingplan
2026-10-23Lesson 5 (tasks 2.4, 2.5): request and auth-failure loggingplan phase-2 task api-guard observability eslintplan
2026-10-23Lesson 6 (tasks 2.11, 2.12): /api/health and guard verificationplan phase-2 task api-guard api nextjs testingplan
2026-10-23Centralizedsystem-design observability api authenticationspec
2026-10-23Database and securityai-coding database security agent-guidance api-guard rls drizzle api react repository-patternguidance
2026-10-23Error handlingsystem-design observability api-guard rls supabase api nextjs react aispec
2026-10-23Phase 1.1 DB RLS enforcementplan phase-1.1 rls database supabase drizzle postgresql api typescriptguidance
2026-10-23Checkpoint B walkthroughbuild walkthrough phase-0 checkpointguidance
2026-10-20Lesson 2 (task 2.1): resolveApiCallerplan phase-2 task api-guard authentication supabase nextjsplan
2026-10-18Lesson 1 (tasks 2.6, 2.7): FeatureManifest and ALL_FEATURESplan phase-2 task feature-system typescript monorepoplan
2026-10-18Dependency flowsystem-design monorepo clispec
2026-10-18Registrysystem-design feature-systemspec
2026-10-17Core Drive to be Practical and Grounded in Realitysystem-design feature core-drive prdprd
2026-10-17MVP Scopeprd mvp specification core-drive taxila war-room factory alter-ego zinsser parrot api cli native-appprd
2026-10-17An AI Writing Coach and an Appsystem-design prd feature zinsser aiprd
2026-10-17Overview of Taxilasystem-design prd feature taxila ragprd
2026-10-16Best practice rulessystem-design code-quality-check eslintspec
2026-10-16ESLint best practice rulesdecision technical architecture-decision eslint typescript nextjsdecision
2026-10-16Stay on ESLint revisit oxlintdecision technical architecture-decision eslint typescriptdecision
2026-10-16Pre 2 foundation hardening completeplan pre-2 foundation security database testingplan
2026-10-16ESLint plugin boundariessystem-design code-quality-check eslintspec
2026-10-16Portable documentation vaultopportunity documentation agentic-coding portability severity-mediumopportunity
2026-10-16Prettier at repo levelsystem-design code-quality-check prettierspec
2026-10-16Server actionssystem-design nextjs rls api authenticationspec
2026-10-15Pooler client configurationopportunity phase-2 database supabase drizzle severity-mediumopportunity
2026-10-14Vitestdecision technical architecture-decision testing vitest monorepodecision
2026-10-14App runtime role for Drizzledecision technical architecture-decision rls supabase drizzledecision
2026-10-14Profile creation Postgres triggersystem-design security postgresql api authenticationspec
2026-10-14Profiles schemasystem-design security rls authenticationspec
2026-10-14Tag taxonomyai-coding agent-guidance taxonomy discoveryguidance
2026-10-13Anatomy of a Core Drive Entrysystem-design prd feature core-driveprd
2026-10-13Core Drive Stores Personal and Sensitive Informationsystem-design prd feature core-drive taxila graphprd
2026-10-13Core Drive Stores Values Onlysystem-design prd feature core-drive war-room factoryprd
2026-10-13Core Drive to Foster Reflections and Learningssystem-design prd feature core-driveprd
2026-10-13Model Routingprd vercel ai embedding routingprd
2026-10-13Overview of Core Drivesystem-design prd feature core-drive factory ai alter-egoprd
2026-10-13Phase 0 — Foundation and Toolingplan phase-0 api nextjs typescript eslint turborepo pnpmplan
2026-10-13Source Attributionprd feature alter-ego aiprd
2026-10-12Command Paletteprd ux specificationprd
2026-10-12MVP Design Objectiveprd ux specificationprd
2026-10-12Be the Best Version of Yourselfprd value-proposition specificationprd
2026-10-12Make the Right Behavior Easierprd value-proposition specificationprd
2026-10-11Solve Problems and Build Thingsmotivation creativityjournal
2026-10-11A Personal Discoverymotivation discipline bucket-list ambition entrepreneurship sidekickjournal
2026-10-11Commercialize Sidekickmotivation finance freedomjournal
2026-10-10Realityprinciple reality pragmatism survivalguidance
2026-10-10Seek Closureprinciple productivity happiness purposeguidance
2026-10-08No Do-oversprinciple core-drive execution productivityguidance
2026-10-08Pragmatismprinciple practical pragmaticguidance
2026-10-04Protect Your Mind and Your Timeprinciple productivity automation minimalismguidance
2026-10-03Focus Funnelprinciple core-drive productivityguidance
2026-10-02Fuel Career Growthmotivation career ambitionjournal
2026-10-02Learnmotivation learning ai ragjournal
2026-10-02Coding Agent HeuristicsRetiredWhich AI model or coding agent to use for which kind of session based on the type of task, teaching value, and complexitysidekick project technical ai heuristicnote
2026-09-19A graph pattern not a graph databasesystem-design global-tagging-and-linking postgresql graphspec
2026-09-19Actual stateglossary terminologyglossary
2026-09-19Algorithm of lifeglossary terminology nextjsglossary
2026-09-19Alter egosystem-design prd feature taxila alter-ego factory aiprd
2026-09-19API firstsystem-design api clispec
2026-09-19API route fail openopportunity phase-2 api security eslint severity-lowopportunity
2026-09-19API versioningsystem-design apispec
2026-09-19App runtime for Drizzlesystem-design database drizzle postgresqlspec
2026-09-19Approve buildssystem-design monorepo nextjs pnpmspec
2026-09-19Architectural driverssystem-design offlinespec
2026-09-19Architecture invariantsai-coding architecture invariant agent-guidance api nextjsguidance
2026-09-19Asynchronoussystem-design rag embeddingspec
2026-09-19Atomicsystem-design rag embeddingspec
2026-09-19Authenticationsystem-design security taxila api authentication pwa mobile clispec
2026-09-19Background jobssystem-design vercel background-jobspec
2026-09-19Best practicesai-coding-harness agent-guidance drizzle api react pnpm css offline embedding soft-deleteguidance
2026-09-19Build for today designed for futuresystem-design offlinespec
2026-09-19Bundle everythingsystem-design monorepospec
2026-09-19Capacitorsystem-design native-app nextjs mobile offlinespec
2026-09-19Centralizedsystem-design feature-systemspec
2026-09-19Centralized and client agnosticsystem-design security rls api authentication clispec
2026-09-19Centralized copydecision technical architecture-decision authentication typescript clidecision
2026-09-19Centralized copysystem-design contentspec
2026-09-19Checkpoint aplan phase-0 checkpoint nextjs typescript turborepo pnpm cliplan
2026-09-19Checkpoint bplan phase-0 checkpoint eslint prettier turborepo pnpmplan
2026-09-19Checkpoint cplan phase-0 checkpoint nextjs pnpmplan
2026-09-19Checkpoint dplan phase-0 checkpoint api-guard rls supabase drizzle api authenticationplan
2026-09-19CLIsystem-design cli apispec
2026-09-19Context assemblersystem-design ai war-room factory api-guardspec
2026-09-19Coresystem-design feature-systemspec
2026-09-19Corepacksystem-design monorepo pnpmspec
2026-09-19CSS modulessystem-design css eslint mantinespec
2026-09-19DB access chokepointopportunity phase-2 database rls architecture severity-highopportunity
2026-09-19Design constraintssystem-design global-tagging-and-linking rls offline soft-deletespec
2026-09-19dotenv CLIdecision technical architecture-decision clidecision
2026-09-19dotenv CLIsystem-design config clispec
2026-09-19Driving forces and key featuressystem-design api offlinespec
2026-09-19Edge runtimedecision technical architecture-decision supabase api nextjsdecision
2026-09-19Edge runtimesystem-design security supabasespec
2026-09-19Embedding status fieldsystem-design rag embedding typescriptspec
2026-09-19Enforced conventionssystem-designspec
2026-09-19Env vars in turbo JSONdecision technical architecture-decision turborepo verceldecision
2026-09-19Env vars in turbo JSONsystem-design monorepo turborepo vercelspec
2026-09-19Environment contract driftopportunity phase-2 config security developer-experience severity-mediumopportunity
2026-09-19ESLint rules to use tsupdecision technical architecture-decision nextjs eslintdecision
2026-09-19Essential and ideal stateglossary terminologyglossary
2026-09-19Evolvabilitysystem-design rls offlinespec
2026-09-19Factorysystem-design prd feature factoryprd
2026-09-19Feature package workai-coding feature monorepo agent-guidance feature-systemguidance
2026-09-19Flat configdecision technical architecture-decision typescript eslintdecision
2026-09-19Flat configsystem-design code-quality-check eslintspec
2026-09-19Force dynamicdecision technical architecture-decision supabase authentication nextjsdecision
2026-09-19Force dynamicsystem-design nextjs supabasespec
2026-09-19Global tags and metadatasystem-design global-tagging-and-linking taxila zinsser alter-ego war-room factory core-drivespec
2026-09-19GraphQL and Relaysystem-design api graphql relayspec
2026-09-19GraphQL Relaydecision technical architecture-decision api-guard rls supabase drizzle api authentication nextjsdecision
2026-09-19Historic stateglossary terminologyglossary
2026-09-19Idempotent APIsystem-design api idempotencyspec
2026-09-19Independent deploymentssystem-design feature-systemspec
2026-09-19Informationglossary terminologyglossary
2026-09-19Installation at workspace levelsystem-design code-quality-check typescript pnpmspec
2026-09-19Instrumentationsystem-design observability vercel embeddingspec
2026-09-19Isolationsystem-design feature-systemspec
2026-09-19Lifecycle and traceabilityprd governance planningguidance
2026-09-19Mantinesystem-design css mantinespec
2026-09-19Many clients and many consumerssystem-design api pwa ai rag clispec
2026-09-19May become part of Taxilasystem-design core-drive taxilaspec
2026-09-19Middlewaresystem-design security api authenticationspec
2026-09-19Migrationsystem-design database drizzle pnpmspec
2026-09-19Model router contractsystem-design ai model-routing provider-agnostic embeddingspec
2026-09-19Module resolution bundlerdecision technical architecture-decision nextjs typescriptdecision
2026-09-19Module resolution bundlersystem-design code-quality-check typescriptspec
2026-09-19Never mutate outside API layersystem-design apispec
2026-09-19No API versioningdecision technical architecture-decision api-guard api nextjs clidecision
2026-09-19No utility stylesdecision technical architecture-decision eslint mantine cssdecision
2026-09-19Non syncable tablessystem-design database offlinespec
2026-09-19Notesai-coding-harness agent-guidance nextjs eslint pnpm cssguidance
2026-09-19Observabilitysystem-design api-guard api authentication vercel observabilityspec
2026-09-19Observablesystem-design rag embedding observabilityspec
2026-09-19Offline readysystem-design api pwa offline soft-delete idempotencyspec
2026-09-19Package boundary enforcementopportunity phase-2 monorepo eslint architecture severity-mediumopportunity
2026-09-19Parrotsystem-design prd feature parrotprd
2026-09-19Phase 0 foundation tooling completeplan living-plan phase-0 nextjs typescript eslint prettier turborepo pnpmplan
2026-09-19Phase 1 Supabase and auth shellplan phase-1 rls supabase drizzle postgresql authentication nextjsguidance
2026-09-19Phase 1 Supabase auth shell completeplan living-plan phase-1 api-guard rls supabase drizzle postgresql apiplan
2026-09-19Phase 1.1 DB level RLS soft delete enforcement completeplan living-plan phase-1.1 rls supabase drizzle postgresql pnpm soft-deleteplan
2026-09-19Phase 10 observability hardeningplan living-plan phase-10 api-guard rls api authentication nextjs offlineplan
2026-09-19Phase 11 dogfooding friends family access optionalplan living-plan phase-11plan
2026-09-19Phase 12 billing SaaS readiness optional pathplan living-plan phase-12 api offlineplan
2026-09-19Phase 4 Taxila v1 knowledge managementplan living-plan phase-4 taxila api-guard rls drizzle api authenticationplan
2026-09-19Phase 5 Zinsser v1 writing editor firstplan living-plan phase-5 taxila zinsser api mantine ai embeddingplan
2026-09-19Phase 6 core drive AI layer alter egoplan living-plan phase-6 taxila zinsser alter-ego war-room factory core-driveplan
2026-09-19Phase 7 war room factory v1plan living-plan phase-7 war-room factory core-drive rls api offlineplan
2026-09-19Phase 8 PWA iOS shellplan living-plan phase-8 taxila alter-ego nextjs vercel pwa mobileplan
2026-09-19Post mvp factory extensions bots agentsplan living-plan backlog factory parrot api-guard rls supabase drizzleplan
2026-09-19Prd.features.core drive and Taxilasystem-design prd feature taxila core-driveprd
2026-09-19Prefer JSON configsystem-design monorepospec
2026-09-19Present stateglossary terminologyglossary
2026-09-19Productivity Modulesystem-design prd feature war-roomprd
2026-09-19Profile trigger and referential integrityopportunity phase-2 database authentication integrity severity-highopportunity
2026-09-19Public API onlysystem-design api rls authentication clispec
2026-09-19PWAsystem-design pwa offlinespec
2026-09-19RAGsystem-design rag ai embeddingspec
2026-09-19Repository clientsystem-design database rls supabase drizzle api repository-patternspec
2026-09-19Request flowsystem-design monorepo api offlinespec
2026-09-19Retryablesystem-design rag embeddingspec
2026-09-19Row level securitysystem-design security rls drizzle offlinespec
2026-09-19Runtime database URL driftopportunity phase-2 security rls config severity-highopportunity
2026-09-19Runtime role reproducibilityopportunity phase-2 database security severity-criticalopportunity
2026-09-19Runtime validationsdecision technical architecture-decision api-guard supabase api typescript clidecision
2026-09-19Runtime validationssystem-design typescriptspec
2026-09-19Security proof and ciopportunity phase-2 testing ci security severity-highopportunity
2026-09-19Shared tsconfigdecision technical architecture-decision nextjs clidecision
2026-09-19Shared tsconfigsystem-design code-quality-check typescriptspec
2026-09-19Signup confirmation flowopportunity authentication ux severity-lowopportunity
2026-09-19Soft delete supportsystem-design database soft-deletespec
2026-09-19Start Todayprinciple core-drive execution consistencyguidance
2026-09-19State representationsystem-design api aispec
2026-09-19Structured response attributionsystem-design ai structured-streaming source-attribution citationspec
2026-09-19Syncable tablessystem-design database offline soft-deletespec
2026-09-19System overview diagramsystem-designspec
2026-09-19Task 1.1plan phase-1 task supabase postgresql api authentication nextjsplan
2026-09-19Task 1.10plan phase-1 task rls supabase drizzle postgresql authentication typescriptplan
2026-09-19Task 1.11plan phase-1 task api-guard rls supabase api authentication nextjsplan
2026-09-19Task 1.12and1.13plan phase-1 task supabase api authentication nextjs react typescriptplan
2026-09-19Task 1.14plan phase-1 task react pnpm mantine cssplan
2026-09-19Task 1.15and1.16plan phase-1 task supabase authentication nextjs react mantineplan
2026-09-19Task 1.17plan phase-1 task supabase authenticationplan
2026-09-19Task 1.18plan phase-1 task api-guard rls supabase drizzle postgresql authenticationplan
2026-09-19Task 1.2plan phase-1 task supabase drizzle postgresql authentication nextjs pnpmplan
2026-09-19Task 1.3plan phase-1 task supabase nextjs typescriptplan
2026-09-19Task 1.4plan phase-1 task supabase authentication nextjs react typescriptplan
2026-09-19Task 1.5plan phase-1 task rls supabase authentication typescriptplan
2026-09-19Task 1.6plan phase-1 task rls supabase drizzle authentication typescript offlineplan
2026-09-19Task 1.7plan phase-1 task drizzle postgresql typescriptplan
2026-09-19Task 1.8plan phase-1 task turborepo pnpmplan
2026-09-19Task 1.9plan phase-1 task rls supabase drizzle postgresql authenticationplan
2026-09-19Technology stacksystem-design supabase drizzle postgresql nextjs typescript turborepo pnpm vercelspec
2026-09-19Tiered context modelsystem-design core-drive domain situation war-room factory ai embeddingspec
2026-09-19Tiptap requirementsystem-design rag embeddingspec
2026-09-19tsupsystem-design code-quality-check eslintspec
2026-09-19Turboreposystem-design monorepo turborepo pnpmspec
2026-09-19TypeScript hoistingdecision technical architecture-decision nextjs typescript pnpmdecision
2026-09-19Use corepackdecision technical architecture-decision pnpm verceldecision
2026-09-19Use navigation hooksystem-design nextjsspec
2026-09-19User profile creation by DB triggerdecision technical architecture-decision supabase api authenticationdecision
2026-09-19Verceldecision technical architecture-decision nextjs turborepo pnpm verceldecision
2026-09-19Vercelsystem-design monorepo turborepo pnpm vercelspec
2026-09-19Why Prettier at repo level?decision technical architecture-decision prettier turborepo graphdecision
2026-09-19Why Turborepodecision technical architecture-decision turborepo pnpmdecision
2026-08-24Architectural OverviewSidekick's architectural overview — an API-first platform tuned for solo developerssidekick project technical architecturedocument
2026-07-19Project Sidekick - A Bird’s Eye ViewAn introduction to Project Sidekick. What is it? What problem does it solve? Why am I building it?sidekick project essaydocument
2026-07-10Building in the Margins of RealityProject kick-off post and a confessional essay about my past attempts and their failures. Why start now? What do I hope to achieve?sidekick project essayjournal
2026-05-29Checkpoint A walkthroughbuild walkthrough phase-0 checkpointguidance
2026-05-29Checkpoint C walkthroughbuild walkthrough phase-0 checkpointguidance
2026-05-29Checkpoint D walkthroughbuild walkthrough phase-0 checkpointguidance
2026-05-29Config files explainedbuild walkthrough phase-0 turborepo typescript eslint prettierguidance
2026-05-29Phase 1 walkthroughbuild walkthrough phase-1 supabase drizzle authenticationguidance