Building a Firebase App without a Library and Framework

Building a Firebase App without a Library and Framework

Software development, particularly on the frontend, has grown increasingly complex over the years. As a developer at RoyalZSoftware, where we build full-stack apps with Firebase, I’ve seen firsthand how the ever-growing pile of dependencies can make projects feel overwhelming. Just thinking about spinning up a simple Angular or React application makes my node_modules folder balloon with thousands of packages, many of which I have no idea why they're even there.

In this post, I want to address this bloat head-on and explore a different path—one that doesn’t involve blindly accepting these endless dependencies as our fate.

The Problem with Modern Frameworks

Single-page application frameworks like React and Angular are amazing, but let’s be honest—they’re built for a scale that most of us aren’t dealing with. React was created by and for Facebook; Angular, by and for Google. These platforms solve problems for massive, enterprise-level applications.

But what about a small, simple app for a customer? Why do we need the overhead of large frameworks for something we can easily handle with vanilla JavaScript?

For many projects, basic JavaScript can do the job beautifully and efficiently, without any unnecessary dependencies clogging up our project.

Enter Vanilla JS + Firebase

Recently, I built a customer-facing app using nothing more than vanilla JavaScript, following a mobile-first approach. The only dependency I installed was Firebase, and I didn't even need modules to get the job done. With the help of the Firebase compat library, everything works perfectly. And the best part? If you take a look at the app, you’d never know it wasn’t built using some cutting-edge framework. You can check it out for yourself here.

Or check out this video right here:

https://youtube.com/shorts/X_90ZH2byZI?si=XjAIdEY3H-T5H5Vn

This approach cuts through the noise and keeps things incredibly simple. And since there’s no fancy framework to learn, new developers can jump in and extend the app as long as they know JavaScript.

When This Approach Works (And When It Doesn’t)

This vanilla JavaScript setup works like a charm for small-to-medium-sized apps, but there are situations where it might not be the best fit. When working on a larger-scale project with many pages, complex flows, or modals, frameworks like React or Angular start to shine. These tools are built for that level of complexity and will make your life easier in those situations.

If you’re unsure which direction to go, the key is to focus on writing good code. Separate your domain logic and data access from your UI. By keeping your core business logic independent, you can build the user interface with whatever tools make sense. And if you decide later that you need a framework, you can easily integrate it without starting from scratch.

Why Vanilla JS and Firebase Are Perfect for Small Apps

The beauty of this approach is the simplicity it brings. You get the full power of Firebase without the overhead of a heavy framework. This makes it ideal for smaller apps, especially when speed and efficiency are important. Vanilla JavaScript, combined with Firebase’s backend-as-a-service, allows you to develop apps that are both lightweight and highly functional.

For example, I used the Firebase compat library to avoid needing modules, making everything work smoothly without introducing complexity. The app looks modern, runs smoothly, and is easy to maintain. What more could you ask for in a small-to-medium project?

A Final Thought on Future Proofing

If your app eventually grows beyond a simple structure, don’t worry. It’s easy to scale up by introducing TypeScript or a more complex framework later. TypeScript can import JavaScript with minimal changes, so when the need arises, you can layer in additional tools and libraries to handle the growth. Start simple, and build complexity only when it’s absolutely necessary.

Speaking of writing good code, now is the perfect time to sign up for the RoyalZSoftware newsletter! Stay tuned for more tips, tricks, and insights from the world of software development.


By embracing the simplicity of vanilla JavaScript and Firebase, you can avoid bloated codebases while delivering fast, efficient apps. No need for thousands of unnecessary packages—just clean, maintainable code that gets the job done.