almosther isolating soleprint
This commit is contained in:
96
CLAUDE.md
96
CLAUDE.md
@@ -104,8 +104,12 @@ A **Room** is an environment with soleprint context, features, and conventions:
|
||||
The **mainroom** orchestrates interaction between soleprint and managed rooms:
|
||||
- `sbwrapper/` - Sidebar UI overlay for any managed app (quick login, Jira info, etc.)
|
||||
- `link/` - Adapters to connect soleprint to managed app data WITHOUT modifying either
|
||||
- `soleprint/` - Docker configs for running soleprint services
|
||||
- `ctrl/` - Commands for orchestration (sets env vars, starts services)
|
||||
- `soleprint/` - Docker configs + ctrl scripts for running soleprint services
|
||||
- `ctrl/local/` - Local deployment scripts (push.sh, deploy.sh)
|
||||
- `ctrl/server/` - Server setup scripts
|
||||
- `ctrl/` - Mainroom-level orchestration commands
|
||||
|
||||
Soleprint can run without a managed room (for testing veins, etc.) but is always initiated from mainroom.
|
||||
|
||||
### Hub vs Gen
|
||||
- `hub/` = Versioned base files (main.py, dataloader, index.html)
|
||||
@@ -127,19 +131,59 @@ Code inside soleprint should NOT have imports too tied to system names. Display
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### Running Locally
|
||||
### Build Tool
|
||||
|
||||
The build script at spr root handles both development and deployment builds:
|
||||
|
||||
```bash
|
||||
cd spr/gen
|
||||
pip install -r requirements.txt
|
||||
python main.py # Hub on :12000
|
||||
# From spr/
|
||||
python build.py --help
|
||||
python build.py dev # Build with symlinks
|
||||
python build.py deploy --output /path/ # Build for production
|
||||
python build.py models # Only regenerate models
|
||||
```
|
||||
|
||||
### Regenerating Models (one-time / rare)
|
||||
### Modelgen (Generic Tool)
|
||||
|
||||
Modelgen is a generic model generation tool in `station/tools/modelgen/`:
|
||||
|
||||
```bash
|
||||
cd spr/station/tools/generator
|
||||
python -m generators.orchestrator \
|
||||
--config ../../../config/soleprint.config.json \
|
||||
--output ../../../gen
|
||||
# Generate models from config
|
||||
python -m station.tools.modelgen from-config --config config/soleprint.config.json --output gen/models/
|
||||
|
||||
# Future: extract models from codebases (for databrowse)
|
||||
python -m station.tools.modelgen extract --source /path/to/django/project --output models/
|
||||
```
|
||||
|
||||
### Setting Up Dev Environment
|
||||
```bash
|
||||
cd spr/
|
||||
python build.py dev # Creates gen/ with symlinks
|
||||
|
||||
cd gen/
|
||||
python3 -m venv .venv
|
||||
.venv/bin/pip install -r requirements.txt
|
||||
.venv/bin/python main.py # Hub on :12000
|
||||
```
|
||||
|
||||
### Building for Deployment
|
||||
```bash
|
||||
cd spr/
|
||||
python build.py deploy --output ../deploy/soleprint/
|
||||
|
||||
# Then deploy:
|
||||
rsync -av ../deploy/soleprint/ server:/app/soleprint/
|
||||
ssh server 'cd /app/soleprint && ./run.sh'
|
||||
|
||||
# Or use mainroom ctrl scripts:
|
||||
cd mainroom/soleprint/ctrl/local
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
### Regenerating Models Only (rare)
|
||||
```bash
|
||||
cd spr/
|
||||
python build.py models
|
||||
```
|
||||
|
||||
### Orchestrating with Managed Room
|
||||
@@ -168,7 +212,7 @@ Planned:
|
||||
|
||||
| Tool | Location | Status | Notes |
|
||||
|------|----------|--------|-------|
|
||||
| generator | station/tools/generator | Working | Refactor file IO pending |
|
||||
| modelgen | station/tools/modelgen | Working | Generic model generation (used by build.py, databrowse) |
|
||||
| datagen | station/tools/datagen | Working | Test data generation |
|
||||
| tester | station/tools/tester | Advanced | Full BDD/playwright |
|
||||
| hub | station/tools/hub | Idea | Port management |
|
||||
@@ -194,34 +238,44 @@ Planned:
|
||||
- [x] Mainroom structure from core_nest
|
||||
- [x] Docker configs updated to soleprint naming
|
||||
- [x] Tools consolidated from pawprint
|
||||
- [x] Build tool with dev/deploy modes
|
||||
- [x] gen/ runs correctly
|
||||
|
||||
**Next:**
|
||||
1. [ ] Test gen/ runs correctly
|
||||
2. [ ] Create spr/ctrl/ scripts
|
||||
3. [ ] Complete mainroom/ctrl/ orchestration scripts
|
||||
4. [ ] Worktree for databrowse
|
||||
5. [ ] Worktree for sbwrapper
|
||||
1. [ ] Test mainroom/soleprint/ctrl scripts
|
||||
2. [ ] Test mainroom with managed room (amar)
|
||||
3. [ ] Worktree for databrowse (uses modelgen extract)
|
||||
4. [ ] Worktree for sbwrapper
|
||||
|
||||
## Files Ignored (gitignore)
|
||||
|
||||
- `fails/` - Previous attempts, reference only
|
||||
- `def/` - Definition drafts
|
||||
- `gen/` - Runnable instance (except gen/models/)
|
||||
- `gen/` - Entire folder gitignored (regenerate with `python build.py dev`)
|
||||
- `__pycache__/`, `*.pyc`
|
||||
- `venv/`, `.venv/`
|
||||
|
||||
## Quick Reference
|
||||
|
||||
```bash
|
||||
# Build for dev (from spr/)
|
||||
python build.py dev
|
||||
|
||||
# Start dev server
|
||||
cd gen && python main.py
|
||||
cd gen && .venv/bin/python main.py
|
||||
|
||||
# Health check
|
||||
curl localhost:12000/health
|
||||
|
||||
# View landing
|
||||
open http://localhost:12000
|
||||
# Build for deployment
|
||||
python build.py deploy --output /path/to/deploy/
|
||||
|
||||
# Deploy via ctrl scripts
|
||||
cd mainroom/soleprint/ctrl/local && ./deploy.sh
|
||||
|
||||
# Docker (via mainroom)
|
||||
cd mainroom/soleprint && docker compose up -d
|
||||
|
||||
# Modelgen (generic tool)
|
||||
python -m station.tools.modelgen from-config -c config/soleprint.config.json -o gen/models/
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user