Misaka_Company baa841ae42 feat(server): add attachment ORM models and table provisioning
Adds 5 tables in the CargoTrace schema: attachment_category,
finished_goods_attachment, finished_goods_attachment_item,
finished_goods_attachment_location, finished_goods_box_attachment_item.
Includes a one-off create_all script and extends test cleanup.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-12 13:32:26 +08:00
2026-05-13 09:52:23 +08:00

CargoTrace FastAPI Backend

FastAPI backend service for the CargoTrace platform.

Getting Started

python -m venv .venv
source .venv/bin/activate  # Linux/Mac
# or .venv\Scripts\activate  # Windows
pip install -r requirements.txt
uvicorn app.main:app --reload

Configuration

Configuration is managed via YAML files in the config/ directory.

Configuration File

Edit config/settings.yaml to configure your environment:

database:
  active: sql_server  # sql_server or postgresql
  sql_server:
    host: your-host
    port: 1433
    database: your-database
    username: your-username
    password: your-password
  postgresql:
    host: your-postgres-host
    port: 5432
    database: your-database
    username: your-username
    password: your-password

Set database.active to choose the database backend. Both backends expect the same database name, schemas, and table structure.

Local Overrides

For local development, create config/settings.local.yaml to override specific values without committing them.

Description
CargoTrace FastAPI Backend
Readme 222 KiB
Languages
Python 100%