Introduction
Architecture, AI,
and TypeScript
What it is, why it suddenly matters, and how to apply it.
Will Madden · PrismaTypeScript Berlin
Tonight's topic
Software architecture in TypeScript
- As a community, we don't have much shared experience with it
- No common language, best practices, or idioms for it
- Unlike Java, C#, C++… OOP never caught on in JS/TS
- We'll look at real examples and how to apply them in TS
- So you walk away tonight with something you can use
First, two quick questions: who's it for? and what even is it?
Question 1
Who is this for?
- Just the senior engineers? No — everyone.
- It sounds scarier than it is
- Not a university-degree thing — simple principles we should all use
- Works even on small projects
- Payoff: maintainability — when the project grows, it's already in good shape
Question 2
What is architecture?
Craft
how you write good code
- naming · single responsibility
- DRY · KISS · refactoring
We're already good at this.
Architecture
how you organize a system as it grows
- your directory structure
- Next.js endpoints vs server components
- Simple rules for how your system grows
A positive definition
Architecture = simple rules for how your system grows
- Projects grow organically — they start simple and get complicated
- We set rules: who owns which responsibilities, who can talk to whom
Why now?
AI.
- The agent now does a lot of the craft we used to do
- So our job is the rules for how the system grows
- Write them down… or better: make them structural
- Documented rules — the agent can ignore them
- Structural rules (types, lint, enforced layering) — it can't break them; the build goes red
Because agents move fast — and they're dumb.
Tonight
Tonight's talks
- Alexey — interfaces, depending on abstractions, dependency injection
- Will — interface segregation & dependency inversion
- André — hexagonal architecture in TypeScript
Vocabulary & techniques → a framework that uses them