Sayurbox Journey with Firebase

Septiana Nurma Wijayanti
Sayurbox Engineering
4 min readSep 29, 2018

Sayurbox is a tech-supported distribution platform that connects farmers with the end consumers. By disrupting the supply chain, we aim to give broader market access to the farmers. Hence, a good quality local produces would be accessible to everyone in Indonesia.

Before Sayurbox, we built Insantani, a platform for farmers which helped farmers for farm management. I joined Instatani for 6 months, until the founders argued the scalability of the business, then we started to transform the platform towards a B2C model, and it was how Sayurbox defined.

Lesson learn

  • We only focus on tech not on business side, we build with fancy tech stack, and no one use it.
  • Need to focus delivering value to customer
  • When business is not scale, those fancy tech stack is useless (except for me as engineer, i learn a lot of cool stuff from my senior :D )
  • Don’t too hype with technology, once again focus on delivering value to customer!

How firebase help us to validate business and deliver value to customer

At our first release, we used firebase SDK for both front-end (FE) and back-end (BE). Firebase allowed us to avoid building our own auth mechanism, because they gave the hosting and SSL for free. Not only deployment and rollback mechanism were also easy, Firebase also helped us to build our simple catalog and stock system using the real time database.

Sayurbox is actually our first firebase project. Before we launched it to the production, we had very limited firebase knowledge. We also knew that Firebase was also passive, so it took us more time to learn and adapt with firebase data structure & behaviour. Additionally, Firebase could not be queried easily, then we should set up a data backup (in Mongodb) for query purposes of operations team.

Our first release summary

  • We built our web from only 3 pages with Reactjs for 3 weeks prior to its launch
  • We classified the work and logics into FE and BE. However, FE ended up doing more Firebase work than BE
  • Firebase helped us with the auth, realtime database (so the catalog could be approximately real time too), easy deployment, easy rollback, also free storage and SSL.
  • For the first several weeks, our bounce rate is significantly high. Therefore, we should monitor the performance with React Js. Additionally, Firebase initialization needed +-5 seconds, since the server is located in US but our location in South East Asia.

We conduct 1-week-sprint to fix or release new business feature every week. On the first release, we wrote our BE with Java, that is quite stable and good. However, we should do a fast pace development and it was fully stacked. In consequence, we need more time to switch FE Javascript to BE Java. Facing those problems, we decided to use Node Js for development purposes, in order to help us switching easily and rapidly (This is not for scalability or anything).

http://wiki.c2.com/?MakeItWorkMakeItRightMakeItFast

Therefore, to make our development faster and easier, we rely on some tools, such as:

  • Node js, to reduce switching context
  • All cloud (VM, DB)
  • Automation (for deployment)
  • Monitoring tools

After the first release, we realized that we should reduce FE work and move it to BE. Hence the FE could focus on UI/UX. Meanwhile, the BE should be employed only for logic replacement, and yeah, we forgot the basic concept on our first release ^^v.

We used firebase as intermediary between our Front-End and Back-End. It is used to accommodate all the consumer request (web/app) at the first layer, starting from catalog to ordering process. Currently, we have around 70 services written in Node Js, which depends on Firebase.

firebase usage

In term of firebase usage, the load is always 100% peak and undeniably, Firebase becomes our core. Consequently, when the Firebase down, our system is down too. Other people said it was really bad if only relies on one platform, but we have unique condition. We also still learn, keep improving and finding the solution.

Summary

  • We never stop learning and finding better solutions. We could be the first ecommerce in South-East Asia with Firebase core. Not sure what we’re doing right now is better or not. 🙏
  • Delivering value to customer is the first priority, hence we need to accelerate our development and make it easier. The cloud & all monitoring tools significantly help us.
  • Customer first mindset ultimately helps us to grow as better engineers.

Nothing comes easily, and every hardship is meaningful experience :)

Keep daydreaming, love yourself, speak yourself — RM (BTS)

--

--

Septiana Nurma Wijayanti
Sayurbox Engineering

sleepyhead, full time dreamer, part time software engineer, fangirling for happiness~