oneclient
My own client portal for agencies: projects, files, messages and invoices in one place, with subscriptions and team invites.
Own productApr '25 – Oct '25Next.js, TypeScript, Convex, Clerk, Dodo Payments, Resend
How did it all start?
At Briidge we work with clients, and we kept running into the same mess. Files were in Google Drive, tasks in Trello, feedback in WhatsApp and invoices in email. Every week someone asked “where’s the latest version?”
What I built
One portal where an agency, its team and its clients share projects, tasks, documents, messages and invoices, with paid plans and email invites.
It’s really four apps, one per role. The agency owner runs everything. Team members see only the projects they’re assigned to. Clients see their own projects, files and invoices. Freelancers get the owner’s tools without a team.
The size of it
| Code | About 41,000 lines of TypeScript |
| Backend | 21 tables and 130 functions in Convex, 13 API routes |
| Apps | 4, one per role, with 34 pages between them |
I wrote the backend and most of the interface.
Who sees what
The rules live in the backend queries, not just the screens. A team member’s projects come from their assignments, and a client only sees a project once someone from the team is assigned to it.
| Role | Sees | Can |
|---|---|---|
| Agency owner | Everything in the agency | Invite the team and clients, run projects, tasks and invoices, manage the plan |
| Team member | Projects they’re assigned to, and those projects’ clients | Work on tasks, message, share documents |
| Client | Their own projects, invoices and files | Comment on tasks, message, upload files, download invoices |
| Freelancer | Their own clients and projects | Everything an owner can, without a team |
My own agency model
I started with Clerk’s Organizations for agencies and their members. I wanted branded invites and full control over who belongs where, so I replaced it with my own agencies and memberships tables, team invites and route guards, in a day.

Joining by invite
Owners invite clients and teammates by email. The email, sent with Resend, carries a link that lasts 7 days. When the person signs up, Clerk’s webhook matches them to the invite and gives them the right role, and the invite page accepts it too, so either path works.
An owner can start projects and invoices for a client before the client has an account. When they join, those records move over to them.
Messages in real time
Conversations, messages and read receipts are their own tables. Every screen subscribes to live queries, so new messages, read receipts and the unread badge in the sidebar update instantly, with no polling.

Projects, tasks and invoices
Projects have a status, priority, budget and dates, and team members are assigned to them. Tasks have subtasks, comments, assignees and hours, and finishing one updates the project’s progress.
Invoices have line items with tax, move from draft to sent to paid or overdue, and download as PDFs that I lay out line by line with jsPDF.
Documents
Files live in Convex’s file storage, attached to projects. The first version kept failing with server errors, so I rebuilt it. Reviewing the rebuild, I found three holes and closed them: clients could see shared files from other projects, anyone could upload to any project, and deleted files stayed in storage.

Plans and payments
| Plan | Price | People | Clients |
|---|---|---|---|
| Freelancer | $25 a month | 1 | 10 |
| Team Small | $145 a month | 5 | 75 |
| Team Large | $261 a month | 10 | 150 |
Paying is what gives you a role. When a subscription goes through, a webhook makes you a freelancer or an agency owner, and if a payment fails, access is paused. Team members and clients join through invites and don’t pay.
Payments started on Polar. Its webhooks kept failing, on signature checks and on server errors. So I built Dodo Payments alongside it behind a switch, turned it on and removed Polar, in under three hours.
What was hard
Keeping three systems agreeing on who someone is. Clerk handles sign-in, its webhook tells the database about new users, and Convex holds the roles. For a while roles lived in both Clerk and the database, and the webhook and the invite flow overwrote each other. I made the database the only place roles live, and had the webhook keep any role a user already has.
Clients who signed up through an invite could use their dashboard, but the agency still saw them as “Pending” forever. The step that accepted the invite never got the new user’s ID. I passed it through, made the webhook accept the invite too, and moved the projects and invoices made before they joined onto their account.
What I learned
Keep one source of truth. While roles lived in two places, every sign-up was a race between them. Once the database was the only source, that whole class of bugs went away.
Next
Klypp




