/
home
/
techb158
/
balavpn.abdallabala.com
/
/home/techb158/balavpn.abdallabala.com
mkdir
upload
Name
Size
Mode
Actions
.git/
-
0755
rm
.github/
-
0755
rm
.next/
-
0777
rm
.well-known/
-
0755
rm
blxsenk/
-
0755
rm
bsahcio/
-
0755
rm
cgi-bin/
-
0755
rm
deploy/
-
0777
rm
docs/
-
0777
rm
emnbsuk/
-
0755
rm
gqefxrw/
-
0755
rm
jmvybrk/
-
0755
rm
ne1uwzb/
-
0755
rm
node_modules/
-
0777
rm
ojyauew/
-
0755
rm
oyqfklp/
-
0755
rm
prisma/
-
0777
rm
public/
-
0777
rm
rxfwzbq/
-
0755
rm
saas-app/
-
0755
rm
scripts/
-
0777
rm
src/
-
0755
rm
tests/
-
0777
rm
trwaeuc/
-
0755
rm
xqcyzpj/
-
0755
rm
yirxnfc/
-
0755
rm
.dockerignore
164
0644
edit
dl
rm
.env
1808
0666
edit
dl
rm
.env-backup
249
0666
edit
dl
rm
.env.example
1962
0644
edit
dl
rm
.env.production
1473
0644
edit
dl
rm
.gitignore
74
0644
edit
dl
rm
.htaccess
281
0644
edit
dl
rm
deploy.log
7656
0644
edit
dl
rm
docker-compose.monitoring.yml
254
0644
edit
dl
rm
docker-compose.prod.yml
3400
0644
edit
dl
rm
docker-compose.supabase.yml
1043
0644
edit
dl
rm
docker-compose.yml
2295
0644
edit
dl
rm
Dockerfile
1310
0644
edit
dl
rm
jsconfig.json
95
0644
edit
dl
rm
local-server.err.log
0
0666
edit
dl
rm
local-server.js
49177
0644
edit
dl
rm
local-server.out.log
0
0666
edit
dl
rm
mock-oidc-provider.js
7016
0644
edit
dl
rm
next.config.mjs
219
0644
edit
dl
rm
package-lock.json
237656
0644
edit
dl
rm
package.json
2296
0644
edit
dl
rm
README.md
2150
0644
edit
dl
rm
saas-app.zip
223122322
0644
edit
dl
rm
truncate_demo.sql
1676
0644
edit
dl
rm
wp-cron-owhg.php
1659
0644
edit
dl
rm
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.
Save
cmd:
run