Firebase + You = Apptastic: A beginner's guide

Firebase is your magical ticket to an app-tastic fiesta. This beginner's guide unlocks the secrets of databases, storage, hosting, and more

5 mins read • Tue Jan 16 2024

My journey with Firebase started when I had to choose a database for an application that I was developing in my freshman year. Freshman year me was facing a big question: how do I make my app's data shareable, like a magic backpack that everyone can reach into? Local storage was cool, but it was a solo party.

Speaking of localStorage, as the name suggests, it is local. You can access the data if it is stored locally. Like I said, it is a solo party. it's like a tiny diary tucked away in your phone's pocket, accessible only to you. Sure, it's handy for jotting down notes, but what if you want to share your brilliant memes with the world?

Now, back to my freshman year. SQL databases? More like hieroglyphics! My SQL knowledge was a blank slate. The thought of wrangling tables and relationships made my head spin faster than a hamster on an energy wheel. I needed something beginner-friendly, something that spoke my language - memes, not mutes.

That is when I came to know about Firebase. An all in one solution for my application. Not only did it offer a cloud-based diary (a.k.a. Cloud Firestore) for my app's data, but it also had a whole treasure trove of other goodies I didn't even know existed. User logins, file storage, crash reporting - Firebase was a one-stop shop for everything my app needed to shine.

“Who is this person? Even I want to see him” - an emotional reference from Ramana

What is Firebase?

Firebase at its core is a Backend-as-a-Service (BaaS) platform, which means it takes care of all the messy server-side stuff you'd usually have to build yourself. Think of it as a pre-built kitchen stocked with all the ingredients (databases, authentication, storage, etc.) for your app to whip up some delicious features.

Firebase be like: “storage venuma storage irukku, database venuma database irukku…”

Services from Firebase

Authentication

Firebase Authentication in your app is similar to a fancy club with bouncers checking IDs at the door. It is your trusty security system, deciding who gets VIP access and who stays on the guest list. You can choose various "bouncers":

  • Email & Password: Classic ID check – users log in with familiar credentials.
  • Social Logins: One-click entry with Google, Facebook, or Twitter accounts.
  • Phone Auth: No password needed! Verify users with a quick SMS code.

Once inside, Firebase keeps track of who's who, letting you personalise their experience and restrict access to certain areas. Need VIPs to edit the content, while guests just view? Firebase makes it a breeze. Plus, it handles password resets and keeps unauthorised guests out, making your app a safe and secure party zone.

Cloud Firestore

Picture your app as a bustling marketplace, buzzing with users and wares. Local storage is like a cramped stall – you can display a few items, but anything more overflows onto the street, lost in the chaos. Cloud Firestore is your sprawling warehouse, packed with goodies yet organised to the brim.

Here's how it works:

  • Documents: Each item in your marketplace is a document – a detailed listing with its name, price, and maybe even a quirky description.
  • Collections: Group similar products into departments, like the "Potions" aisle or the "Enchantments" corner. These are collections, making browsing a breeze.
  • Real-time magic: Imagine a magical bell that rings whenever a new item arrives or an existing one changes. That's real-time magic – updates reflect instantly for everyone, keeping your marketplace vibrant and dynamic.

Cloud Firestore is a chameleon, holding any kind of product you can imagine, from user profiles to game scores. Need a leaderboard that updates as players compete? Or a chatroom where messages appear in real-time? Firestore handles it all with ease. Plus, it's a bottomless warehouse – no matter how much your marketplace booms, your inventory is safe and accessible.

Storage

Local storage, for your social media app, is like a phone's packed gallery – photos get buried, sharing's a hassle. Enter Firebase Storage: a bottomless cloud vault for images, videos, and more! Centralise all your app's files, grant access with a simple link, and watch your content seamlessly sail across the web. It's the upgrade your social media app needs to unleash its full photo-sharing potential!

Think of your app as a vibrant town square. Local storage limits that square to tiny pockets for each user's photos. Firebase Storage transforms it into a bustling marketplace, with a central vault holding everyone's contributions accessible through secure links. It's no longer a jumble of isolated galleries, but a thriving hub where photos freely flow and the social magic truly flourishes!

Hosting

When you build an application, there is no point in having the application only on your device. It has to be accessed from all around the globe by all users.  While it's full of potential, it remains isolated and inaccessible to those who need its treasures. Firebase Hosting acts as a bridge between your app and the world, allowing it to be discovered and utilised by users worldwide.

Here's how it works: You host your app on Firebase's secure cloud servers, effectively establishing a vibrant outpost on a digital island. Firebase then generates unique links, ending with `.web.app` or `.firebaseapp.com,` that serve as magical portals. These links transport visitors from any device, across any distance, directly to your island's valuable resources, ensuring global accessibility and effortless exploration.

And there is more…

We've unveiled some of Firebase's incredible tools, but there's still a vast, uncharted territory filled with app-tastic possibilities! Think of this guide as your launchpad – you've gained the skills and confidence to soar. Now, for even deeper dives and hidden treasures, head over to https://firebase.google.com/solutions

Pricing

Don't be scared of Firebase's price tag! While they offer a "Blaze" tier for heavy users, they also have a fantastic "Spark" tier perfect for beginners or casual apps. Think of it as a free trial in paradise - you get to use all the core Firebase features with generous limits:

  • 1GB Database Storage: Store tons of user data, from profiles to chat messages, all for free.
  • 5GB Cloud Storage: Images, videos, and app files - keep your app packed with goodies without breaking the bank.
  • 10GB Hosting: Share your app with the world and let it shine, all within the Spark plan's limits.

It's a great way to dip your toes into Firebase's magic and see if it fits your app's needs. And if your app takes off, the Blaze tier is always there to scale with you! Start building your dream app now with the power of Firebase Spark's generous free tier.

To know more about pricing: https://firebase.google.com/pricing 

Wrapping up

So, there you have it! Your journey with Firebase has just begun, and the possibilities are endless. You've got the tools, the knowledge, and the spark to build an app that's truly apptastic. Embrace the magic of Firebase, keep learning, keep creating, and remember – the only limit is your imagination. Now, go forth and build something amazing!

P.S. If you're looking for code examples, be sure to look for the upcoming posts 😉

Don't forget to share your apptastic creations with the world! Let the Firebase community know what you've built, and inspire others to join the journey. Remember, we're all in this together, building the future of awesome apps! ✨

Be the first to know.

© 2024 All rights reserved | v3.0