An electronics store with a shared order database: storefront, phone-number sign-in, staff roles. The server is plain Python with zero dependencies.
An electronics and accessories store: a catalogue with categories, a cart, checkout, phone-number sign-in, and different permissions for customers and staff.
The interesting part is the server. The first version lived entirely inside one HTML file and kept everything in browser memory — an order placed on a phone was invisible on a desktop, which for a shop is meaningless. The server fixes exactly that: there is now a shared database, and the owner sees a customer's order from any machine.
It is written against the Python standard library alone: http.server for routing, a JSON file in place of a database, bearer tokens in the Authorization header. Not a single third-party dependency, so it runs anywhere Python exists, with nothing to install.
That is a deliberate trade-off and the code says so out loud. Before this could take real money, four things are marked in the source as required replacements: real SMS instead of returning the code in the response, a payment gateway instead of the current stub, PostgreSQL instead of the JSON file, and password hashing with HTTPS. Writing that down was the point — a demo that pretends to be production is worse than a demo that admits it.
A fragment of the project's real code — so you can see what's inside.
def api(self, method): parsed = urllib.parse.urlparse(self.path) path = parsed.path db = load_db() body = self._body() if method in ("POST", "PUT", "DELETE") else {} me = user_by_token(db, self._token()) if path == "/api/orders" and method == "GET": if not me: return self._json({"error": "Нужен вход"}, 401) if me["role"] in ("owner", "sadmin", "jadmin"): return self._json(db["orders"]) # персонал видит все заказы return self._json([o for o in db["orders"] if o.get("user") == me["phone"]]) if path == "/api/orders" and method == "POST": if not me: return self._json({"error": "Нужен вход"}, 401) order = { "id": int(time.time()) % 1000000, "user": me["phone"], "items": body.get("items", []), "total": body.get("total", 0), "status": "Новый", "ts": time.time(), }Project request
Fill in the form — we'll discuss scope and timing.
Contacts Book — a console phone book
