ProductReady v0.8.0 Release Notes 🏗️
Domain architecture refinement, shared logic extraction, and production reliability fixes
Released: 26 Jan 2026
ProductReady v0.8.0 brings major architectural improvements focused on code organization, reusability, and production reliability. This release refactors the codebase to follow Domain-Driven Design principles more closely, extracts shared business logic for reuse across apps, and fixes critical bugs that improve the user experience.
🌟 What's New
- Shared business logic extraction - System admin logic now reusable across all apps
- Domain architecture refinement - Components colocated with their domain logic
- Router consolidation - Clean domain boundaries with DDD principles
- Critical bug fixes - Cookie policy, llms.txt, waitlist sync, pagination
- Enhanced API surface - New OpenAPI endpoints for system admin operations
✨ Why This Matters
🏗️ Shared Business Logic: System Admin Extraction
The problem we solved: System admin features (user management, space listing, artifact tracking, statistics) had duplicate implementations in tRPC and OpenAPI. When fixing a bug or adding a feature, developers had to change code in two places. This led to inconsistencies, more bugs, and wasted effort.
What we did:
Created a shared packages/share-domains/systemadmin/ package with reusable business logic:
4 shared logic functions:
getSystemStats()- Platform statistics (users, spaces, artifacts, storage)listUsers()- User management with search and filteringlistSpaces()- Space/organization listing with paginationlistArtifacts()- Artifact tracking and management
Before (duplicated):
// tRPC implementation (312 lines)
export const systemAdminRouter = router({
getStats: async ({ ctx }) => {
const users = await ctx.db.user.findMany();
const spaces = await ctx.db.space.findMany();
// ... 80 lines of business logic
}
});
// OpenAPI implementation (150 lines)
app.get('/api/v1/system-admin/stats', async (c) => {
const users = await db.user.findMany();
const spaces = await db.space.findMany();
// ... 80 lines of DUPLICATE business logic
});After (shared):
// Shared logic (one place)
export async function getSystemStats(db: Database): Promise<SystemStatsVO> {
const users = await db.user.findMany();
const spaces = await db.space.findMany();
// ... 80 lines in ONE place
}
// tRPC (5 lines)
export const systemAdminRouter = router({
getStats: async ({ ctx }) => getSystemStats(ctx.db)
});
// OpenAPI (5 lines)
app.get('/api/v1/system-admin/stats', async (c) => {
return c.json(await getSystemStats(c.get('db')));
});Why this matters:
- Single source of truth - Fix once, works everywhere
- API consistency - tRPC and OpenAPI guaranteed to return identical data
- Easier testing - Test business logic independently of API layer
- Cross-app reuse - All 12 apps can use the same logic
- Reduced duplication - ~250 lines of duplicate code eliminated
New OpenAPI endpoints added:
GET /api/v1/system-admin/spaces- List all spaces with filteringGET /api/v1/system-admin/artifacts- List all artifacts with search
Technical improvements:
- Type-safe with
SystemStatsVO,ListUsersInput/Result, etc. - Proper VO/DTO separation
- Clean dependency injection (database passed as parameter)
- Testable pure functions
🎯 Domain Architecture Refinement
The problem we solved: System admin UI components were scattered in src/components/systemadmin/ while business logic lived in src/domains/systemadmin/. Developers had to jump between folders to understand a feature. Related code wasn't colocated.
What changed:
Before (scattered):
src/
├── components/
│ └── systemadmin/ # 35 UI component files here
└── domains/
└── systemadmin/
├── logic/ # Business logic here
└── types/ # Types hereAfter (colocated):
src/
└── domains/
└── systemadmin/
├── components/ # 35 UI components ✅
├── logic/ # Business logic
└── types/ # TypesWhat we moved:
- 35 component files from
src/components/systemadmin/tosrc/domains/systemadmin/components/ - Page components (users-page, overview-page, spaces-page, etc.)
- List components (users-list, notifications-list, etc.)
- Detail pages (user-detail, space-detail, survey-detail)
- Dialogs and utilities
Why this is better:
- Faster feature development - All related code in one place
- Better code discovery - New developers find everything together
- Shorter import paths - Use relative imports (
./users-listinstead of~/components/systemadmin/users-list) - Clear ownership - Domain boundaries are explicit
- Easier maintenance - Changes stay within domain folder
- Follows DDD principles - Components, logic, types together
Real developer experience:
Before:
// Jump between 3 folders to understand "users" feature
src/components/systemadmin/users-page.tsx // UI
src/domains/systemadmin/logic/users.ts // Logic
src/domains/systemadmin/types/users.ts // TypesAfter:
// Everything in one domain folder
src/domains/systemadmin/
├── components/users-page.tsx // UI
├── logic/users.ts // Logic
└── types/users.ts // Types📦 Router Consolidation: Clean Domain Boundaries
The problem we solved: tRPC routers were scattered between src/server/routers/ and domain folders. Some routers had duplicate implementations. Navigation was confusing.
What we consolidated:
4 router migrations:
-
usage → billing domain
- Usage tracking is part of billing functionality
- Moved
usage.tsintodomains/billing/trpc/ - API remains backwards compatible:
trpc.usage.*
-
api-keys → new api-keys domain
- Created standalone domain with router + UI component
- Moved both router and settings component together
- Clean domain boundary for API key management
-
scheduled-tasks → agent domain
- Task scheduling is part of agent functionality
- Moved into
domains/agent/trpc/ - 5 related components already in agent domain
-
users (duplicate) → removed
- Deleted duplicate users router (103 lines)
- Kept comprehensive systemadmin version (312 lines)
- Removed confusion between two implementations
Router placement decisions documented:
Kept at root level (with rationale):
system-surveys.ts- Platform-level public survey submissiondashboard-stats.ts- Cross-cutting analytics aggregation
Why this matters:
- Clear architecture - Each domain owns its routers
- No duplication - One implementation per feature
- Better navigation - Know where to find code
- Consistent patterns - All domains follow same structure
- Easier onboarding - New developers understand boundaries
Final state:
- 2 infrastructure routers at root level (clearly documented why)
- 15 domain folders with their own routers
- Zero duplicate router implementations
🐛 Production Reliability Fixes
What we fixed:
1. Waitlist invite code status sync
- Problem: After admin approves user, status doesn't update to "activated" when invite code is used
- Fix: Auto-update waitlist status when code is activated
- Impact: Admins now see correct status, users can't re-submit after approval
2. Cookie policy 404 error
- Problem:
/cookie-policyURL returned 404, breaking GDPR compliance - Fix: Created complete cookie policy pages in all 3 languages (en, ja, zh-CN)
- Impact: Legal compliance, proper footer navigation
3. llms.txt route 404
- Problem: Route compilation hung due to top-level await in fumadocs
- Fix: Simplified to static content with proper
Content-Typeheader - Impact: LLMs can now discover documentation
4. Posts pagination bug
- Problem: Duplicate search input caused pagination to reset to page 1
- Fix: Removed redundant search input, kept DataTable's built-in search
- Impact: Pagination works correctly, no more jumping back to first page
Why these fixes matter:
Each bug affected real user workflows:
- Waitlist sync - Admins couldn't track user progress accurately
- Cookie policy - Legal requirement for EU users (GDPR)
- llms.txt - AI agents couldn't discover our docs
- Pagination - Admin couldn't navigate through large data sets
All four bugs are now resolved in production.
🔧 For Developers
New Shared Logic Packages
System admin business logic (reusable across all apps):
import { getSystemStats } from 'share-domains/systemadmin/logic/system-stats-logic';
import { listUsers } from 'share-domains/systemadmin/logic/users-logic';
import { listSpaces } from 'share-domains/systemadmin/logic/spaces-logic';
import { listArtifacts } from 'share-domains/systemadmin/logic/artifacts-logic';
// Use in any app (tRPC, OpenAPI, GraphQL, etc.)
const stats = await getSystemStats(db);
const users = await listUsers(db, { search: "john", page: 1, limit: 10 });Type definitions:
import type { SystemStatsVO } from 'share-domains/systemadmin/types/system-stats';
import type { ListUsersInput, ListUsersResult } from 'share-domains/systemadmin/types/users';Domain Structure Pattern
All domains should now follow this structure:
src/domains/{domain-name}/
├── components/ # UI components (React)
├── logic/ # Business logic (pure functions)
├── types/ # Type definitions (VO/DTO)
├── trpc/ # tRPC routers
└── README.md # Domain documentationReference implementation: src/domains/systemadmin/
Router Organization Rules
When to create a domain router:
- Feature has 10+ procedures
- Clear business concept
- Has both UI and backend logic
- Multiple developers work on it
When to keep at root level:
- Platform infrastructure (system-surveys)
- Cross-cutting concerns (dashboard-stats)
- Temporary/experimental features
See content/docs/architecture/router-placement-decisions.md for full guidelines.
Breaking Changes
Minor breaking change:
trpc.users.*removed (duplicate router deleted)- Migration: Use
trpc.systemAdmin.users.*instead - Impact: Only affects productready app, other apps unchanged
Backwards compatible:
- All domain router migrations maintain root-level API paths
trpc.usage.*still works (extracted from billing domain)trpc.scheduledTasks.*still works (extracted from agent domain)
New Exports in package.json
share-domains package added 8 new subpath exports:
{
"exports": {
"./systemadmin/types/system-stats": "./systemadmin/types/system-stats.ts",
"./systemadmin/logic/system-stats-logic": "./systemadmin/logic/system-stats-logic.ts",
"./systemadmin/types/users": "./systemadmin/types/users.ts",
"./systemadmin/logic/users-logic": "./systemadmin/logic/users-logic.ts",
"./systemadmin/types/spaces": "./systemadmin/types/spaces.ts",
"./systemadmin/logic/spaces-logic": "./systemadmin/logic/spaces-logic.ts",
"./systemadmin/types/artifacts": "./systemadmin/types/artifacts.ts",
"./systemadmin/logic/artifacts-logic": "./systemadmin/logic/artifacts-logic.ts"
}
}📊 By the Numbers
- ~250 lines of duplicate code eliminated
- 35 components moved for better domain cohesion
- 4 routers consolidated into domains
- 2 new OpenAPI endpoints added (spaces, artifacts)
- 4 shared logic functions created
- 8 type interfaces defined for reusability
- 4 critical bugs fixed
- 3 languages supported in cookie policy (en, ja, zh-CN)
🚀 Getting Started
If you're upgrading:
- Update dependencies:
pnpm install - Check if you're using
trpc.users.*- migrate totrpc.systemAdmin.users.* - If you've extended system admin, update import paths to new domain structure
- No database migrations needed for this release
For other apps in monorepo:
If you want to adopt these improvements:
-
Use shared system admin logic:
pnpm add share-domains@workspace:* -
Refactor your domains following systemadmin pattern:
- Move components into
src/domains/{domain}/components/ - Keep logic in
src/domains/{domain}/logic/ - Colocate routers in
src/domains/{domain}/trpc/
- Move components into
-
Reference documentation:
content/docs/architecture/router-placement-decisions.md
💡 What's Next
Looking ahead to v0.9.0:
- More shared logic extraction - Extract more domains (billing, agent, spaces) to share-domains
- Cross-app rollout - Apply domain architecture to other 11 apps
- Enhanced testing - Unit tests for shared logic functions
- API documentation - Auto-generated OpenAPI specs for all domains
- Performance monitoring - Real-time metrics for system admin operations
🙏 Thank You
This release represents a significant step in ProductReady's evolution toward a clean, maintainable, and scalable architecture. Special thanks to:
- Developers adopting Domain-Driven Design principles
- Teams testing system admin shared logic across apps
- Contributors identifying and reporting bugs
- Everyone providing feedback on code organization
Your feedback and contributions make ProductReady better for everyone.
Ready to upgrade? Run pnpm install to get v0.8.0.