Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/No-Country-simulation/G9-LATAM-Team-58/llms.txt

Use this file to discover all available pages before exploring further.

Mindloom’s configuration is split across four .env files — one at the repo root for Docker Compose interpolation, and one inside each service directory for local development. The root .env is the only file Docker Compose reads directly; the service-level files exist so developers can export the right variables before running a service outside of Compose. None of these files are ever committed to the repository.

Root .env (Docker Compose interpolation)

The root .env.example documents every variable that docker-compose.yml interpolates at startup. Copy it to .env and fill in the secrets before running docker compose up for the first time:
cp .env.example .env
VariableExample valueDescription
SPRING_DATASOURCE_URLjdbc:oracle:thin:@techmind_tp?TNS_ADMIN=/app/walletOracle ATP connection URL. Uses the TNS alias from the wallet’s tnsnames.ora. TNS_ADMIN must match the wallet mount point inside the container (/app/wallet).
SPRING_DATASOURCE_USERNAMEADMINOracle DB username.
SPRING_DATASOURCE_PASSWORD(secret)Oracle DB password. Never set a default; startup fails fast if this is blank when the db profile is active.
OCI_NAMESPACE(your namespace)OCI Object Storage namespace. Found in the OCI Console under Tenancy Details.
MODEL_BUCKETtechmind-dataName of the OCI bucket that holds the model artifact and models/latest.txt.
These variables are only used by Docker Compose during interpolation. Spring Boot reads them from the container’s environment: block, not directly from the .env file. The SPRING_* variables use Spring’s relaxed binding (SPRING_DATASOURCE_URLspring.datasource.url).

API Service (api/)

The Spring Boot API has two property files: application.properties (always loaded) and application-db.properties (loaded only when SPRING_PROFILES_ACTIVE=db).

Default configuration (application.properties)

These settings are active in all environments, including scaffold mode:
spring.application.name=techapi

# Inference service — overridden in docker-compose.yml via INFERENCE_BASE_URL
inference.base-url=http://163.176.120.167:8000
inference.connect-timeout=5s
inference.read-timeout=30s

# File upload limits
spring.servlet.multipart.max-file-size=5MB
spring.servlet.multipart.max-request-size=10MB

# JPA
spring.jpa.hibernate.ddl-auto=validate
spring.jpa.open-in-view=false
spring.jpa.database-platform=org.hibernate.dialect.OracleDialect

# Flyway
spring.flyway.locations=classpath:db/migration
spring.flyway.oracle.sql-migration-suffix=.sql

# Scaffold mode: DataSource and JPA autoconfiguration are excluded by default.
# The 'db' profile removes this exclusion and activates the real datasource.
spring.autoconfigure.exclude=org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration,org.springframework.boot.hibernate.autoconfigure.HibernateJpaAutoConfiguration
The INFERENCE_BASE_URL environment variable overrides inference.base-url at runtime. Inside the Compose network it is always set to http://inference:8000.

Database profile (application-db.properties)

Activated when SPRING_PROFILES_ACTIVE=db. This profile is always set in docker-compose.yml for the production deployment:
# Reads credentials from environment variables — never hardcoded
spring.datasource.url=${SPRING_DATASOURCE_URL}
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}

# Enables database-dependent beans
app.database.enabled=true

# Removes the scaffold-mode exclusions so the real DataSource and JPA boot
spring.autoconfigure.exclude=
When SPRING_PROFILES_ACTIVE does not include db, the API starts cleanly with no database connection. All endpoints that depend on the database return 503 Service Unavailable. This is intentional: the API can run for inference-only workflows without a wallet or Oracle credentials.
# Local scaffold mode — only inference proxy works
./mvnw spring-boot:run

api/.env.example

Spring Boot does not load .env files natively. The api/.env.example file documents what environment variables to export before running the service locally outside of Docker Compose:
# Export before running ./mvnw spring-boot:run with the db profile
SPRING_DATASOURCE_URL=jdbc:oracle:thin:@techmind_tp?TNS_ADMIN=/app/wallet
SPRING_DATASOURCE_USERNAME=ADMIN
SPRING_DATASOURCE_PASSWORD=

# Path to the unzipped wallet on your local machine
TNS_ADMIN=

# Inference service URL — defaults to localhost when running outside Compose
INFERENCE_BASE_URL=http://localhost:8000

Inference Service (inference/)

The inference service is a Python FastAPI application. Its configuration is minimal because authentication on the OCI VM is handled automatically by Instance Principal.

inference/.env.example

# OCI bucket holding model.joblib
MODEL_BUCKET=techmind-data

# Local shortcut for development: if this path exists, load_model() reads the
# file directly and skips the OCI bucket download entirely.
# Comment out or delete this line to force a real bucket download.
MODEL_LOCAL_PATH=models/model.joblib
The VM uses Instance Principal authentication — no API key files, no OCI CLI secrets, and no ~/.oci/config are needed. The oci Python SDK detects the Instance Principal signer automatically when running on the VM:
signer = oci.auth.signers.InstancePrincipalsSecurityTokenSigner()
client = oci.object_storage.ObjectStorageClient({}, signer=signer)
Set OCI_NAMESPACE and MODEL_BUCKET via the root .env. Do not set MODEL_LOCAL_PATH in production.

Web Frontend (web/)

The React frontend is built with Vite. A single environment variable controls which API endpoint the browser calls:

web/.env.example

VITE_API_URL=http://203.0.113.10:8080
In production, the nginx container reverse-proxies requests at /api to the api container on the internal techmind network. The frontend is built with VITE_API_URL pointing to the relative /api path (or the public VM IP), so all API calls share the same origin as the page — no CORS headers are needed.

Oracle Wallet

The Oracle Autonomous Database wallet is a zip archive downloaded from the OCI Console. It must be unzipped into ./wallet/ relative to docker-compose.yml on the VM before starting the stack for the first time.
# On the VM
mkdir -p ~/techmind/wallet
unzip Wallet_techmind.zip -d ~/techmind/wallet/
Docker Compose mounts it read-only into the API container:
volumes:
  - ./wallet:/app/wallet:ro
The TNS_ADMIN environment variable inside the container must match the mount point. In docker-compose.yml this is set to /app/wallet, which is also the default set in the API’s Dockerfile:
ENV TNS_ADMIN=/app/wallet
The SPRING_DATASOURCE_URL value uses the TNS alias techmind_tp from the wallet’s tnsnames.ora. Other available aliases from the wallet are techmind_high and techmind_tpurgent.
Never commit .env, the Oracle wallet directory, or any .joblib model artifact to the repository. All three are listed in .gitignore. Committing credentials, the wallet, or a trained model file is a security risk and will require a credential rotation.

Configuration Summary

Root .env

Holds SPRING_DATASOURCE_*, OCI_NAMESPACE, and MODEL_BUCKET. Read by Docker Compose for interpolation. Lives at ~/techmind/.env on the VM.

api/.env.example

Documents variables for running the Spring Boot API locally outside Compose. Spring Boot does not load .env natively — export the variables manually.

inference/.env.example

Documents MODEL_BUCKET and the optional MODEL_LOCAL_PATH shortcut for local development without OCI credentials.

web/.env.example

Documents VITE_API_URL — the API base URL baked into the React bundle at build time by Vite.

Build docs developers (and LLMs) love