Skip to main content

Architecture

Every technological decision is driven by simplicity. We believe that product used by people is the only reason why technologies exist. Our goal is to help products stand up on their feet without investing too much on early stages.

Overview

Our technological choices based on the following main tools: Next.js, React Query, React Hook Form, Mantine UI, Koa.js, Socket.IO, MongoDB, Turborepo, Docker, Kubernetes, GitHub Actions and TypeScript.

Events play crucial role in the Ship architecture. Every database change produces an event. We use events to avoid tight coupling, implement business logic and support denormalization.

On a high-level Ship consist of the following parts:

  • Web — frontend service;
  • API — backend service;
  • Scheduler - a service that runs background cron jobs;
  • Migrator - a service that runs MongoDB migrations;
  • Deployment - deployment scripts and GitHub Actions that deploy an application to the AWS or Digital Ocean Kubernetes cluster;

The image below illustrates the main components and key relationships between them:

Starting application with Turborepo

To run infra and all services -- just run: npm start 🚀

Turborepo: Running infra and services separately

  1. Start base infra services in Docker containers:
npm run infra
  1. Run services with Turborepo
npm turbo-start

Using Ship with Docker

To run infra and all services -- just run: npm run docker 🚀

Docker: Running infra and services separately

  1. Start base infra services in Docker containers:
npm run infra
  1. Run services you need:
./bin/start.sh api web

You can also run infra services separately with ./bin/start.sh bash script.