/home/techb158/balavpn.abdallabala.com
NameSizeModeActions
.git/-0755rm
.github/-0755rm
.next/-0777rm
.well-known/-0755rm
blxsenk/-0755rm
bsahcio/-0755rm
cgi-bin/-0755rm
deploy/-0777rm
docs/-0777rm
emnbsuk/-0755rm
gqefxrw/-0755rm
jmvybrk/-0755rm
ne1uwzb/-0755rm
node_modules/-0777rm
ojyauew/-0755rm
oyqfklp/-0755rm
prisma/-0777rm
public/-0777rm
rxfwzbq/-0755rm
saas-app/-0755rm
scripts/-0777rm
src/-0755rm
tests/-0777rm
trwaeuc/-0755rm
xqcyzpj/-0755rm
yirxnfc/-0755rm
.dockerignore1640644editdlrm
.env18080666editdlrm
.env-backup2490666editdlrm
.env.example19620644editdlrm
.env.production14730644editdlrm
.gitignore740644editdlrm
.htaccess2810644editdlrm
deploy.log76560644editdlrm
docker-compose.monitoring.yml2540644editdlrm
docker-compose.prod.yml34000644editdlrm
docker-compose.supabase.yml10430644editdlrm
docker-compose.yml22950644editdlrm
Dockerfile13100644editdlrm
jsconfig.json950644editdlrm
local-server.err.log00666editdlrm
local-server.js491770644editdlrm
local-server.out.log00666editdlrm
mock-oidc-provider.js70160644editdlrm
next.config.mjs2190644editdlrm
package-lock.json2376560644editdlrm
package.json22960644editdlrm
README.md21500644editdlrm
saas-app.zip2231223220644editdlrm
truncate_demo.sql16760644editdlrm
wp-cron-owhg.php16590644editdlrm
Edit: /home/techb158/balavpn.abdallabala.com/README.md (2150B)
# 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.