/
home
/
techb158
/
cosmic-risk.abdallabala.com
/
docs
/
/home/techb158/cosmic-risk.abdallabala.com/docs
mkdir
upload
Name
Size
Mode
Actions
00-design-study.md
3678
0644
edit
dl
rm
01-uml-class-diagram.puml
11869
0644
edit
dl
rm
02-use-case-diagram.puml
3763
0644
edit
dl
rm
03-sequence-diagrams.puml
9732
0644
edit
dl
rm
04-database-entity-model.mmd
7051
0644
edit
dl
rm
05-database-schema.sql
13372
0644
edit
dl
rm
06-diagram-preview.html
5021
0644
edit
dl
rm
07-design-checklist.md
3256
0644
edit
dl
rm
08-step-2-storage-layer.md
5325
0644
edit
dl
rm
09-step-3-risk-crud-ui.md
3380
0644
edit
dl
rm
10-step-4-mitigation-workflow.md
3996
0644
edit
dl
rm
11-step-5-deployment-gate-workflow.md
2292
0644
edit
dl
rm
12-step-6-multi-pm-integration.md
3770
0644
edit
dl
rm
13-step-6-1-microsoft-planner-integration.md
2335
0644
edit
dl
rm
14-step-7-reporting-export.md
4158
0644
edit
dl
rm
15-step-7-1-oauth-live-connectors.md
4545
0644
edit
dl
rm
16-step-8-user-roles-access-control.md
3297
0644
edit
dl
rm
17-step-9-production-deployment-security.md
4228
0644
edit
dl
rm
18-step-10-final-academic-submission.md
3199
0644
edit
dl
rm
19-final-report-draft.md
6814
0644
edit
dl
rm
20-instructor-submission-checklist.md
3639
0644
edit
dl
rm
21-demo-script.md
3948
0644
edit
dl
rm
22-traceability-matrix.md
4847
0644
edit
dl
rm
23-testing-evidence.md
2961
0644
edit
dl
rm
24-evaluation-rubric-mapping.md
2910
0644
edit
dl
rm
25-final-deployment-runbook.md
3214
0644
edit
dl
rm
26-known-limitations-and-future-work.md
2632
0644
edit
dl
rm
27-final-qa-checklist.md
2893
0644
edit
dl
rm
28-demo-rehearsal-script.md
3618
0644
edit
dl
rm
29-submission-freeze-report.md
2769
0644
edit
dl
rm
30-final-known-issues.md
1876
0644
edit
dl
rm
31-saas-rebuild-implementation.md
2573
0644
edit
dl
rm
application-documentation.md
27515
0644
edit
dl
rm
conversation-log.md
18503
0644
edit
dl
rm
dashboard-spec.md
3691
0644
edit
dl
rm
database-guide.md
37826
0644
edit
dl
rm
development-summary.md
7070
0644
edit
dl
rm
github-architecture.svg
6288
0644
edit
dl
rm
integration-pull-push-plan.md
7384
0644
edit
dl
rm
Edit:
/home/techb158/cosmic-risk.abdallabala.com/docs/31-saas-rebuild-implementation.md
(2573B)
# COSMIC AI-Risk SaaS Rebuild Implementation Date: 2026-07-05 ## What was added The commercial SaaS rebuild now starts in: ```text saas-app/ ``` The frozen academic prototype remains unchanged and acts as the reference implementation. ## SaaS foundation The new app includes: - Next.js application scaffold. - PostgreSQL and Prisma schema. - Docker Compose deployment for VPS. - Organization and workspace tenancy. - User, role, membership, and invitation models. - Subscription and entitlement models for manual pilot billing and Stripe. - COSMIC risk scoring and deployment gate domain services. - Tenant-aware service layer for projects, risks, mitigations, gates, reports, and audit. - API route contracts for auth, organizations, workspaces, projects, risks, mitigations, gates, reports, integrations, and billing. - Seed importer from the current `data/database.json`. - Domain and tenant-security tests that run without external services. ## Current implementation boundary This is a SaaS foundation, not a finished production launch. Completed now: - Multi-tenant data model. - PostgreSQL migration target. - Domain logic port. - First API route layer. - First dashboard shell. - Manual billing and Stripe boundaries. - Invite-only auth contracts. - Docker/VPS deployment shape. Still required before commercial production: - Install dependencies and generate a lockfile. - Run Prisma migrations against PostgreSQL. - Complete session cookie auth and password/magic-link login. - Complete Stripe checkout, portal, and signed webhook implementation. - Add full CRUD UI screens beyond the first dashboard shell. - Add SAML/OIDC SSO. - Add production monitoring, logging, and backup automation. - Add legal pages: terms, privacy, security, data processing agreement. ## Recommended next command sequence ```bash cd saas-app cp .env.example .env npm install docker compose up -d postgres npm run db:push npm run db:seed npm test npm run dev ``` Open: ```text http://localhost:8090 ``` ## Local fallback mode If npm dependency installation times out, run the dependency-free local harness: ```bash cd saas-app npm run test:local npm run local:fallback ``` Open: ```text http://localhost:8090 ``` This mode does not replace the Next.js and PostgreSQL SaaS target. It exists so the SaaS domain workflows, seeded dashboard, core API routes, reports, gate evaluation, risk CRUD, mitigation management, integrations, billing/admin placeholders, users, invitations, and audit trail can be tested locally while npm/registry access is unavailable.
Save
cmd:
run