Entry Point for the oblien/openship Application: Monorepo Structure Explained

The primary entry point for the oblien/openship application is apps/api/src/index.ts, which initializes the Hono HTTP server and WebSocket handlers, while the Dashboard UI launches separately from apps/dashboard/standalone-server.mjs when running the full stack via Turbo.

OpenShip is a monorepo that orchestrates multiple services—including an API, Dashboard UI, and CLI—using Turbo. When you start the application, the root package.json triggers concurrent processes that boot each service through their respective entry points.

Understanding the OpenShip Monorepo Architecture

The repository uses a workspace-based structure managed by Turbo. The top-level package.json defines the orchestration layer that determines which services start and in what order.

According to the source code, the root package.json contains the following start script:

{
  "scripts": {
    "start": "turbo run start --filter=@repo/api --filter=@repo/dashboard --concurrency=10"
  }
}

Running npm run start or bun run start executes Turbo with filters for the @repo/api and @repo/dashboard packages, launching both services simultaneously with a concurrency limit of 10.

Primary Entry Point: The API Service (apps/api/src/index.ts)

The core backend entry point resides in apps/api/src/index.ts. This file is responsible for booting the HTTP server, configuring runtime adapters, attaching WebSocket support, and registering graceful shutdown hooks.

In apps/api/src/index.ts, the application imports the Hono app instance and starts the server:

import { app } from "./app";

// Configuration and server startup logic
serve();

The serve() function listens on the configured port and initializes the connection handlers. This makes apps/api/src/index.ts the first piece of code executed when the API service starts, establishing the runtime environment before handling incoming requests.

Dashboard Entry Point: apps/dashboard/standalone-server.mjs

While the API handles backend logic, the Dashboard UI runs as a separate service with its own entry point at apps/dashboard/standalone-server.mjs.

This file creates a Vite-powered development or production server that serves the React frontend. It also configures proxy settings to forward API calls to the backend service, ensuring seamless communication between the frontend and the Hono server running from apps/api/src/index.ts.

How to Start the Application

You have several options for launching OpenShip depending on whether you need the full stack or individual services.

Starting the full application:


# Install dependencies (once)

bun install

# Start both API and Dashboard via Turbo

npm run start

# or

bun run start

Running only the API service:

cd apps/api
bun run build-release   # Compile TypeScript

node dist/index.js      # Runs the compiled entry point

Running only the Dashboard UI:

cd apps/dashboard
bun run dev   # Starts Vite dev server from standalone-server.mjs

CLI Entry Point (Optional)

For command-line operations, OpenShip provides a CLI tool with its entry point at apps/cli/cli.ts. This file contains utilities for deployment and management tasks, though it runs independently of the main API and Dashboard services.

Summary

  • The entry point for the oblien/openship application backend is apps/api/src/index.ts, which boots the Hono server and WebSocket support.
  • The Dashboard UI starts from apps/dashboard/standalone-server.mjs using Vite.
  • The root package.json orchestrates both services via Turbo using the start script with filters for @repo/api and @repo/dashboard.
  • The CLI entry point is located at apps/cli/cli.ts for management utilities.
  • You can run services individually by navigating to their respective directories and using bun run commands.

Frequently Asked Questions

What is the main entry point for the OpenShip backend?

The main entry point is apps/api/src/index.ts. This file imports the Hono application instance from ./app and calls serve() to start the HTTP server, initialize WebSocket handlers, and register graceful shutdown hooks according to the source code.

How do I start only the API service without the Dashboard?

Navigate to the apps/api directory and run bun run build-release followed by node dist/index.js. This compiles the TypeScript source and executes the same entry point used in production without launching the Dashboard UI.

What server framework does OpenShip use for the API?

OpenShip uses Hono as its web framework. The entry point at apps/api/src/index.ts imports the configured Hono app and wraps it with the serve() function to handle HTTP and WebSocket connections.

Where is the entry point for the OpenShip CLI?

The CLI entry point is located at apps/cli/cli.ts. This file provides command-line utilities for deployment and management tasks, operating independently from the main API and Dashboard services.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →