Skip to content

Commit edea44a

Browse files
committed
chore: oss launch
0 parents  commit edea44a

1,185 files changed

Lines changed: 200403 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# =============================================================================
2+
# mdplane Docker Ignore File
3+
# Excludes files from Docker build context for faster builds
4+
# =============================================================================
5+
6+
# Dependencies (reinstalled in container)
7+
node_modules
8+
.pnpm-store
9+
10+
# Build artifacts (rebuilt in container)
11+
.next
12+
.turbo
13+
dist
14+
build
15+
out
16+
17+
# Version control
18+
.git
19+
.gitignore
20+
21+
# Test files
22+
**/__tests__
23+
**/*.test.ts
24+
**/*.test.tsx
25+
**/*.spec.ts
26+
**/*.spec.tsx
27+
coverage
28+
29+
# Documentation (not needed in container)
30+
*.md
31+
!README.md
32+
docs/
33+
34+
# Environment files (pass secrets at runtime)
35+
.env*
36+
!.env.example
37+
38+
# IDE and editor files
39+
.vscode
40+
.idea
41+
*.swp
42+
*.swo
43+
.DS_Store
44+
45+
# Logs
46+
logs
47+
*.log
48+
npm-debug.log*
49+
pnpm-debug.log*
50+
51+
# Database files (mounted via volume)
52+
*.sqlite
53+
*.sqlite-wal
54+
*.sqlite-shm
55+
data/
56+
57+
# Task files (development only)
58+
tasks/
59+
60+
# Misc
61+
*.bak
62+
*.tmp
63+
*.tsbuildinfo
64+
.vercel
65+
.cache
66+
.eslintcache

.env.example

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# =============================================================================
2+
# mdplane Monorepo Environment Variables
3+
# Copy this file to .env in the repository root for local development.
4+
# =============================================================================
5+
6+
# -----------------------------------------------------------------------------
7+
# Server (@mdplane/server)
8+
# -----------------------------------------------------------------------------
9+
10+
NODE_ENV=development
11+
PORT=3001
12+
HOST=0.0.0.0
13+
DATABASE_URL=./data/mdplane.sqlite
14+
15+
# Public origins returned in API responses.
16+
BASE_URL=http://127.0.0.1:3001
17+
APP_URL=http://127.0.0.1:3000
18+
19+
# Better Auth API origin (must point to the server host).
20+
BETTER_AUTH_URL=http://127.0.0.1:3001
21+
22+
# Required in production:
23+
# - BETTER_AUTH_SECRET: Better Auth signing secret.
24+
# - MP_JWT_SECRET: base64-encoded 32-byte secret for WebSocket token signing.
25+
# BETTER_AUTH_SECRET=
26+
# MP_JWT_SECRET=
27+
28+
# Optional OAuth providers (required only if OAuth login is enabled).
29+
# GITHUB_CLIENT_ID=
30+
# GITHUB_CLIENT_SECRET=
31+
# GOOGLE_CLIENT_ID=
32+
# GOOGLE_CLIENT_SECRET=
33+
34+
# Optional operator and runtime controls.
35+
# ADMIN_SECRET=
36+
MDPLANE_GOVERNED_MODE=false
37+
# WS_URL=ws://127.0.0.1:3001/ws
38+
# DISABLE_BACKGROUND_JOBS=false
39+
# ALLOW_HTTP_WEBHOOKS=false
40+
# MP_DEBUG_WS=false
41+
# MAX_WORKSPACE_STORAGE_BYTES=104857600
42+
# MAX_FILE_SIZE_BYTES=10485760
43+
# MAX_VOLUME_SIZE_BYTES=5368709120
44+
45+
# -----------------------------------------------------------------------------
46+
# Web (@mdplane/web)
47+
# -----------------------------------------------------------------------------
48+
49+
NEXT_PUBLIC_API_URL=http://127.0.0.1:3001
50+
NEXT_PUBLIC_APP_URL=http://127.0.0.1:3000
51+
NEXT_PUBLIC_GOVERNED_MODE=false
52+
# Optional server-side API override for Docker/internal networking.
53+
# API_INTERNAL_URL=http://server:3001
54+
55+
# Optional override vars.
56+
# NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001/ws
57+
58+
# -----------------------------------------------------------------------------
59+
# Docs / Landing metadata (optional)
60+
# -----------------------------------------------------------------------------
61+
62+
# NEXT_PUBLIC_DOCS_URL=http://127.0.0.1:3002
63+
# NEXT_PUBLIC_SITE_URL=http://127.0.0.1:3004
64+
65+
# -----------------------------------------------------------------------------
66+
# CLI overrides (optional)
67+
# -----------------------------------------------------------------------------
68+
69+
# MDPLANE_API_URL=http://127.0.0.1:3001
70+
# MDPLANE_APP_URL=http://127.0.0.1:3000

