refactor: separate standalone and managed room configs

- veins → shunts rename
- add cfg/standalone/ and cfg/<room>/ structure
- remove old data/*.json (moved to cfg/<room>/data/)
- update build.py and ctrl scripts
This commit is contained in:
buenosairesam
2026-01-02 17:09:58 -03:00
parent 46dc78db0e
commit 9e5cbbad1f
57 changed files with 1788 additions and 150 deletions

View File

@@ -7,17 +7,64 @@ Development workflow platform. Run, test, and document everything in one place.
## Quick Start
```bash
# Build
# Build standalone
python build.py dev
cd gen/standalone && .venv/bin/python run.py
# Build with room config
python build.py dev --cfg amar
cd gen/amar && .venv/bin/python run.py
# Run standalone (Docker)
./ctrl/start.sh
# Or bare-metal
cd gen && .venv/bin/python run.py
# Visit http://localhost:12000
```
## Commands
```bash
# Build
python build.py dev # → gen/standalone/
python build.py dev --cfg amar # → gen/amar/
python build.py dev --all # → both
# ctrl scripts
./ctrl/build.sh # Build standalone
./ctrl/build.sh amar # Build amar
./ctrl/build.sh --all # Build all
./ctrl/start.sh # Start standalone (Docker)
./ctrl/start.sh amar # Start amar
./ctrl/start.sh -d # Detached
./ctrl/stop.sh # Stop
./ctrl/logs.sh # View logs
```
## Adding a New Managed Room
1. Create room config directory:
```bash
mkdir -p cfg/clientx
```
2. Add required files:
```
cfg/clientx/
├── .env.example # Environment template
├── docker-compose.yml # Room services (optional)
├── databrowse/depot/ # Database schemas (optional)
├── tester/tests/ # Room-specific tests (optional)
├── monitors/ # Room-specific monitors (optional)
├── models/ # Room-specific models (optional)
└── data/ # Room-specific data files (optional)
├── depots.json # Doc depots for Atlas
└── shunts.json # Mock connectors
```
3. Build and run:
```bash
python build.py dev --cfg clientx
./ctrl/start.sh clientx
```
## Systems
| | System | What it does |
@@ -34,28 +81,30 @@ spr/
├── build.py # Build tool
├── cfg/ # Room configurations
│ ├── soleprint.config.json
│ └── amar/ # AMAR room (docker-compose, tests, models)
├── ctrl/ # Standalone Docker scripts
│ └── amar/ # AMAR room config
├── ctrl/ # Docker scripts
├── artery/ # Connectors
│ ├── veins/ # Jira, Slack, Google
│ ├── shunts/ # Fake connectors for testing
│ └── plexuses/ # Full apps (backend + frontend)
│ └── plexus/ # Full apps (backend + frontend)
├── atlas/ # Documentation
│ └── book/ # Gherkin samples, feature docs
│ └── books/ # Soleprint docs only
├── station/ # Tools & monitors
│ ├── tools/ # modelgen, tester, datagen
│ └── monitors/ # databrowse
├── soleprint/ # Core (versioned)
├── gen/ # Built instance (gitignored)
├── gen/ # Built instances (gitignored)
│ ├── standalone/ # Base soleprint
│ └── amar/ # With amar config
└── mainroom/ # Orchestration with managed room
├── amar -> cfg/amar
├── soleprint/ # Soleprint Docker config
├── sbwrapper/ # Sidebar wrapper UI
└── ctrl/ # start, stop, deploy scripts
```
@@ -71,26 +120,6 @@ Vein ──► Pulse ──► Plexus
Shunt ── Fake connector for testing
```
## Usage
### Standalone (soleprint only)
```bash
python build.py dev
./ctrl/start.sh # Docker
./ctrl/stop.sh
```
### With Managed Room (amar + soleprint)
```bash
python build.py dev --cfg amar
docker network create soleprint_network
cd mainroom/ctrl
./start.sh -d # Start detached
./stop.sh # Stop all
./deploy.sh # Deploy to AWS
```
## Ports
| Service | Port |