When we started ShopAgain, we faced a common challenge: how to build and scale quickly without getting bogged down by complexity. We needed a tech stack that allowed us to move fast, deliver frequently, and adapt to user needs without extensive setup and maintenance. Hereโs how we approached it.
๐๐ถ๐ช๐ญ๐ต, ๐ณ๐ฆ๐ญ๐ฆ๐ข๐ด๐ฆ ๐ข๐ฏ๐ฅ ๐ด๐ค๐ข๐ญ๐ฆ – ๐ด๐ช๐ฎ๐ฑ๐ญ๐ฆ ๐
๐ ๐ถ๐ป๐ถ๐บ๐ฎ๐น ๐ ๐ถ๐ฐ๐ฟ๐ผ๐๐ฒ๐ฟ๐๐ถ๐ฐ๐ฒ๐
We keep microservices minimal to reduce debugging and maintenance. Our main backend is a Django monolith. Most of our microservices, like webhook services, donโt use databases. They simply receive data and dump it into SQS for our monolith to process.
Less services mean fewer things to debug when things go wrong and things do go wrong. Everything gets deployed at once, less things to maintain like security or version updates. You can confidently make major changes because you have fewer moving parts.
๐ ๐ผ๐ป๐ผ๐น๐ถ๐๐ต ๐ง๐ฟ๐ฎ๐ฑ๐ฒ-๐ผ๐ณ๐ณ๐
Monoliths simplify deployment and maintenance, but can be a single point of failure for your entire product. A few lines of bad code can cause out of memory errors and can bring your entire app down. This happened to us a few times during the start.
We learn and adapt. We had to separate a few services that could cause data loss into microservices of their own. Itโs about balancing risks and benefits.
๐ฃ๐ฟ๐ผ๐๐ฒ๐ป ๐ง๐ฒ๐ฐ๐ต๐ป๐ผ๐น๐ผ๐ด๐ถ๐ฒ๐
We wanted to use time-tested frameworks instead of cutting-edge stuff. That ensures that most of the problems will already be solved and there will be enough tooling to make your life easier.
Here is the tech stack for ShopAgain:
Frontend
A monolith React app deployed using GitHub Actions with AWS S3 and CloudFront as CDN. Once the app got bigger, we began lazy loading part of the app. Our web app is primarily used on desktops, so parts of our website are not mobile-friendly. React was a little difficult for me to pick up, but now I am fairly comfortable with it.
Mobile Apps
We developed our mobile app using Ionic framework. It uses React and Typescript. Ionic provides ready made components that look like native elements for IOS and Android apps. We were able to release the first version in less than a month.
Backend
As both Maruti (co-founder) and I have used Python as our primary language, we decided to continue using that. Our backend is largely a monolith Django app with Django Rest Framework. Django has built-in auth, a powerful ORM, database migrations, tasks using celery, and a very powerful admin (more of this later). Version upgrades have been seamless, we typically wait three months before any major version upgrades.
We extensively use Django admin to debug customer issues. The admin is my favorite part of Django and it has saved so much time over the last few years.
We use Postgres using RDS. We started with one primary database and used it for almost a year and then added a read replica when we started seeing latency in loading dashboards. Django has built-in support for multiple databases and lets you easily switch between the databases.
We used Mod Wsgi and Apache2 to run django and AWS ELB as load balancer.
Hope you enjoyed reading this!
Leave a Reply