Co-founder and CTO, Cajoo
Cajoo's development team needed to move fast as an early-stage startup.
Their initial technical architecture included a React Native mobile app connected to Shopify as their ecommerce backend (their order management system), a third-party warehouse management system, a third-party courier delivery application, and a Nest JS API hosted in Heroku to connect all these systems and handle user authentication.
As their customer base grew, they started to observe performance and flexibility bottlenecks affecting user experience and decided to redesign their tech stack to cater to their custom scenarios and meet business demands. The challenges Cajoo faced with the initial tech stack included:
Cajoo needed to manage different stock quantities per warehouse, which Shopify struggled with. To work around it, they included the warehouse stock information in the product meta field and left the client to handle the filtering. But as the number of warehouses and products increased, fetching product data became cumbersome and slow, leading to slower app response time and a poor user experience.
Cajoo's team needed to stay lean and iterate quickly on new features. The engineers needed to be flexible enough to work on and understand all layers of their system — database, backend, integrations, and the frontend web UI.
The Cajoo team needed features which the Shopify API did not natively offer. In addition, they wanted to avoid the rate-limiting on Shopify APIs, which caused their application to struggle, especially during peak periods.
The Cajoo team wanted to move away from overreliance on third-party proprietary software. Building in-house order management and warehouse inventory software meant they had complete control of the technology supply chain.
Cajoo’s initial tech architecture
Co-founder and CTO, Cajoo
As Cajoo started investigating solutions to the challenges above, they discovered Hasura while browsing Hacker News and decided to try it out. They migrated their entire ecommerce backend from Shopify to their proprietary in-house software in four weeks with just three engineers.
The Cajoo team settled on Hasura because it provided features such as instant GraphQL APIs on their databases, subscriptions, aggregates, and event triggers that aligned with the direction of their future tech stack.
Cajoo’s new tech architecture
Hasura's intuitive user interface and documentation made it easy to set up and connect their Postgres database, making their data instantly accessible over GraphQL APIs. Hasura also took care of their API data layer, allowing them to focus on architecture and custom business logic while saving them development and maintenance time.
Hasura offered the flexibility and control Cajoo was seeking, as it is open-source and can be run locally or in the cloud. It can also connect to a private database instance so Cajoo can essentially control its data and avoid third-party vendor lock-ins.
Hasura provided built-in security and authorization capabilities, which allowed for a role and user-based authorization down to the individual column and row level. Having this feature out-of-the-box saved Cajoo development time and ensured security was baked right into every application's data layer.
Hasura provided out-of-the-box support for subscriptions and aggregates. Cajoo could implement real-time delivery tracking with subscriptions, so the client's screen gets updated anytime there's a change to the order status. Having aggregates automatically generated with the GraphQL API meant the backend could easily carry out queries such as order counting and filtering with a single line of text.
Cajoo's infrastructure relied heavily on events such as notifying the client via email when an order was placed and notifying warehouses via Slack to let them know the new order was to be fulfilled. Hasura offered a reliable and easy way to create event triggers on specified tables and invoke webhooks (like listening to Stripes API for payment success) to carry out business logic.
Cajoo also utilized Hasura Event Triggers and webhooks to provide real-time integrations to the multiple AWS Lambda functions they're using.
Utilizing Hasura for their ecommerce backend worked so well they then replaced other pieces of their stack using the same architecture: their warehouse management system and the courier delivery application.
Some of the other benefits they attributed to using Hasura include:
Cajoo saw improved performance on their client's applications after implementing Hasura. The client's data fetching time improved from 10 seconds to load all products in a category to less than 1 second, which greatly improved customer experience and kept customers from bouncing off a page that took too long to load.
Hasura's simplified GraphQL data fetching architecture made it easy to add new features in less time. Cajoo was able to migrate their ecommerce backend from Shopify in less than four weeks and roll out their custom delivery tracking application in less than a month because of the speed at which Hasura helped them operate.
Cajoo experienced significant cost savings with Hasura. Monthly infrastructure costs went from over $2,000 to just $100 with Hasura (about a 95% reduction in cost).
Hasura enabled Cajoo to move to a cleaner and more reliable application architecture. They could migrate to a serverless architecture using AWS Lambda with a one-on-one relationship to Hasura event triggers, helping them encapsulate their business logic and keep it separate from the delivery mechanism. Moving to Hasura gave Cajoo more flexibility with its technical architecture, allowing them to quickly adapt to changing technology and interfaces.
Hasura enabled Cajoo to quickly replace their third-party warehousing and Courier delivery software with in-house custom software, which gave them more control of their tech stack.
Cajoo has experienced tremendous growth in both users and employees in the past year and still has ongoing expansion plans. The development team started with just three developers and has grown to 15-20 developers.
The Cajoo team continues to work closely with Hasura to improve developer tooling and boost developer productivity even as they continue to innovate and improve their product offerings.