Growth OS
Get Started

Technical Deep Dive

An honest look at how Growth OS works today: architecture decisions, tradeoffs acknowledged, and future possibilities clearly labeled.

No Backend
Deterministic
Zod Validation
SSR Share

Overview

Growth OS is a deterministic specification generator for product-led growth teams. Users configure their product metadata (type, primary object, value action) and the system outputs complete growth specifications including KPI trees, activation definitions, and tracking plans.

The entire application runs client-side with no backend—all state is encoded into shareable URLs using lz-string compression. Share pages are server-rendered for proper OG meta tags and instant first paint.

This architecture was chosen deliberately to minimize operational complexity while maximizing portability: specs can be bookmarked, shared via any medium, and work forever without server dependencies.

Framework
Next.js 16 + React 19
Language
TypeScript
Validation
Zod Schemas
State
URL-encoded (lz-string)

System Flow

The architecture follows a linear, unidirectional flow from user input to shareable output:

1
Builder
Multi-step wizard collects product type, primary object, value action, TTV, activation rules, and core events. State managed via React with localStorage draft persistence.
2
Validate
Zod schemas validate each step progressively (Step1Schema, Step2Schema, Step3Schema). Final GrowthSpecInputSchema validates the complete input before generation.
3
Generate
generateGrowthSpec() is a pure function: identical inputs always produce identical outputs. No randomness, no external dependencies.
4
Preview/Export
Live preview renders the generated spec. Export options include Markdown, JSON, and Print-to-PDF.
5
Encode
JSON.stringify → compressToEncodedURIComponent creates a URL-safe string. Typical specs compress to ~1-2KB.
6
SSR Share
/s?d=... pages are server-rendered: decode → validate → generate happens on the server for proper OG meta tags and instant first paint.

Key Decisions

Technical choices that define the architecture, with rationale for each.

Deterministic Generator

The generateGrowthSpec() function is pure: same inputs always produce identical outputs. No Math.random(), no timestamps in output (only footer versioning), no external API calls.

Cacheability: Same URL always renders identically. CDN-friendly.
Testability: Snapshot tests are reliable. No mocking required.
Debugging: Share a URL to reproduce exact output. No "works on my machine".

Zod Schema Validation

Runtime validation at every boundary: form steps, URL decode, generator input. TypeScript types are inferred from schemas, ensuring compile-time and runtime safety are in sync.

Progressive validation: Each wizard step validates independently.
Safe decode: Malformed URLs fail gracefully with helpful error UI.
Single source of truth: Schema defines both validation and TypeScript types.

No Backend by Default

The entire application runs without a database, authentication system, or API server. All state lives in the URL or localStorage.

Zero infrastructure: Deploy to any static host (Vercel, Netlify, S3).
Privacy by design: User data never touches a server.
Offline-capable: Bookmarked URLs work forever. No link rot.

SSR for Share Pages

While the builder is client-heavy, share URLs (/s?d=...) are fully server-rendered. This hybrid approach optimizes for different user journeys.

Social previews: OG meta tags must be in initial HTML for link unfurling.
Instant paint: Full spec visible immediately, no hydration delay.
SEO: Share pages are indexable (though marked noindex for privacy).

Tradeoffs

Every architecture has tradeoffs. Here's what we gave up and why we think it's worth it.

Future Options

These features are not currently implemented. They represent possible evolution paths, clearly labeled as future possibilities.

Optional: User Accounts & Storage

Future

Adding authenticated accounts would enable persistent spec storage, revision history, and team collaboration features.

What would change:
  • New database (Supabase/Postgres) to store user specs
  • Auth provider integration (OAuth, magic links)
  • Short URLs replacing lz-string encoded URLs
  • Revision history with diff view
  • Team workspaces with role-based access
Why not now:The URL-based architecture serves the current use case well. Adding accounts introduces infrastructure costs and privacy considerations that may not be worth the tradeoff for a spec generator.

Optional: Analytics Platform Integration

Future

Direct export to Amplitude, Mixpanel, or Segment tracking plan formats.

What would change:
  • New export targets in the generator
  • Platform-specific schema mappings
  • Optional API integration for direct push

Optional: Community Templates

Future

A curated library of community-contributed spec templates for different industries and use cases.

What would change:
  • Template submission and review workflow
  • Searchable template gallery
  • Template versioning and attribution