Modus

A business management system for small companies in Morocco — stock, sales, customers, money, and a full hospitality side with direct booking. Multi-workspace, built alone, running in production.

status
in production
scope
14 modules · retail + hospitality
api
18 route groups · 30+ tables
access
multi-org · 4 roles · 50+ permissions
team
just me — every layer

what it is

Modus is where a small business runs the whole thing — stock, sales, customers, suppliers, expenses and reports — instead of spreading it across a notebook, WhatsApp and three spreadsheets. It started as a stock tracker, became a CRM, and ended up a business management system: several organizations under one login, each with its own team, its own permissions and its own numbers.

Then hospitality landed on top. Hostels, guesthouses and short-stay rentals get properties, units, rates, a calendar and reservations — and a public storefront where guests book straight from the system, with availability that is actually live.

Modus dashboard
operations dashboardfig. 1

hospitality & direct booking

The part that had to be right: a guest books a room from the public page, and that room cannot be sold twice. No channel manager, no middleman taking a cut — the booking lands directly in the same system the owner works in every day.

01

Availability

The storefront asks for dates and gets back only units with no overlapping reservation — priced per season, per unit type.

02

Book

Confirming re-checks the overlap and writes the reservation in one transaction. A second guest going for the same nights is refused, not queued behind a race.

03

Run the stay

The reservation shows up on the calendar with check-in, check-out and the guest file — and the money it brought in shows up in the same reports as everything else.

the ai order agent

A partner sends a message — or a photo of a handwritten daily ledger — and the AI drafts the order. Nothing is saved until a human confirms it.

01

Draft

The agent reads the message, searches products, matches the customer, and returns a draft. The draft is signed — no database write yet.

02

Confirm

A human approves. The server checks the signature, then writes the order. If anything was changed in between, it gets rejected.

03

Audit

AI-made orders get an AGNT- tag, the loop has a hard cap, and refused replies are rephrased and retried automatically.

what’s inside

workspaces
Several organizations, one login, separate data.
products
Stock, photo gallery, cost, value.
orders
Full lifecycle, price snapshots, profit per order.
customers
Loyalty points, store credit, history.
suppliers
Rating, balance, sourced products.
leads
Pipeline, plus one-click convert to customer.
expenses
Approval flow, category breakdowns.
deliveries
Assignments and proof of delivery.
properties
Hostels and rentals — units, rates, seasons.
reservations
Calendar, check-in, check-out, guest file.
booking storefront
Public page, live availability, direct booking.
analytics
Eight reports and anomaly alerts.
landing pages
AI-generated pages that capture leads.
storefront api
Per-shop keys, rate limits, audit log.
Customers and loyalty
customers & loyaltyfig. 2

stack

Bun · TypeScript · Express 5 · PostgreSQL · Drizzle ORM · Zod · Redis · JWT · Groq · Cloudinary · R2

choices i’m happy with

one system, not two products
A hostel owner who also sells things should not pay for two tools. Stock, sales and rooms sit on the same customers, the same money, the same reports.
availability lives in the database
A room is only free if no confirmed reservation overlaps those dates, and that check runs inside the same transaction that writes the booking. Two guests can hit confirm at the same second — one gets the room, the other gets a clear no.
draft first, save later
The AI can search products and ask questions without leaving half-made orders in the database. The draft is signed, so tampering between draft and confirm gets caught.
no stripe
Customers in Morocco pay by bank transfer. So billing is manual by design — it matches how people actually pay here.
one header, not subdomains
Switching between organizations is one request header, not a re-login.
agnt- tag on ai orders
Every order the AI creates is tagged. One query answers: what did the AI do today?