Building My Own Type-Safe APIs, Monorepo-Based CRM - Log #1

Published on the 21st of Oct 2025

Figure 1: Mockup Figma design of the CRM. Still a work in progress.
Figure 1: Mockup Figma design of the CRM. Still a work in progress.

Recently, I got the idea to build a full-stack CRM (Customer Relationship Management) system along with a CP (Customer Panel).

The idea came from a friend who's a freelance web designer, and I thought it would be interesting to explore and write about it. Both as a technical challenge and a way to experiment with type-safe full-stack patterns.

There will be two integral part of this project:

  1. Customer Relationship Management - This is where the staff can keep track of project progress, handle support tickets, manage deals, and generate invoices. Basically, it's the central hub that keeps their business operations running.
  2. Customer Panel - This lets customers log in to view their projects, pay bills, and submit tickets. Can be content updates, requests, or complaints.

Implementation

The goal for this project is to explore end-to-end type safety. Having everything strongly typed across the stack will make development smoother and catch runtime errors.

To keep the structure organized, I'm setting this up in a monorepo. This makes it easier to share types, utilities, and schemas between the backend and frontend. What I did previously on react-fastify-starter was similar to this.

Possibly, both the CRM and the Customer Panel will consume data through a single unified API (will explore more on this).

On the technical side, I'll be using:

  • React for the frontend (both CRM and CP)
  • Fastify for the backend
  • PostgreSQL as the database

Everything will be wired together under one shared type system. Very likely using shared types package within the monorepo.

Who is this for?

Useful for small business owners, freelancers, who just want to have a single platform to manage their business and customer. Like some of my friends.

Next Steps

This is more about experimenting, and see how far I can play with. There is still bunch of things to plan, like database design, API structure, UI design, and etc. Will see how it goes...

Building My Own Type-Safe APIs, Monorepo-Based CRM - Log #1 · Johnny Chai