Technical reference for setting up and extending the Architectural Dream Machine.
- .NET 8 SDK — dotnet.microsoft.com
- Node.js 18+ — nodejs.org
dotnet --version # 8.0.x or later
node --version # v18.x or highercd ArchitecturalDreamMachineBackend/ArchitecturalDreamMachineBackend
dotnet restore
dotnet build
dotnet test # 10 pass, 4 skipped (stretch goals)
dotnet run # Starts on http://localhost:5095Swagger UI: http://localhost:5095/swagger
SQLite by default (architecturaldreammachine.db), auto-created on first run with seeded style templates. To reset: delete the .db file and restart.
For SQL Server, set SQL_SERVER_CONNECTION_STRING env var.
In development, auth is auto-skipped when no key is configured. To test auth locally:
dotnet user-secrets set "ApiKey" "your-dev-key"For production, set the API_KEY environment variable.
cd ArchitecturalDreamMachineFrontend
npm install
npx expo startPress w to open in browser (http://localhost:8081). The 3D viewer only works on web — iOS/Android show a text parameter summary.
The frontend reads from config/api.js, defaulting to http://localhost:5095. Override via:
# .env
REACT_NATIVE_API_URL=http://localhost:5095For physical devices, use your Mac's LAN IP instead of localhost.
React Native / Expo (Frontend)
Three.js 0.145.0 — 3D rendering
| HTTP/JSON (port 5095)
ASP.NET Core 8.0 API (Backend)
PromptParser -> HouseParametersService -> DesignOrchestrationService
|- LayoutService — building sections & wall segments
|- GeometryService — 3D mesh primitives
|- RoofService — flat & gabled roof strategies
|- WindowService — window placement on exterior walls
|- InteriorWallService — partition walls with door openings
'- WallFaceService — perforated wall panels with cutouts
Export
|- IfcExporter — IFC4 via xBIM Toolkit
'- GltfExporter — GLB via SharpGLTF Toolkit
| Entity Framework Core
SQLite (default) / SQL Server (optional)
Base URL: http://localhost:5095 | Interactive docs: http://localhost:5095/swagger
{
"lotSize": 2500,
"stylePrompt": "modern minimalist with large windows",
"buildingShapeOverride": "l-shape",
"storiesOverride": 2
}| Field | Type | Notes |
|---|---|---|
lotSize |
number | Required, > 0 |
stylePrompt |
string | Required, max 500 chars |
buildingShapeOverride |
string | Optional: rectangular, l-shape, split-level, angled |
storiesOverride |
integer | Optional: 1-10 |
List saved designs. Supports ?page=1&pageSize=20.
OBJ mesh export.
IFC4 BIM export.
GLB binary with PBR materials and transparent glass.
Backend (xUnit + Moq): Tests live in Tests/ inside the main project (not a separate test project).
dotnet test # All tests
dotnet test --filter "FullyQualifiedName~PromptParserTests" # Single classFrontend (Jest):
cd ArchitecturalDreamMachineFrontend
npx jestCI: GitHub Actions (.github/workflows/ci.yml) runs on push/PR to master.
| Feature | Details |
|---|---|
| CORS | Scoped origins in production (appsettings.json), all origins in Development |
| API Key | X-API-Key header on all endpoints |
| HSTS | Enabled in non-development environments |
| Rate Limiting | 30/min fixed window on POST endpoints |
| Input Validation | FluentValidation on requests, sanitization in PromptParser |
| Request Size | 4KB max body at Kestrel level |
- Add a
StyleTemplateentry inData/AppDbContext.csseed data - Delete
architecturaldreammachine.dband restart
Port in use: lsof -ti:5095 | xargs kill -9
Database errors: Delete architecturaldreammachine.db and restart.
Frontend can't connect: Verify backend shows Now listening on: http://localhost:5095. Check http://localhost:5095/swagger.
Expo cache: npx expo start --clear