Blog
Two-sided marketplaces are hard because both sides have to trust the middle. A client has to believe the therapist is real and the session will work; a therapist has to believe the money will arrive, correctly split, after the call. This teletherapy platform earns that trust by running the whole loop in one place: fund a wallet, find a therapist, hold the session over video, and let the fee split and pay out on its own.
The Therapy Platform is a custom teletherapy marketplace that connects clients and therapists for paid video and voice sessions, with a built-in e-commerce store. It is a full-stack web application on Next.js and Bootstrap, a Node.js REST API and a PostgreSQL database, with Agora powering the calls. Clients fund a wallet, browse and book therapists, and pay per session; each fee is split between therapist and platform and paid out after fees.
Put simply, one backend runs four surfaces: the client app, the therapist tools, an admin dashboard, and a store, all sharing the same data model, so sessions stay reliable, money moves correctly, and both sides plus a shop are governed from one place.
A teletherapy marketplace has to do several hard things at once, and getting any one of them wrong breaks trust on one side of the market. This is full custom web application development, not a booking plugin, and six needs shaped the build:
The platform is a full-stack web application. A Next.js and Bootstrap frontend serves clients, therapists and admins; a Node.js REST API and a PostgreSQL database sit behind it; Agora handles the calls, with integrations for payments and email. Clients and therapists each get their own token-based authentication, with remember-me caching, password reset and token expiry, and profiles with secure picture uploads. A client funds a wallet, browses a therapist directory they can filter by category, sort by rating or experience, and search, then books by the availability the therapist sets. The session runs over Agora, the backend issues the call tokens and handles start, end and hold events, and the fee comes out of the client’s wallet.
On the money side, each session’s fee is split between the therapist and the platform. Therapists have their own wallet with balance, top-ups and withdrawals to a bank account, and payouts are processed after the platform fee, with full session and transaction history for both sides. Building a single Node.js service that serves four different surfaces without drifting apart is the sort of work our Node.js development team does when a marketplace has to share one consistent data model rather than stitch several systems together.
The architecture centres on two authenticated account types, a searchable therapist directory with availability, Agora sessions billed from wallets and split into payouts, an admin dashboard, and an e-commerce store, all over one Node.js API and one PostgreSQL database. The subsystems worth calling out:
Booking and billing a session is the flow where the two sides and the money all meet, so it runs in a fixed order:
Because teletherapy sits in a sensitive, regulated space, the account, session and payment handling here carries the care a healthcare product demands, from admin-gated therapist approval to a clean audit trail on every session.
Running two account types cleanly came down to separate authentication and profiles for clients and therapists, with admin approval before a therapist appears, so the directory a client browses stays trustworthy. Making sessions reliable meant leaning on Agora for the real-time video and voice, with the backend issuing tokens and managing call events, rather than building and maintaining a fragile stack. Moving money correctly meant wallet payments, a fee split on every session, and payouts after fees, all written to session and transaction history so the economics are auditable. Helping clients find the right therapist meant a directory that filters by category, sorts by rating or experience, searches by name, and books against real availability. Giving admins one place to run it meant a dashboard that manages both account types, approves or rejects therapists, and runs the store. And building the store in meant product, order and inventory management, checkout and confirmation emails living in the same backend, sharing the platform’s accounts and data.
The platform runs as one coherent full-stack build. Clients and therapists each have their own accounts and connect for reliable in-app sessions over Agora, money moves through wallets with split fees and clean payouts, discovery is a matter of filtering, sorting and searching, and admins govern accounts, therapist approvals and a store from a single dashboard. Because it is all one Node.js API over one PostgreSQL database, every surface shares the same data model instead of drifting into separate systems.
If you are building a two-sided marketplace, a booking-and-billing platform, or a teletherapy product with real-time sessions and split payouts, you can hire full-stack developers who have shipped this exact model, or tell us about your marketplace and we will map both sides onto one clean backend.
How do video and voice sessions run inside the platform?
Sessions run over Agora. When a client books, the Node.js backend issues Agora call tokens and handles start, end and hold events, so the video or voice call happens in-app with proper tokens and controls rather than on a fragile custom real-time build.
How is a session’s fee split between the therapist and the platform?
The client pays for the session from their wallet, and the fee is divided between the therapist and the platform. The therapist’s share sits in their own wallet, and they withdraw it to a bank account with the payout processed after the platform fee, all recorded in session and transaction history for an audit trail.
How do clients find and book the right therapist?
Clients browse a therapist directory they can filter by category, sort by rating or experience, and search by name. Each therapist has a detail page and bookable availability they set themselves, so a client can reach a suitable therapist and book against real, up-to-date times.
Why is there an e-commerce store built into a therapy platform?
The store is part of the same backend, not a separate system, so it shares the platform’s accounts and data. It lists products with details, handles checkout with payment and order confirmation, and sends a customisable confirmation email, all managed from the same admin dashboard that runs the marketplace.
Can one backend really serve clients, therapists, admins and a store?
Yes. A single Node.js REST API over one PostgreSQL database serves the client app, the therapist tools, the admin dashboard and the store. Sharing one data model keeps sessions, wallets, payouts and orders consistent across every surface instead of splitting the platform into disconnected pieces.