Scaffold the Before-M1 repo skeleton
Stand up the modular-monolith skeleton per docs/V1_BUILD_PLAN.md: one .NET 10 solution with web + worker hosts sharing seven interface-bounded module projects, PostgreSQL 17 + pgvector via EF Core 10, a React 19 + Vite SPA built into wwwroot, and Docker Compose for one-command local dev. Skeleton only — no feature code. Architecture - One project per module (OrgBoard, Identity, Skills, Assembler, Governance, Memory, Integrations); each is its own assembly so non-public types (entities, DbContext) are invisible across modules at compile time. - TeamUp.Bootstrap is the only library that references all modules; both hosts reference only Bootstrap. SharedKernel/Infrastructure never reference modules. - IModule seam: Register(...) runs in both hosts; MapEndpoints(...) only in web. - PlatformDbContext owns the pgvector extension + the seven module schemas (InitialPlatform migration); MigrationRunner applies it then any module context. - One image, two roles selected by RUN_MODE at the Docker entrypoint. Verified - dotnet build green (nullable + warnings-as-errors). - ArchitectureTests 8/8 — reflection-based boundary rules (no module -> module, -> Infrastructure, -> Bootstrap, or -> host references). - IntegrationTests 10/10 — Testcontainers boots the host against real pgvector: migration applies, vector extension + 7 schemas exist, /health 200, every /api/<module>/ping 200, /openapi/v1.json served. - client builds clean (Vite 6 — pinned for Node 22.3.0; Vite 8 needs Node >=22.12). Packages and base images route through the Nexus mirror (mirror.soroushasadi.com), reachable from Iran when nuget.org / Docker Hub / MCR are not. CI is intentionally deferred to a later session. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
const MODULES = [
|
||||
'identity',
|
||||
'orgboard',
|
||||
'skills',
|
||||
'integrations',
|
||||
'memory',
|
||||
'assembler',
|
||||
'governance',
|
||||
] as const
|
||||
|
||||
type Status = boolean | null // null = checking
|
||||
|
||||
function StatusDot({ ok }: { ok: Status }) {
|
||||
const color = ok === null ? 'bg-amber-400' : ok ? 'bg-teal-400' : 'bg-rose-500'
|
||||
return <span className={`inline-block h-2.5 w-2.5 rounded-full ${color}`} aria-hidden />
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
const [health, setHealth] = useState<Status>(null)
|
||||
const [modules, setModules] = useState<Record<string, Status>>(
|
||||
Object.fromEntries(MODULES.map((m) => [m, null])),
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
fetch('/health')
|
||||
.then((r) => setHealth(r.ok))
|
||||
.catch(() => setHealth(false))
|
||||
|
||||
MODULES.forEach((m) => {
|
||||
fetch(`/api/${m}/ping`)
|
||||
.then((r) => setModules((s) => ({ ...s, [m]: r.ok })))
|
||||
.catch(() => setModules((s) => ({ ...s, [m]: false })))
|
||||
})
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<main className="min-h-screen bg-indigo-950 text-slate-100">
|
||||
<div className="mx-auto flex min-h-screen max-w-3xl flex-col justify-center px-6 py-16">
|
||||
<p className="text-sm font-medium uppercase tracking-widest text-indigo-300">
|
||||
A product of AliaSaaS
|
||||
</p>
|
||||
<h1 className="mt-2 text-5xl font-bold tracking-tight">TeamUp.AI</h1>
|
||||
<p className="mt-3 text-lg text-indigo-200">
|
||||
Build human + AI teams. A live org chart that does work.
|
||||
</p>
|
||||
|
||||
<div className="mt-10 rounded-xl border border-indigo-800/60 bg-indigo-900/40 p-5">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="font-medium">API health</span>
|
||||
<span className="flex items-center gap-2 text-sm text-indigo-200">
|
||||
<StatusDot ok={health} />
|
||||
{health === null ? 'checking…' : health ? 'healthy' : 'unreachable'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 className="mt-10 text-sm font-semibold uppercase tracking-widest text-indigo-300">
|
||||
Modules
|
||||
</h2>
|
||||
<ul className="mt-3 grid grid-cols-1 gap-2 sm:grid-cols-2">
|
||||
{MODULES.map((m) => (
|
||||
<li
|
||||
key={m}
|
||||
className="flex items-center justify-between rounded-lg border border-indigo-800/50 bg-indigo-900/30 px-4 py-2.5"
|
||||
>
|
||||
<span className="capitalize">{m}</span>
|
||||
<span className="flex items-center gap-2 text-sm text-indigo-200">
|
||||
<StatusDot ok={modules[m]} />
|
||||
{modules[m] === null ? '…' : modules[m] ? 'ok' : 'down'}
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<p className="mt-12 text-xs text-indigo-400">
|
||||
Pre-M1 skeleton · web + worker on one modular monolith · PostgreSQL 17 + pgvector
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user