~/bluebell/ greenhouse - docs
$ cat greenhouse/README.md

// part of bluebell - algorithmic trading platform

> greenhouse .docs

The Java backend powering bluebell - REST APIs, scheduled jobs, data pipelines, and the platform's core trading business logic.

Runtime Java 25
Framework Spring Boot
Store PostgreSQL
Build v3.0.6
// internal package layout

greenhouse is organized into six cooperating packages - from the API edge down to standalone operational tooling.

> planter

HTTP / API layer

  • controllers and endpoint helpers
  • DTO conversion
  • request and response annotations
  • the front-facing API surface

> radicle

Core Spring runtime

  • repositories and services
  • business logic and scheduling
  • performables, security, validation
  • where most backend behavior lives

> platform

Shared foundation

  • core entities and DTOs
  • enums and constants
  • shared exceptions
  • configuration and utilities

> sol

Integration and pipelines

  • external clients
  • importers, exporters, parsers
  • translators and writers
  • market-data integration boundary

> anther

Research and analysis

  • strategy experimentation
  • backtesting tooling
  • trading-analysis utilities
  • reporting on strategy outputs

> osmosis

Symbol-registry tooling

  • CLI-style engagements
  • registry enrichment and cleanup
  • post-processing services
  • isolated from the main runtime layers
// repository and stack
tree - bluebell repo layout $ tree -L 1
bluebell/
|-- documentation/   # diagrams and reference
|-- flower/          # frontend apps (sepal, petal)
|-- greenhouse/      # <- you are here - backend API
|-- knowledge/       # trading reference notes
|-- scripts/         # orchestration utilities
|-- stem/            # MetaTrader (MQL4) assets
`-- docker-compose.yml

$ cat greenhouse/responsibilities
{ "apis": true, "scheduled_jobs": true, "import_export": true,
  "core_business_logic": true }
// local stack and service ports
greenhouse

backend API

localhost:8080
db

PostgreSQL

localhost:3307
sepal

authenticated frontend

localhost:3000
petal

public website

localhost:4000
// docker controller - run-bluebell

The top-level run-bluebell scripts wrap Docker Compose. They validate the environment, require a matching .env.<env> file at repo root, and export TAG=<env>. Supported envs: dev, staging, prod.

Linux / macOS bash
$ ./scripts/linux/run-bluebell.sh build dev
$ ./scripts/linux/run-bluebell.sh up dev
$ ./scripts/linux/run-bluebell.sh up dev --build
$ ./scripts/linux/run-bluebell.sh down dev --volumes
$ ./scripts/linux/run-bluebell.sh ps dev
$ ./scripts/linux/run-bluebell.sh logs dev greenhouse --follow
Windows cmd
> scripts\windows\run-bluebell.bat build dev
> scripts\windows\run-bluebell.bat up dev
> scripts\windows\run-bluebell.bat up dev --build
> scripts\windows\run-bluebell.bat down dev --volumes
> scripts\windows\run-bluebell.bat ps dev
> scripts\windows\run-bluebell.bat logs dev greenhouse --follow
command reference
build ENV build images without starting containers
up ENV start the stack without rebuilding
up ENV --build rebuild and start the stack
up ENV --pull always pull before up
down ENV stop the stack
down ENV --volumes stop the stack and remove named volumes
ps ENV show service and container status
logs ENV <service> show logs for one service
logs ENV <service> --follow tail logs live
// environment variables

The Docker controller loads a repo-root .env.<env> file before bringing the stack up. Greenhouse also reads its own greenhouse/.env for application secrets.

docker controller variables
SPRING_PROFILE greenhouse

Active Spring profile loaded by the backend.

dev
FLOWER_PROFILE sepal / petal

Profile selector for the flower frontend builds.

dev
GREENHOUSE_HEALTHCHECK_URL compose

URL probed by Docker Compose to verify greenhouse health.

http://greenhouse:8080/actuator/health
TAG exported

Set automatically by run-bluebell for environment-tagged images.

<env>
greenhouse .env variables
EMAIL_APP_USERNAME required

SMTP account username used by the Java mail sender.

smtp username
EMAIL_APP_PASSWORD required

SMTP account password or app password used by the Java mail sender.

app password
EMAIL_APP_SENDER required

Sender address used for outbound application email.

noreply@example.com
EMAIL_APP_RECIPIENT email flows

Default recipient for email endpoints and notification smoke checks.

ops@example.com
OPENAI_API_KEY optional

API key for OpenAI-backed translation and enrichment workflows.

OpenAI API key
EOD_API_KEY optional

API key for EOD Historical Data market-data integrations.

EODHD API key
JDBC_DATABASE_URL staging / prod

JDBC URL used by staging and production profiles.

jdbc:postgresql://host:5432/db
JDBC_DATABASE_USERNAME staging / prod

Database username used by staging and production profiles.

postgres role
JDBC_DATABASE_PASSWORD staging / prod

Database password used by staging and production profiles.

secret
BLUEBELL_DOMAIN staging / prod

Public greenhouse base URL used when building external links.

https://api.example.com
greenhouse .env resolution startup
# direct greenhouse startup computes the final .env
$ mvn spring-boot:run -Dspring-boot.run.arguments="--os-profile=dev"

# selected source file
config-dev.txt -> .env

# accepted profile values: dev, staging, prod
--os-profile=dev

# omitted profile defaults to dev; GREENHOUSE_LAUNCHER skips this copy
bootstrap a new environment bash
# 1. copy the template
$ cp .env.example .env.dev

# 2. fill in values
$ $EDITOR .env.dev

# 3. bring the stack up
$ ./scripts/linux/run-bluebell.sh up dev --build