Skip to content
← All projects

CoWorkHQ

A marketplace for coworking spaces: conflict-free desk and room booking, payments into each operator’s own Razorpay account, QR-pass check-in and white-label builds, on web and native mobile.

The idea

Most small coworking spaces run on a spreadsheet, a WhatsApp group and a notebook at the front desk. Rooms get double-booked, pay-per-visit members are billed by counting entries by hand, and nobody really knows how full the place is.

CoWorkHQ puts all of that in one place. Members find a desk or room, pay for it and check in at the door. Operators manage their locations, staff, events and revenue. It’s built as a marketplace, so many coworking businesses can list their spaces and customers book across all of them.

I wanted it on the web and as a real native app without writing the business logic twice. That decided the architecture: a monorepo where both clients share one API client, one set of types and one set of rules, and only the UI is platform-specific.

Scope

A marketplace for coworking spaces in India. Many coworking businesses list their locations on one platform, and customers book across all of them with one account.

It covers the whole visit: finding a space, booking and paying for it, and checking in at the desk. It also covers the operator’s side: locations, spaces, staff, events and revenue.

Three clients share one core: a web app for members and admins, a native iOS and Android app for members and the front desk, and one API that enforces every rule. Hiding a screen in an app is only a convenience; the server decides.

Each organisation connects its own Razorpay account, so customers’ money goes straight to the operator.

It can also run under a client’s own brand: their name, colours, logo, web address and phone app, built from one brand file.

Who uses it

Customer

Anyone who signs up. Finds, books and pays for desks and rooms at any organisation, checks in with their pass, and RSVPs to events.

Organisation admin

Runs a coworking business. Manages its own locations, spaces, events, revenue, front desk, team and permissions, and never sees other organisations.

Staff

Works for one organisation and only gets what their admin switches on: front desk, booking for customers, managing spaces or events, viewing revenue.

Platform admin

Owns the marketplace. Adds, renames and suspends organisations, and sees what each one earns.

Features

  • Email/password and Google sign-in. Invited colleagues land in their organisation as soon as they sign up.
  • Locations with an address, map position and opening hours; desks and rooms with amenities, an hourly price and up to 8 photos, uploaded from the web or the phone.
  • Search and filters for location, type, seats, price, amenities and live availability at a chosen time, sorted by distance with “near me”.
  • Conflict-free booking, guaranteed by a PostgreSQL constraint rather than a UI check, within the location’s opening hours. Customers can move or cancel a booking when their organisation allows it.
  • Per-organisation policies: how far ahead people can book, the longest booking, cancellation and refund cut-offs, moves, self check-in, events and desk payments, all enforced by the API.
  • Each organisation connects its own Razorpay account for card, UPI, netbanking or wallet payments. The slot is held for 15 minutes while someone pays, every payment is settled exactly once, and refunds follow the organisation’s rules.
  • Staff can book for a walk-in customer and collect payment at the desk or with a Razorpay link and QR code.
  • Every booking gets a QR pass. The front desk scans it with a phone or laptop camera, or a handheld scanner, and the person is checked in or told exactly why not.
  • Self check-in from 30 minutes before a booking, check-out, and pay-per-visit billing worked out from check-ins.
  • Monthly billing statements, revenue per organisation and a pay-per-visit report.
  • Email and push notifications for confirmations, payment links, moves, cancellations and refunds, plus a reminder the day before.
  • Community events per location, with RSVPs and capacity.
  • Per-person staff permissions, checked by the API on every request, and an activity log of what staff did for customers.
  • White-label builds: a client’s own name, colours, logo and storefront on web, and their own app on the stores.
  • Customers can delete their account from the web or the phone, as the app stores require.
  • A native app built for touch, not a port: pick a day and tap an hour instead of dragging across a week calendar.
  • Saved spaces, a ⌘K command palette on web, and light and dark themes.

Engineering highlights

Double booking is impossible, not just unlikely

A Postgres EXCLUDE constraint over each space’s time ranges rejects any overlapping booking that isn’t cancelled, including slots held while someone pays. The API turns the violation into a clean “slot taken”, so two people racing for the same room can never both win, whatever the UI showed them.

Every payment is settled exactly once

A payment can be reported three ways (the browser redirect, the webhook and a server-side check), in any order or all at once. The first report claims it with a conditional update and the rest read back the decision. A payment that can’t be kept (a lapsed hold, a cancelled booking, a duplicate) is refunded, and a refund that fails halfway finishes on the next webhook retry.

One core, two clients that each feel native

Web and mobile share the API client, data hooks, types and business rules from one package, so a rule changes in exactly one place. The UI is deliberately not shared: dragging across a week calendar on web becomes picking a day and tapping an hour on a phone.

Authorisation lives on the server

Every route checks a permission and that whatever it touches belongs to the caller’s organisation. A pass from another organisation scans as “not found”, exactly like a random code, so nothing leaks about who else is on the platform. Sensitive routes are rate-limited, and the database itself refuses direct access with row-level security.

Each organisation’s payment keys, kept safe

Organisations connect their own Razorpay keys, which are checked with a read-only call and stored encrypted with AES-256-GCM, each bound to its organisation. No response ever returns a secret. Every payment records the account that took it, so refunds and webhooks always use the right keys, and each organisation’s webhook only settles its own payments.

Tech stack

  • React
  • Vite
  • Expo
  • React Native
  • TypeScript
  • TanStack Query
  • Tailwind CSS
  • NativeWind
  • Express
  • Prisma
  • PostgreSQL
  • Supabase Auth
  • Supabase Storage
  • Razorpay
  • Resend
  • Expo Notifications
  • Turborepo
  • pnpm

Write-ups