Skip to main content

Repository Tour

The GospeLib monorepo has four main areas: apps, services, packages, and infrastructure. This page gives you the lay of the land — enough to know where to look when you need something.

Top-Level Overview

gospelib/
├── apps/ # 3 frontend applications
├── services/ # 8 backend microservices
├── packages/ # 9 shared TypeScript/Python libraries
├── infra/ # Docker Compose, Terraform, Kubernetes, Grafana
├── tools/ # Developer scripts and Nx generators
├── data/ # Book registry, corpus-v2, test fixtures
├── corpus/ # Source scripture JSON files (v1)
├── docs/ # Specifications, ADRs, guides
└── (root configs) # nx.json, package.json, tsconfig.base.json, etc.

Apps (apps/)

Three frontend applications, all TypeScript:

AppFrameworkPortPurpose
apps/webNext.js 15 (App Router)3002User-facing scripture reader and study tools
apps/adminNext.js 15 (App Router)3001Internal admin dashboard
apps/mobileExpo 52 / React NativeiOS and Android mobile app

All apps import from the shared packages/ libraries. No app imports from another app or directly from services/.

Services (services/)

Eight backend microservices, each independently deployable. Three languages:

ServiceLanguageFrameworkPortWhat It Does
gatewayGoChi v58080API gateway — JWT validation, rate limiting, reverse proxy
contentPythonFastAPI8100Scripture graph queries against FalkorDB
authGoChi v58200Clerk wrapper, user sync, JWT middleware
billingGoChi v58300Stripe subscriptions and entitlements
aiPythonFastAPI8400LLM-powered passage explanation, study questions
notificationsGoChi v58500Push (APNs/FCM), email (Resend), Redis Streams
plugin-registryPythonFastAPI8500Plugin manifest registry, discovery, versioning
ingestPythonClick CLIData pipeline: JSON corpus → FalkorDB
Key rule

No service imports code from another service at runtime. Shared logic lives in packages/ (TypeScript) or is duplicated at the service boundary.

Packages (packages/)

Nine shared libraries used by apps and services:

Packagenpm NamePurpose
packages/core@gospelib/coreShared domain logic (book registry, entitlements, events, nav)
packages/types@gospelib/typesShared TypeScript types (auto-generated from OpenAPI + manual)
packages/ui@gospelib/uiCross-platform React Native component library
packages/sdk@gospelib/sdkClient SDK for API calls (uses openapi-fetch)
packages/config@gospelib/configESLint/TSConfig presets + Zod env schemas
packages/schemasgospelib-schemasShared Pydantic schema models (all Python services)
packages/scripture-ref@gospelib/scripture-refScripture reference parser and formatter
packages/plugin-sdk@gospelib/plugin-sdkPlugin authoring SDK for the plugin ecosystem
packages/testing@gospelib/testingShared test fixtures, mocks, helpers

Infrastructure (infra/)

Everything needed to run and deploy the platform:

DirectoryWhat's Inside
infra/docker/Docker Compose files for local data stores
infra/terraform/AWS infrastructure as Terraform modules
infra/k8s/Kubernetes manifests (Kustomize overlays)
infra/grafana/Grafana dashboards and provisioning configs

Other Directories

DirectoryPurpose
tools/scripts/Shell scripts — setup.sh, health-check.sh, etc.
tools/generators/Nx generators for scaffolding new services/packages
data/Book registry (book_registry.json), corpus-v2 JSON files, test fixtures
corpus/Legacy v1 scripture corpus (input data for the ingest pipeline)
docs/ADRs, API specs, tech spec, design system spec, deployment guide

Root Configuration Files

Key config files at the repository root:

FilePurpose
nx.jsonNx workspace configuration (task caching, affected base)
package.jsonRoot dependencies, scripts, pnpm engine enforcement
pnpm-workspace.yamlWorkspace package globs
tsconfig.base.jsonShared TypeScript config (strict, ES2022, bundler resolution)
eslint.config.mjsShared ESLint flat config
vitest.workspace.tsVitest workspace runner
commitlint.config.mjsConventional Commits enforcement
Deeper dive

For exhaustive rules on file placement, splitting heuristics, and naming conventions, see the full Repository Map.

Next Step

Ready to contribute? Head to Your First PR to learn the branching and commit workflow.