Saved

Architecture Guide

Becoming a Frontend Architect

A guide for senior engineers becoming architects.

I spent years as a developer before anyone expected me to think architecturally. I could build anything: complex forms, animation systems, and real-time dashboards. If you handed me a design, I'd ship it. But when someone first asked me to "think about the architecture," I realized I'd never had to explain why I built things a certain way, only how.

That's the shift this article is about. If you're a senior developer wondering what architectural thinking actually means, you're in the right place.

I took on my first Frontend Architect role in 2007, at AKQA, years before React or any of today's popular frameworks existed. That experience convinced me that architectural principles outlast any particular tool, and that's why I chose patterns for this site that work with any framework. The same thinking applies whether you're using React, Vue, or Svelte, or building without a framework at all.

I wrote this article as an introduction to the Foundations, Guides, and Patterns on this site, so you have a way to think about frontend architecture before you dive into the details. You don't need years of experience designing systems to make good architectural decisions, but you do need a practical way of thinking about them.

The rest of this article describes the way I think about them.

Defining Frontend Architecture

A lot of people think architecture means drawing boxes and arrows in Miro, or choosing between microservices and monoliths. Those diagrams and decisions are the result of architectural thinking.

The way I see it, frontend architecture is about making decisions that keep an app easy to work on over the long term. Your choices affect performance, flexibility, accessibility, security, onboarding, and maintenance. Good architecture makes future work easier, while poor architecture makes the next feature harder, and the one after that harder still.

Anyone on a team can get into the habit of thinking this way, whatever their job title.

Three Levels of Architectural Thinking

I've organized the material on this site into three levels. On a real project you use all three together, and knowing how they relate to each other helps you think like an architect.

Foundations

The Foundations explain the why behind architectural decisions. They cover what the platform gives you, what users need, how teams work together, what the browser guarantees, and what makes an app feel fast. These are the constraints each project has to work within, and the principles that help you work with them.

Explore Foundations →

Guides

The Guides help with the when and the which. If you're choosing a rendering strategy, working out how to structure your tests, or deciding on a CSS approach, I walk through the tradeoffs and help you make a decision. They're opinionated on purpose, so you can stop going back and forth and move on.

Browse Guides →

Patterns

The Patterns are the how: specific, repeatable solutions to common problems at the component, feature, or system level. Each one gives a name to an idea that's proven useful many times before, so you and your team can talk about it without explaining it each time. They're meant for looking up when you need one, rather than reading cover to cover.

View Patterns →

In practice, the Foundations tell you what your limits are, the guides help you choose a direction, and the patterns fill in the details.

The Questions Architects Ask

In my experience, the difference between a developer and an architect has less to do with seniority or job title than with the questions they ask without having to think about it.

Developers askArchitects ask
How do I implement this?What will this implementation make harder to change later?
What's the best library for this?What's the cost of removing this library in two years?
Does this work?Does this fail gracefully?
Can I ship this?Can someone else maintain it?

Good developers ask these questions too. Architects just ask them more often, without anyone prompting them, until asking them becomes a habit.

Over time, you start to recognize patterns. You notice a certain folder structure and know where it leads, or a state management approach and know the debugging problems it's going to cause. You read a pull request and can tell it's going to be hard to maintain before you can explain why.

That intuition comes from years of watching decisions play out, and from dealing with the ones that went badly.

Studying architecture lets you learn from other people's mistakes as well as your own.

Plan for How Features Change

If you only think about features, you focus on what needs building today. If you think architecturally, you also think about how the feature changes over time. It might grow, break, or get reused somewhere else. The team might double, the product might go global, performance might become critical, or deadlines might tighten. And someone new might join and need to understand it quickly.

I learned this the hard way. Early in my career, I built a notification system that worked beautifully for our use case: a single application, one team, and modest traffic. I was proud of it, but then the company grew, and other teams wanted notifications too. My system assumed there'd only ever be one app using it, so the data model, the API, and the queue design were all wrong for what the company needed now. We couldn't extend it, so we replaced it, and the replacement took three times longer to build than the original because we had to migrate live data while keeping the old system running.

The feature itself worked perfectly, but I'd built it for the company as it was that year, and it couldn't grow with the company.

An architect thinks about how hard a feature will be to change later, as well as how to build it today.

Weigh the Tradeoffs

Another big difference between an architect and a senior developer who's good at coding is how they think about best practices. A best practice is meant to apply everywhere, but a tradeoff depends on your situation. "Always use TypeScript" is a best practice. "TypeScript helps when the team is big enough that unwritten agreements about data become hard to keep track of, but slows you down when you're prototyping and the types change faster than you can define them" is a tradeoff.

Every solution has a downside. Fast code might be harder to extend, flexible code might be slower, highly dynamic interfaces might be harder to cache, and a simpler design might mean fewer features.

So instead of asking which option is best, an architect asks which option will cause the least trouble over the next two years.

I've seen senior engineers treat architecture as a search for the cleanest abstraction. In my experience, the job is making a choice the whole team can work with.

I'd rather a team chose a tradeoff on purpose, knowing its downsides, than picked a clever idea without thinking about them.

Using This Site

I built this site as a map, and this is the order I suggest using it in.

Start with the Foundations

The Foundations help you understand your constraints: the devices you support, your performance goals, your accessibility requirements, your security policies, how you deploy, and how experienced your team is. Those constraints tell you what's possible and what's going to take a lot of work.

Use the Guides to Choose a Direction

If you're stuck between approaches, such as rendering strategies, state management options, or ways of testing, I help you weigh the tradeoffs for your situation and make a decision.

Apply Patterns Deliberately

Once you've chosen a direction, patterns fill in the details: state management, routing conventions, data loading strategies, error boundaries, and how you organize your bundles. They help you solve the same kind of problem the same way across the whole system.

Document the Tradeoffs

A pattern that makes the app faster might make new features slower to build, and a state management library that's quick to set up might be hard to debug later. If you document these decisions, the team is less likely to drift away from them, and future engineers can understand why things are the way they are.

Design for the People

Conway's Law says that organizations design systems that mirror how their teams communicate, and in my experience it's more true than most engineers want to admit. Your architecture ends up reflecting your org chart, your team boundaries, and who talks to whom.

So good architecture is really about people. It keeps each part of the system small enough that developers can keep the part they're working on in their heads. It lets teams work in parallel and ship without waiting on each other or overwriting each other's changes. And it has clear boundaries, so each team knows exactly what it owns.

I've watched teams struggle because seven people needed to coordinate on each change, even though the code itself was fine. I've seen codebases where developers always worked around the shared code instead of improving it, because no team owned it and everyone was afraid of breaking it. In both cases, the teams struggled because of how the system was split up between them.

Tools and frameworks change, but you'll always be building software with other people, so these days the first thing I check about any architectural decision is whether it makes working together easier or harder.

Start Small

If you're taking on architectural responsibility for the first time, you can begin with a few small steps instead of refactoring your whole system:

  • Identifying two constraints that shape your app today
  • Choosing a direction for one technical decision your team is facing
  • Picking one pattern you can introduce or formalize
  • Documenting one recent tradeoff and sharing it with your team

If you're clear about your decisions, and talk them through with your team, you start to have influence as an architect.

Explore the Rest of the Site

The rest of this site goes into each of these ideas in more detail, starting with the Foundations, then the Guides, and then the Patterns you can use in your own code.

Frontend architecture is a craft, and the more you practice these ways of thinking, the more natural they become. As an architect, you don't need to know everything, but you do need to think clearly, communicate well, and make decisions that keep your system easy to work on over time.

Keep Exploring