/home/techb158/cosmic-risk.abdallabala.com
NameSizeModeActions
.github/-0755rm
.well-known/-0755rm
bodhwyq/-0755rm
dcshbjm/-0755rm
deploy/-0755rm
docs/-0755rm
fdh1jur/-0755rm
fpdoygl/-0755rm
fuwosxr/-0755rm
lmyxopf/-0755rm
ozlbaqi/-0755rm
prisma/-0755rm
public/-0755rm
qivjzn1/-0755rm
rdvhjxm/-0755rm
scripts/-0755rm
src/-0755rm
tests/-0755rm
uijexo1/-0755rm
uveydhr/-0755rm
vyf1aer/-0755rm
.dockerignore1640644editdlrm
.env5820644editdlrm
.env.example19640644editdlrm
.env.production14730644editdlrm
.gitignore740644editdlrm
.htaccess2810644editdlrm
cosmic-pull-push-integrations.zip3375970644editdlrm
docker-compose.monitoring.yml2540644editdlrm
docker-compose.prod.yml34000644editdlrm
docker-compose.supabase.yml10430644editdlrm
docker-compose.yml23350644editdlrm
Dockerfile13100644editdlrm
jsconfig.json950644editdlrm
local-server.err.log00644editdlrm
local-server.js491820644editdlrm
local-server.out.log00644editdlrm
mock-oidc-provider.js70160644editdlrm
next.config.mjs2190644editdlrm
package-lock.json2434610644editdlrm
package.json23380644editdlrm
README.md21520644editdlrm
wp-cron-cahg.php16590644editdlrm
Edit: /home/techb158/cosmic-risk.abdallabala.com/README.md (2152B)
# COSMIC AI-Risk SaaS This folder is the commercial SaaS rebuild of the frozen academic prototype in the parent directory. The prototype remains the source reference for COSMIC risk logic and documentation. This app introduces production SaaS boundaries: multi-tenancy, PostgreSQL, Prisma, invite-only onboarding, subscriptions, entitlements, tenant-scoped APIs, Docker deployment, and enterprise extension points. ## Local Setup ```bash cp .env.example .env docker compose up -d postgres npm install npm run db:push npm run db:seed npm run dev ``` Open: ```text http://localhost:8090 ``` ## Architecture - `app/` contains Next.js pages and API route handlers. - `src/domain/` contains dependency-free COSMIC rules that are unit tested. - `src/services/` contains tenant-aware application services. - `src/lib/` contains infrastructure helpers such as Prisma, request context, and tenant guards. - `prisma/schema.prisma` defines the SaaS PostgreSQL model. - `prisma/seed.js` imports the frozen prototype sample data into a demo organization and workspace. ## Current Implementation Stage This is the Phase 1 and Phase 2 foundation: - Organization and workspace tenancy. - Role and membership model. - Invite-only auth contracts. - Project/risk/mitigation/gate/report schemas. - Manual billing and Stripe-ready subscription tables. - COSMIC scoring, dashboard aggregation, gate logic, permission checks, and entitlement rules. - Tenant-scoped API routes for the public interfaces in the SaaS plan. - Docker Compose for VPS deployment. Stripe checkout, SAML/OIDC, and live PM sync are wired as explicit boundaries and database models, but should be completed with real provider credentials before production launch. ## Local fallback mode If npm registry access is slow or blocked, use the dependency-free local fallback harness: ```bash npm run test:local npm run local:fallback ``` Open: ```text http://localhost:8090 ``` This mode uses the SaaS domain modules and imports the frozen prototype seed data into memory. It is for local workflow testing only; the full SaaS app still requires `npm install`, PostgreSQL, and Prisma.