Skip to content

Latest commit

 

History

History

build-modular-monolith-with-platformatic

Example: Build a modular monolith with Platformatic Runtime, Composer, DB and Client

This example application was created for the tutorial 'Build and deploy a modular monolith with Platformatic'.

This is a generated Platformatic Runtime application.

Architecture

Requirements

Platformatic supports macOS, Linux and Windows (WSL recommended). You'll need to have Node.js >= v18.8.0 installed.

This is a monorepo which is configured to work with with pnpm. It's recommended that you have it installed so you can easily run commands for multiple services, but you can use npm if you prefer.

Setup

  1. Install dependencies:
pnpm install
  1. Create .env files for each service:
pnpm run -r configure
  1. Apply migrations for all service databases:
pnpm run -r migrate
  1. Seed all service databases:
pnpm run -r seed

Usage

Run the Runtime app with:

pnpm start

Adding a Service

Adding a new service to this project is as simple as running create-platformatic again, like so:

pnpm exec create-platformatic