.env.selfhost.example

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# =============================================================================
2+
# mdplane Self-Host Docker Compose Environment
3+
# Copy to .env.selfhost and use with:
4+
# pnpm run selfhost:min:up
5+
# =============================================================================
6+
7+
# Optional host port overrides (compose defaults: app=3000, api=3001, docs=3002, landing=3004).
8+
# APP_PORT=3000
9+
# API_PORT=3001
10+
# DOCS_PORT=3002
11+
# LANDING_PORT=3004
12+
#
13+
# If you change host ports, also update the localhost URL vars below so generated links,
14+
# browser calls, and websocket connections stay consistent.
15+
# Required pairings:
16+
# - API_PORT <-> BASE_URL, BETTER_AUTH_URL, WS_URL, NEXT_PUBLIC_API_URL, NEXT_PUBLIC_WS_URL, LANDING_NEXT_PUBLIC_API_URL
17+
# - APP_PORT <-> APP_URL, NEXT_PUBLIC_APP_URL
18+
# - DOCS_PORT <-> NEXT_PUBLIC_DOCS_URL
19+
# - LANDING_PORT <-> NEXT_PUBLIC_SITE_URL
20+
21+
# Local default origins (change for production deployments).
22+
BASE_URL=http://localhost:3001
23+
APP_URL=http://localhost:3000
24+
WS_URL=ws://localhost:3001/ws
25+
BETTER_AUTH_URL=http://localhost:3001
26+
27+
# Required secrets.
28+
# Generate with:
29+
# node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
30+
BETTER_AUTH_SECRET=local-selfhost-better-auth-secret-32-bytes-min
31+
MP_JWT_SECRET=local-selfhost-jwt-secret-32-bytes-minimum
32+
33+
# Capability-first mode default. Set true to enable governed control features.
34+
MDPLANE_GOVERNED_MODE=false
35+
NEXT_PUBLIC_GOVERNED_MODE=false
36+
37+
# Web public URLs.
38+
API_INTERNAL_URL=http://server:3001
39+
NEXT_PUBLIC_API_URL=http://localhost:3001
40+
NEXT_PUBLIC_APP_URL=http://localhost:3000
41+
NEXT_PUBLIC_WS_URL=ws://localhost:3001/ws
42+
43+
# Optional OAuth providers for governed mode.
44+
# GITHUB_CLIENT_ID=
45+
# GITHUB_CLIENT_SECRET=
46+
# GOOGLE_CLIENT_ID=
47+
# GOOGLE_CLIENT_SECRET=
48+
49+
# Optional operator/admin endpoint token.
50+
# ADMIN_SECRET=
51+
52+
# Trust proxy-provided IP headers (X-Real-IP / X-Forwarded-For) in addition to CF-Connecting-IP.
53+
# Enable only when your ingress proxy strips and rewrites these headers.
54+
# TRUST_PROXY_HEADERS=false
55+
# Optional shared secret required on proxy-forwarded requests before trusting client IP headers.
56+
# Recommended for platforms where origin IP allowlisting is not available.
57+
# TRUSTED_PROXY_SHARED_SECRET=
58+
# TRUSTED_PROXY_SHARED_SECRET_HEADER=x-mdplane-proxy-secret
59+
# Trust a single-value X-Forwarded-For header as client IP.
60+
# Keep disabled unless your proxy always overwrites this header.
61+
# TRUST_SINGLE_X_FORWARDED_FOR=false
62+
# Require trusted client IP on anonymous sensitive endpoints (/bootstrap, /capabilities/check).
63+
# Defaults to true in production.
64+
# REQUIRE_TRUSTED_CLIENT_IP_FOR_ANON_RATE_LIMITS=true
65+
66+
# Optional rate-limit overrides (requests per window + window in ms).
67+
# RATE_LIMIT_BOOTSTRAP_LIMIT=10
68+
# RATE_LIMIT_BOOTSTRAP_WINDOW_MS=3600000
69+
# RATE_LIMIT_READ_LIMIT=1000
70+
# RATE_LIMIT_READ_WINDOW_MS=60000
71+
# RATE_LIMIT_WRITE_LIMIT=100
72+
# RATE_LIMIT_WRITE_WINDOW_MS=60000
73+
# RATE_LIMIT_APPEND_LIMIT=200
74+
# RATE_LIMIT_APPEND_WINDOW_MS=60000
75+
# RATE_LIMIT_SEARCH_LIMIT=60
76+
# RATE_LIMIT_SEARCH_WINDOW_MS=60000
77+
# RATE_LIMIT_SUBSCRIBE_LIMIT=10
78+
# RATE_LIMIT_SUBSCRIBE_WINDOW_MS=60000
79+
# RATE_LIMIT_BULK_LIMIT=10
80+
# RATE_LIMIT_BULK_WINDOW_MS=60000
81+
# RATE_LIMIT_WEBHOOK_CREATE_LIMIT=5
82+
# RATE_LIMIT_WEBHOOK_CREATE_WINDOW_MS=3600000
83+
# RATE_LIMIT_CAPABILITY_CHECK_LIMIT=5
84+
# RATE_LIMIT_CAPABILITY_CHECK_WINDOW_MS=60000
85+
86+
# Optional full-profile docs + landing public URLs.
87+
# NEXT_PUBLIC_DOCS_URL=https://docs.example.com
88+
# NEXT_PUBLIC_SITE_URL=https://www.example.com
89+
# LANDING_NEXT_PUBLIC_API_URL=https://api.example.com
90+
91+
# Production note:
92+
# - Replace localhost URLs with public HTTPS origins
93+
# - Replace sample secrets with cryptographically random values

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Default owners for all files
2+
* @albri

0 commit comments

Comments
 (0)