Skip to content

SaaS Microservices

A SaaS dashboard that talks to 2 API microservices defined in Nitro and Hono, all running under the same domain.

SaaS Microservices Thumbnail

SaaS Microservices

This is an example SaaS project with 2 API services defined as microservices.

Getting Started

pnpm install
pnpm dev

Open http://localhost:3024 to view the dashboard. The dashboard will make API calls to the users and dashboard microservices for the information to display in the dashboard.

How It Works

There are 3 separate applications in this example:

  • dashboard - A Next.js application to show the UI. This application also controls the microfrontends.json configuration to route API paths to the other microservices (see below).
  • api-dashboard - A Nitro backend serving data displayed in the dashboard.
  • api-users - A Hono backend authenticating users and returning user information.

These all run under the same domain. Paths to each application are routed using Vercel's microfrontends support:

Running Locally

To run all applications together, run:

pnpm dev

A local development proxy is automatically run to stitch requests from each application to the local instance of each service.

A single or subset of applications can also be run:

pnpm dev:dashboard
pnpm dev:api-dashboard
pnpm dev:api-users
pnpm turbo run dev -F api-users -F api-dashboard
SaaS Microservices Thumbnail

SaaS Microservices

A SaaS dashboard that talks to 2 API microservices defined in Nitro and Hono, all running under the same domain.

SaaS Microservices

This is an example SaaS project with 2 API services defined as microservices.

Getting Started

pnpm install
pnpm dev

Open http://localhost:3024 to view the dashboard. The dashboard will make API calls to the users and dashboard microservices for the information to display in the dashboard.

How It Works

There are 3 separate applications in this example:

  • dashboard - A Next.js application to show the UI. This application also controls the microfrontends.json configuration to route API paths to the other microservices (see below).
  • api-dashboard - A Nitro backend serving data displayed in the dashboard.
  • api-users - A Hono backend authenticating users and returning user information.

These all run under the same domain. Paths to each application are routed using Vercel's microfrontends support:

Running Locally

To run all applications together, run:

pnpm dev

A local development proxy is automatically run to stitch requests from each application to the local instance of each service.

A single or subset of applications can also be run:

pnpm dev:dashboard
pnpm dev:api-dashboard
pnpm dev:api-users
pnpm turbo run dev -F api-users -F api-dashboard

Unleash New Possibilities

Deploy your app on Vercel and unlock its full potential

Try Vercel Free