Everything a new developer needs to know to get started with styreo-v2 - from setup to architecture to recent features like content immutability
Welcome to Code2Cast! I'm here with our guest to walk through onboarding for styreo-v2, an audio content marketplace. So what exactly is styreo-v2?
It's a sophisticated monorepo powering an audio marketplace - think podcasts, audiobooks, music, spoken performances. What makes it interesting architecturally is it's built entirely on Cloudflare Workers with a microservices pattern. You've got services like auth, catalog, payment, media - each one is its own Cloudflare Worker.
And for someone joining the team tomorrow, what's the first-day experience like?
Remarkably smooth! Clone the repo, run 'pnpm install', then 'pnpm start' - that's it. That single command spins up PostgreSQL via Docker, all the service workers, the React frontend, and even Drizzle Studio for database inspection. The team, led by contributors like Samer Ziade and invalidred, has really thought through the developer experience.
Tell me about the architecture. How do these services actually talk to each other?
It's event-driven with a clever fan-out pattern. Services publish domain events to a central queue, then an Events Topic worker distributes them to service-specific consumer queues. So if a user updates their profile, that triggers events that other services can react to asynchronously. The gateway is the only public HTTP endpoint - everything else is private service bindings.
I noticed there's this AGENTS.md file - what's that about?
That's like the team's playbook - 463 lines of detailed conventions covering everything from how to create new services to database patterns to frontend data fetching. It's not just 'here's our style guide' - it's 'here's exactly how we build things, with code examples.' New developers can literally follow it step-by-step to add features.
What about recent development? What's the team been working on?
The big recent feature is content immutability, implemented by invalidred. It's fascinating - once content is published, it becomes immutable. If a creator wants to edit, it automatically forks a new draft version. When they publish, it supersedes the old version but preserves access for people who already purchased the original. It touches dozens of files and shows how thoughtfully they handle complex business logic.
How do they handle code quality and testing?
Four types of tests - domain unit tests, repo integration tests with real PostgreSQL, service method integration tests, and consumer handler tests with mocks. Every test file must cover happy path, negative scenarios, edge cases, and blind spots. They use Vitest, and you can run the full suite with 'pnpm test'. The CI runs lint, test, and auto-formatting on every PR.
What about the frontend? How does that fit in?
React with TanStack ecosystem - TanStack Router, TanStack Query, TanStack Form. Everything goes through a typed oRPC client for end-to-end type safety. No raw fetch calls allowed. There's even Storybook now for component development, thanks to recent work by Samer.
For someone starting, what should they focus on first?
Read the README and AGENTS.md, then look at the users service as a reference implementation. Run 'pnpm start' and explore the running app. Check out the content immutability OpenSpec change docs to see how major features are planned. Most importantly - the patterns are extremely consistent, so once you understand one service, you understand them all.
Any gotchas or things to watch out for?
The scripts/dev-services.mjs is clever - it runs all workers in a single Miniflare instance for service bindings to work locally. If services crash, they auto-restart up to 5 times. Also, never use 'any' in TypeScript - the team has zero tolerance for it. Use exact dependency versions, always run 'pnpm fmt' after changes, and remember that database migrations are auto-generated - never hand-write them.
Who should new developers reach out to for help?
Samer Ziade has been driving a lot of the infrastructure and tooling improvements, while invalidred recently implemented the complex content versioning system. But honestly, the documentation is so thorough that most questions are answered in AGENTS.md or the README. The team has clearly invested in making onboarding as smooth as possible.
Thanks for that comprehensive walkthrough! styreo-v2 sounds like a really well-architected system with excellent developer experience.