Pick simple architecture for small projects. Save complex setups like micro-frontends for giant teams. Boring code = happy developers.
Let me tell you a quick story. A developer I know—let's call him Sam—was building a website for a small bakery. The bakery just wanted to show their bread prices and store hours. Simple, right?
But Sam decided to use a very complex setup called "micro-frontends." He split the header, the menu, and the contact form into three separate apps. To make the website work, you had to run multiple servers. The bakery owner got confused. The project took three times longer than it needed to. And for what? A page that shows sourdough bread.
The lesson? Use the right tool for the job. A small hammer is fine for hanging a picture. You don't need a wrecking ball.
So let's look at the common ways to organize big frontend projects. I'll tell you what works, what doesn't, and what you should pick based on your project.
This is the most common setup. You pick one framework—React, Vue, or whatever you like. Then you split your code into folders like UserProfile, ShoppingCart, and Payment. Each folder handles its own job. They don't mess with each other.
Why it's good: It's boring. Boring is great. When something breaks at 2 AM, you can find the problem quickly. You don't need to be a genius to understand it.
Real-life example: You're building a project management tool like a simple Trello clone. You have a list of tasks, a button to add tasks, and a search bar. This setup works perfectly.
This method usually lives inside the first one. You build tiny pieces—like a Button or an InputBox—and then you reuse them everywhere. Change the button once, and every button on your site changes automatically.
Real-life example: A company with a strict brand style. Blue buttons should always look the same. So you make one Button component and use it 100 times. Easy.
A small warning: Don't go overboard. I once saw someone create a special component for a simple div (a basic box on the page). They wrapped it inside other components. The final webpage had thousands of extra lines of code. The site became slow. Don't do that. Some things can stay simple.
This is the complex setup Sam used for the bakery. You treat different parts of your website as if they are their own little websites. Team A works on the header. Team B works on the search page. They can even use different frameworks.
Real-life example (good use): Big companies like Spotify or Walmart. They have hundreds of developers. One team shouldn't have to wait for another team to fix their bugs. They need to work separately.
Real-life example (bad use): A startup with five people. The boss read a blog post about "scalability" and wanted to use this setup. Suddenly, you have five different code repositories, five different ways to deploy, and the login page breaks because one tiny piece went down. Not fun.
Here's a simple way to decide. No fancy terms.
Step 1: Is this a blog or a simple business website?
Step 2: Is this an internal tool or admin panel? (Lots of forms, lists, buttons)
Step 3: Do you have 10+ frontend developers fighting over the same code?
Here's the secret: The right architecture depends on your product and your timeline.
The best architecture is the one that lets you finish your work and go home on time. Don't make things harder than they need to be.
Start simple. Create a folder called components. Write your code. You can always reorganize later if you need to.
And yes, please use TypeScript. But that's a conversation for another day.
Now go build something useful. Good luck!
Join the newsletter for practical insights on architecture, code quality, and developer workflow.
Comments
No approved comments yet.