FastAPI and SQLite are enough for most small online stores
Why I built ekostore.ly on an async FastAPI backend with SQLite instead of a hosted store builder, and when I would reach for PostgreSQL instead.
When a small shop asks me for an online store, the default answer is a hosted store builder. For ekostore.ly I went the other way: a custom FastAPI backend with SQLite. Here is the reasoning, and where the limits are.
What a small store actually needs
Strip away the marketing pages and a shop like this needs a catalogue, categories, prices with optional discounts, and a way to place an order. The catalogue is read far more often than it is written. That shape matters more than any framework choice.
Why FastAPI
- Async by default. A shopper on a slow mobile connection holds a request open for longer. Async endpoints mean that request doesn’t block everyone else.
- Validation at the edge. Pydantic models check every request and response, so bad input is rejected before it reaches the database.
- Free API docs. FastAPI generates interactive documentation, which makes handing the project to another developer much easier.
Why SQLite
SQLite is a full relational database in a single file. There is no server to run, patch or pay for, and reads are very fast for a catalogue of this size. Backups are copying one file.
The trade-off is writes: SQLite allows one writer at a time. For a store that takes a steady stream of orders that is fine. It is not fine for thousands of concurrent writes, and that is the point to move on.
When I reach for PostgreSQL instead
- Many people editing data at the same time, such as staff dashboards or marketplaces
- Realtime features, where Supabase on PostgreSQL gives subscriptions out of the box (I used it for cloudcrochet.ly)
- Row-level security rules, so the database itself enforces who can read and write what
Because the API sits between the frontend and the database, moving ekostore to PostgreSQL later is a change to the data layer, not a rewrite.
The takeaway
Pick the database for the shape of the data and the traffic you actually have, and keep a clean API boundary so you can change your mind later. For most small stores, that means starting simple.