diff --git a/docs/ops-fundamentals.md b/docs/ops-fundamentals.md
new file mode 100644
index 0000000..a499a79
--- /dev/null
+++ b/docs/ops-fundamentals.md
@@ -0,0 +1,25 @@
+# Release Engineering & Continuous Delivery
+- Treat every commit as a deployable artifact.
+- Use CI to run tests and build artifacts; use CD to push to staging/production.
+- Pin versions, sign artifacts, and audit changes.
+- Release trains > hero deploys: small batches, fast feedback.
+
+# 11 Factor Apps (12 Factor methodology adapted)
+1. Codebase: one repo per service, tracked in version control.
+2. Dependencies: explicit manifests, lockfiles, isolated environments.
+3. Config: env vars/secrets outside code.
+4. Backing services: attach databases/queues as resources.
+5. Build/run separation: immutable artifacts, separate runtime.
+6. Processes: stateless, share nothing, push state out.
+7. Port binding: self-contained HTTP service.
+8. Concurrency: scale by process model.
+9. Disposability: fast startup, graceful shutdown.
+10. Dev/prod parity: avoid one-off configs.
+11. Logs/logging: treat logs as event streams.
+
+# Microservices Architecture
+- bounded context per service
+- async communication where possible
+- API contracts + versioning
+- independent deployability
+- observability: metrics, traces, structured logs
diff --git a/frontend/index.html b/frontend/index.html
index f0d2c81..b57c92e 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -2,75 +2,86 @@
-
+
Stackchain Dashboard
+
- Stackchain Dashboard
+ Stackchain Dashboard
-
@@ -107,42 +126,28 @@ textarea { resize: vertical; min-height: 120px; }
Whiteboard
Click & drag to draw
-
+
-
-
+
+
-
-
-
- Markdown Widget
-
-
-
-
-
-
+
diff --git a/frontend/static/index.html b/frontend/static/index.html
new file mode 100644
index 0000000..f0d2c81
--- /dev/null
+++ b/frontend/static/index.html
@@ -0,0 +1,309 @@
+
+
+
+
+
+Stackchain Dashboard
+
+
+
+
+ Stackchain Dashboard
+
+
+
+
+
+
+
+
+
+
Pull Requests
+
Loading…
+
+
+
+
+
+
+
+
+
+
+
+
Whiteboard
+
+ Click & drag to draw
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markdown Widget
+
+
+
+
+
+
+
+
+
+
diff --git a/src/__pycache__/__init__.cpython-311.pyc b/src/__pycache__/__init__.cpython-311.pyc
new file mode 100644
index 0000000..46ade8d
Binary files /dev/null and b/src/__pycache__/__init__.cpython-311.pyc differ
diff --git a/src/__pycache__/gitea_proxy.cpython-311.pyc b/src/__pycache__/gitea_proxy.cpython-311.pyc
new file mode 100644
index 0000000..1071367
Binary files /dev/null and b/src/__pycache__/gitea_proxy.cpython-311.pyc differ
diff --git a/src/__pycache__/main.cpython-311.pyc b/src/__pycache__/main.cpython-311.pyc
new file mode 100644
index 0000000..3bfafea
Binary files /dev/null and b/src/__pycache__/main.cpython-311.pyc differ
diff --git a/src/__pycache__/models.cpython-311.pyc b/src/__pycache__/models.cpython-311.pyc
new file mode 100644
index 0000000..1d8876b
Binary files /dev/null and b/src/__pycache__/models.cpython-311.pyc differ
diff --git a/src/__pycache__/suggestion_engine.cpython-311.pyc b/src/__pycache__/suggestion_engine.cpython-311.pyc
new file mode 100644
index 0000000..3ff0a44
Binary files /dev/null and b/src/__pycache__/suggestion_engine.cpython-311.pyc differ
diff --git a/src/__pycache__/views.cpython-311.pyc b/src/__pycache__/views.cpython-311.pyc
new file mode 100644
index 0000000..08b27a2
Binary files /dev/null and b/src/__pycache__/views.cpython-311.pyc differ
diff --git a/src/main.py b/src/main.py
index 2e9eec4..1c4679b 100644
--- a/src/main.py
+++ b/src/main.py
@@ -18,18 +18,30 @@ app.add_middleware(
allow_headers=["*"],
)
-app.mount("/static", StaticFiles(directory="frontend/static"), name="static")
app.include_router(frontend_router)
@app.get("/api/v1/context")
async def context() -> JSONResponse:
- user_data = await current_user()
+ try:
+ user_data = await current_user()
+ repo_data = await repos()
+ issues_data = await issues()
+ prs_data = await pull_requests()
+ except Exception as e:
+ return JSONResponse({
+ "user": {"id": None, "login": "timmy", "full_name": "Timmy Jr", "email": ""},
+ "repos": [],
+ "issues": [],
+ "pull_requests": [],
+ "view": "dashboard",
+ "deltas": [
+ {"panel": "auth", "action": "connect", "target": "stackchain-dashboard backend", "priority": "high"},
+ {"panel": "gitea", "action": "set GITEA_URL + GITEA_TOKEN", "target": "/root/stackchain-dashboard/.env or systemd env", "priority": "high"},
+ ],
+ "error": str(e),
+ })
user_model = User(id=user_data["id"], login=user_data["login"], full_name=user_data.get("full_name", ""), email=user_data.get("email", ""))
- repo_data = await repos()
- issues_data = await issues()
- prs_data = await pull_requests()
-
repo_models = [
Repo(id=r["id"], name=r["name"], full_name=r["full_name"], description=r.get("description", ""), url=r["html_url"], updated_at=r.get("updated_at", ""))
for r in repo_data[:50]
diff --git a/tests/__pycache__/__init__.cpython-311.pyc b/tests/__pycache__/__init__.cpython-311.pyc
new file mode 100644
index 0000000..a1ba93a
Binary files /dev/null and b/tests/__pycache__/__init__.cpython-311.pyc differ
diff --git a/tests/__pycache__/test_suggestion_engine.cpython-311-pytest-9.1.1.pyc b/tests/__pycache__/test_suggestion_engine.cpython-311-pytest-9.1.1.pyc
new file mode 100644
index 0000000..cfa7f0e
Binary files /dev/null and b/tests/__pycache__/test_suggestion_engine.cpython-311-pytest-9.1.1.pyc differ