Roadmap
The roadmap of gentlemans-stack, with what is built, what is planned and what is not started.
The roadmap. Every item heading ends in a status marker: (built), (planned) or (not started). Shipped capabilities
sit under Built, one line and a link each. When a planned item ships, delete its entry, add a line under Built, and record
only what is non-obvious in learnings.md or .trail/learnings. Finished plans are not kept: git history
has them.
Built
Identity on Better Auth (built)
IAM runs Better Auth with sessions, two-factor and passkeys behind /api/auth: services/iam-service.
Workspaces with roles (built)
Workspaces, members, intent-based roles and invitations, served by IAM: domains/workspace-domain.
Audit log and Activity tab (built)
An append-only audit log that the Activity tab in todo-ui reads: domains/audit-domain.
Rate limits (built)
Fixed-window limits driven by contract metadata, with memory, Redis and MongoDB stores: libs/rate-limit.
Observability (built)
OpenTelemetry traces and metrics over OTLP to a local Collector and Grafana: libs/observability.
Schema-driven forms (built)
A Zod schema annotated with ui.* renders a whole form: ui-libs/design-system.
Design tokens for web and Flutter (built)
One tokens.json generates the web CSS, the email colors and every Flutter app's theme: ui-libs/design-tokens.
Generators (built)
Nx generators scaffold models, contracts, domains, services, web apps and mobile apps: AGENTS.md.
Security headers on APIs (built)
Every service gets Hono's secure headers from the shared server setup: libs/server-setup.
IAM follow-ups
The IAM service, login, sign-up and the protected /dashboard are done. These are the open pieces, most important first: security gaps, then correctness, then features, then ideas.
Known gaps from the IAM security review (planned)
- The shared Mongo user can still read Better Auth's collections until production sets
IAM_SERVICE_AUTH_DATABASE_NAMEand gives the other services a Mongo user with no access to that database. The option and the boundary check (pnpm check:iam-boundary) exist; the production users do not. - A browser's own
get-sessioncall can still show a banned or revoked session for up toIAM_SERVICE_SESSION_COOKIE_CACHE_SECONDS(300). Every service call is fresh: services ask IAM withdisableCookieCache, and todo-service then trusts the answer forTODO_SERVICE_IAM_SESSION_CACHE_TTL_MS(60 s).
Workspaces follow-ups (not started)
- Invites: require a verified email on accept once email delivery exists.
- Cache tags in todo-service are per service (
todo), because contract meta is static; a write clears every workspace's cached list.
Login in todo-mobile (planned)
Was IAM Phase 8, optional.
Value: The Flutter app signs in and out against IAM with Better Auth's REST API, keeps the session token, and shows the signed-in user. It talks only to IAM, like todo-ui. Done when:
pnpm nx run todo-mobile:format,pnpm nx run todo-mobile:analyzeandpnpm nx run todo-mobile:testpass (skillflutter-quality-gate).- Manual check on
pnpm nx run todo-mobile:run: sign in, see the signed-in state, sign out.
| Done | Task | Model |
|---|---|---|
| [ ] | Add http and flutter_secure_storage to apps/todo-mobile/pubspec.yaml. Add lib/core/auth/ with an auth client that signs in and up through REST, reads set-auth-token, keeps the token in secure storage, and calls get-session with Authorization: Bearer (bearer plugin). It logs through package:logging, never the token. | Sonnet 5.5 |
| [ ] | Add a login page and a redirect guard via the add-flutter-page skill (go_router in lib/core/router), with widget tests using a fake auth client. | Sonnet 5.5 |
| [ ] | Docs: apps/todo-mobile/README.md (IAM URL, how to run against local IAM) and a learnings entry for any quirk. Run node scripts/docs-lint.mjs. | Haiku 5.5 |
JWT for service-to-service (not started)
- Add Better Auth's
jwtplugin, with/api/auth/jwksanddefinePayloademittingsub,email,name,pictureandroles: string[]split from the admin role, plusissuer,audienceand a shortexpirationTime. - Services switch to
createJwtAuthProvider({ audience, issuer, jwksUrl })fromlibs/auth/src/jwt-auth-provider.ts. - Trade-off: local verification with no IAM call per request, but a revoked session or changed role stays valid until
exp. Keep the TTL short (around 15 minutes) and check the session for sensitive actions.
Not planned
- A same-site proxy or an in-memory bearer in todo-ui for todo-service calls (removed; the user will write their own middleware).
- Dashboard pages beyond Todos, Account and Admin (tenants, settings); the layout only makes them one-file additions.
- Restyling the landing page beyond a short hero.
- Better Auth's organization plugin (ruled out), and models or Mongoose schemas for Better Auth's collections.
- Real email delivery through
libs/emailandapps/email-templates; callbacks only log for now. - Magic links and SSO providers.
- Changing email, email verification and resend, custom roles and permissions, and a Cloud Run deploy config for iam-service.
- Swapping Better Auth's limiter to
libs/rate-limitstorage.
CI, CD and supply chain (not started)
Agreed to do later, together with roadmap step 8.6.
- A CI workflow that runs
pnpm verify, thetodo-uie2e,pnpm check:iam-boundaryandtrail checkon every pull request. - Dependabot or Renovate for the pnpm catalog and the GitHub Actions.
- A secret scan (gitleaks) and a dependency audit in CI.
- A performance budget in CI (bundle size, Lighthouse on the todo-ui landing page).
- A deploy guide for one non-GCP target, and a CD workflow for the Cloud Run deploy.
- A workflow that builds the docs site with
pnpm docs:buildand deploys it to GitHub Pages, in place of the manualpnpm docs:deploy. - Security headers and a nonce-based CSP on the todo-ui server render (API responses already have the basic set).
Production-readiness gaps
Found in a review of what a production SaaS needs beyond what the stack has. Most important first; each needs a short proposal before work starts.
Backend (not started)
- Email delivery. Templates and an SMTP connector exist, but nothing is wired: no verified email, password reset or real invites. Other flows depend on it.
- Data migrations and backups. A versioned migration path beyond Mongoose index creation on boot, and a backup and restore guide.
- Idempotency keys and optimistic concurrency on mutating endpoints, so a retried request cannot double-create.
- Billing (optional add-on). Plans, subscriptions, usage limits and a Stripe webhook receiver.
Background jobs with BullMQ on Redis (planned)
Not built yet, and BullMQ is not a dependency. Redis already serves the cache and the shared rate-limit store. The plan adds a queue connector and a worker entry so emails, cleanup and webhooks run with retries and schedules. It needs a short proposal first: the connector, job contracts, and how a trace continues from the request into the job.
Frontend (not started)
- Error reporting. A crash tracker with source maps (browser errors only reach traces today).
- Account recovery pages. Verified email, forgot password, recovery; blocked on email delivery.
- Accessibility and performance gates. An automated axe check (the Lighthouse budget is under CI above).
- Notifications and file upload with a storage connector, for products that need them.
Later (not started)
Feature flags, an API versioning and deprecation policy, outbound webhooks, search, and a LICENSE decision (open source or private).
Stack roadmap (not started)
Carried over from the finished convergence plan. Each item still needs a written proposal before work starts.
| Step | Item | Model |
|---|---|---|
| 8.1 | Publish @gentlemans-stack/* libs to npm and replace sync-from-stack with versioned dependencies | Opus |
| 8.2 | A gentlemans-stack CLI (init, add, update, doctor) that wraps the Nx generators and replaces the shell installer | Opus |
| 8.3 | More platform add-ons (platforms/aws, platforms/azure) and more --deploy targets | Sonnet |
| 8.4 | Turn agentry-labs into a versioned plugin/marketplace so --sync becomes a plugin update. Each ~/.claude/skill-shelf group (video, audit, flutter-assets) becomes its own plugin, switched on and off with Claude Code's built-in plugin enable/disable, globally or per project; then retire scripts/shelf.mjs and the shelf folder | Sonnet |
| 8.5 | Revisit large leftovers: DeskMate's fork (plugin-kit, connectors), the stack's mobile and web UI kits, design-tokens as a package | Opus |
| 8.6 | Rebuild CI in every repo from scratch (the old GitHub workflows were deleted before Phase 5): one shared workflow shape, including the sync-from-stack --check step. Moved from 7.4 | Sonnet |