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

Your email address will not be published. Required fields are marked *