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

The agency owner's overview: revenue, team and client counts, a monthly revenue chart and revenue by project.
Agency dashboard
Screens from the app, run locally with sample data.

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

CodeAbout 41,000 lines of TypeScript
Backend21 tables and 130 functions in Convex, 13 API routes
Apps4, 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.

RoleSeesCan
Agency ownerEverything in the agencyInvite the team and clients, run projects, tasks and invoices, manage the plan
Team memberProjects they’re assigned to, and those projects’ clientsWork on tasks, message, share documents
ClientTheir own projects, invoices and filesComment on tasks, message, upload files, download invoices
FreelancerTheir own clients and projectsEverything an owner can, without a team
A solo freelancer's overview: 3 of 10 clients, active projects, open tasks, a revenue chart and revenue by project.
A freelancer's dashboard

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.

The team page: a pending invitation at the top, then each member's card with their job title, email, join date and status.
The team, with a pending invite

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.

Messages: a list of conversations with clients and teammates, and a thread with a client with read ticks.
A conversation with a client

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.

The projects list with one project open on its Tasks tab: each task with its assignee, finished ones struck through.
A project and its tasks

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.

The documents page: files grouped by project, each with its type, size, uploader, date and whether it's shared with the client.
Documents, by project

Plans and payments

PlanPricePeopleClients
Freelancer$25 a month110
Team Small$145 a month575
Team Large$261 a month10150

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