ysskrishna logoysskrishna

Express FastAPI Protobuf

Clone a quote browser that keeps JSON at the edge and binary contracts between services.

Get it
Built with
Starter Kits & Boilerplates
Backend & APIs
Vue
Express
FastAPI
Node.js
Python
Tailwind CSS
Details
FreeMIT licenseCreated October 4, 2025Updated November 12, 2026
Share this product

Your UI speaks JSON. Your services do not have to.

The browser should stay on simple requests and readable responses. Behind that wall, you want internal calls to stay compact and aligned on one schema. The slow part is not the idea. It is wiring the translation layer, generating matching stubs, and getting three processes to agree on ports and health checks.

Express FastAPI Protobuf is a quote recommender you can run locally to see that split as a working reference, not a diagram.

JSON for the browser. Binary between the services.

What you get

  • A clear edge pattern. The web app talks familiar HTTP JSON to a middle layer that validates input before it speaks binary to the Python API.
  • One schema, two generated clients. Shared definitions drive generated code on both sides of the boundary, with lint and breaking-change checks in the automation.
  • Something to click through. Browse quotes by tag with pagination over thousands of rows from a bundled dataset.
  • A local dev loop. Hot reload across services, health endpoints, and Makefile targets to set up, generate, start, and stop the stack.
  • Honest size talk. The repository documents illustrative JSON versus binary comparisons. Your savings depend on schema and traffic, so measure your own paths.
  • Free and open source. MIT licensed, published on GitHub.

Your first morning after cloning

Picture an illustrative first session. You run the documented setup, then start the stack. The browser opens on the quote UI. You pick a tag, page through results, and watch the middle layer accept JSON while the Python service answers in binary. You tweak a shared schema file, regenerate, and restart to see both runtimes pick up the same shape. That is the loop this repo is meant to teach.

Ready to try it?

Frequently asked questions

Why not just use JSON between every service?

You can, and many teams do for small stacks. This project exists to show when a binary contract between services can shrink payloads and keep types explicit, while the browser still never has to speak that format. The README’s size examples are samples, not a guarantee for your API.

How does the browser stay on JSON while services use binary payloads?

The web client calls JSON HTTP endpoints on the middle service. That layer validates parameters, builds the binary request, calls the Python service, then converts the binary response back to JSON for the UI. The README sequence diagram shows the full path for a tagged quote request.

What do I need on my machine before I run it?

The README lists Python 3.10 or newer, Node.js 18 or newer, the uv installer, the Buf toolchain, and Make. Each has install notes in the repository.

How do I bring up the frontend, middle layer, and API together?

Use the Makefile setup target to install dependencies and generate protocol code, then the start target to run all three services with hot reload. Default local URLs are listed in the README for the UI, the middle layer, and the API.

How are shared schema changes turned into code for both sides?

Definitions live under a common proto folder. Makefile targets generate Python and JavaScript stubs, with optional lint and breaking-change checks against the main branch.

Do the smaller payload claims apply to my API?

Not automatically. The README cites roughly 30 to 60 percent smaller payloads in its examples, including a worked tag-and-page request. Throughput and size depend on schema, compression, and your HTTP stack, so treat the docs as a starting point and benchmark your own services.

Why not wire this myself from blog posts?

You could. This repository is a single cloneable reference with the BFF translation, code generation loop, sample data, and automation already connected so you can adapt rather than invent every seam.

Is it free?

Yes. It is open source under the MIT license.

Continue exploring

ProductExpress FastAPI Performance Test

Express FastAPI Performance Test

Same load tests, three backends. Numbers you can show in a meeting, not a tweet.
Backend & APIs
Experimental Projects
+9
ProductFastapi Sync Async Starter Template

Fastapi Sync Async Starter Template

Start your FastAPI service with sync and async database patterns wired, tested, and ready to run in Docker.
Backend & APIs
Starter Kits & Boilerplates
+8
ProductFastAPI UV vs Requirements File

FastAPI UV vs Requirements File

Two Docker builds, one FastAPI app. Compare packaging paths on your machine.
DevOps & Infrastructure
Backend & APIs
+6
ProductFastAPI Nextjs Clerk Starter

FastAPI Nextjs Clerk Starter

Sign-in in the browser, checked tokens on your Python API, without a week of auth wiring.
Auth & Security
Backend & APIs
+9
ProductFastAPI RabbitMQ Celery Flower Starter

FastAPI RabbitMQ Celery Flower Starter

Queue SMS and email from your API without freezing the response. Clone a working lab and adapt it.
Backend & APIs
Starter Kits & Boilerplates
+9
ProductFastAPI Clerk Starter

FastAPI Clerk Starter

A FastAPI API with Clerk JWT checks and user routes ready on day one.
Auth & Security
Backend & APIs
+8