Understanding Quality Levels
Craft's unique approach: quality that matches YOUR context, not rigid dogma.
Why Quality Levels?
Traditional boilerplates force you into a one-size-fits-all architecture. Either too simple (no scalability) or too complex (over-engineered for MVPs).
Craft is different. It understands that a 2-week MVP needs different quality standards than a 10-year enterprise platform.
The Craft Philosophy
"Ship it right for where you are now. Upgrade seamlessly when you need more."
The Three Levels
Rapid - MVP Mode
Ship fast, validate your market, iterate quickly. Perfect for solo founders and early-stage startups.
Context
- • Team: 1-2 developers
- • Users: 0-100 early adopters
- • Lifespan: 3-6 months
- • Revenue: $0-5K MRR
Technical Rules
- • Max 100 lines/function
- • Flat architecture
- • No test coverage required
- • Duplication acceptable (warn at 3x)
Architecture Pattern
// All logic in tRPC router
export const productRouter = router({
create: protectedProcedure
.input(createProductSchema)
.mutation(async ({ ctx, input }) => {
// Validation, business logic, DB access all here
// Up to 100 lines is OK!
return await ctx.db.product.create({
data: input
})
})
})Best for: Testing an idea, building a prototype, launching quickly to get feedback
Balanced - Growth Mode
Pragmatic quality for growing products. Clean code, testable, maintainable - without dogmatism.
Context
- • Team: 3-10 developers
- • Users: 100-10K paying customers
- • Lifespan: 1-3 years
- • Revenue: $5K-100K MRR
Technical Rules
- • Max 50 lines/function
- • 3-layer architecture
- • 70% test coverage enforced
- • Duplication flagged at 2x
Architecture Pattern
// Router: Thin orchestration
export const productRouter = router({
create: protectedProcedure
.input(createProductSchema)
.mutation(({ ctx, input }) =>
productService.create(ctx.userId, input)
)
})
// Service: Business logic
export const productService = {
async create(userId: string, input: CreateProduct) {
// Pure business logic (< 50 lines)
// Fully tested
}
}Best for: Product-market fit achieved, growing user base, need reliability
Crafted - Enterprise Grade
Software craftsmanship. Built to last 10+ years. Full Domain-Driven Design with hexagonal architecture.
Context
- • Team: 10-200+ developers
- • Users: 10K-1M+ users
- • Lifespan: 5-10+ years
- • Revenue: $100K+ MRR
Technical Rules
- • Max 20 lines/function
- • Hexagonal DDD architecture
- • 100% test coverage (domain)
- • Zero duplication (CI fails)
Architecture Pattern
// Domain: Pure business logic (ZERO dependencies)
export class Product extends Entity {
// Rich domain model
// 100% test coverage
}
export class CreateProductUseCase {
execute(input: CreateProductDTO) {
// Orchestration only (< 10 lines)
}
}
// Infrastructure: Implementations
export class PrismaProductRepository implements IProductRepository {
// Data access
}Best for: Enterprise scale, complex domain logic, long-term maintainability
Comparison Matrix
| Aspect | Rapid | Balanced | Crafted |
|---|---|---|---|
| Max lines/function | 100 | 50 | 20 |
| Architecture | Flat | 3-Layer | Hexagonal DDD |
| Test coverage | Optional | 70% | 100% (domain) |
| Time to ship | 2 days | 1 week | 2 weeks |
| Best for users | 0-100 | 100-10K | 10K+ |
Choosing Your Level
Start with Rapid if:
- • You're validating an idea
- • You need to launch in days, not weeks
- • You have <100 users
- • You might pivot soon
Use Balanced if:
- • You have product-market fit
- • You're growing (100+ users)
- • You have a small team (3-10 devs)
- • You need reliability without over-engineering
Go Crafted if:
- • You're at scale (10K+ users)
- • You have complex domain logic
- • You have a large team (10+ devs)
- • You need enterprise-grade quality