Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

CEO Cockpit

CEO Cockpit is a self-hosted, multi-tenant operating workspace for CEOs and their teams. Each CEO system has an independent SQLite business database, upload directory, members, sessions, and business records.

What Is Public

  • The source code, Docker configuration, documentation, and the GitHub Pages preview are public.
  • The Pages preview uses fictional data only. It has no authentication API, upload endpoint, sessions, or persisted business data.
  • Runtime databases, uploads, environment files, phone numbers, SMS configuration, and internal tenant data must never be committed.

Run Locally

Requirements: Node.js 22 or later.

node server.js

Development data is created in data/ and is ignored by Git. Open http://127.0.0.1:4173, register a CEO system, and then create members from that system.

Run With Docker

cp .env.example .env
# Replace SESSION_TOKEN_SECRET and OTP_SECRET with independent random values.
docker compose up --build -d

The compose file binds the service to 127.0.0.1:4173. Put Caddy, Nginx, or another TLS reverse proxy in front of it before exposing it publicly. Set TRUST_PROXY=1 only when that proxy is trusted and supplies X-Forwarded-For.

Runtime Data And Backup

Set CEO_DATA_DIR to a private, persistent directory outside the repository for non-Docker deployments. Back up the entire runtime directory while the service is stopped, including the platform SQLite database, tenant SQLite databases, and tenant upload folders. Restore that directory as one unit with the same secret values; rotating SESSION_TOKEN_SECRET intentionally invalidates all active sessions.

Public Source And Private Runtime

Keep the public source checkout and the private runtime as separate directories. The public checkout is the only directory that is pushed to GitHub. The private runtime retains its ignored data/, upload directories, .env, and local sessions; those files never flow back to the public repository.

Before publishing from the public checkout, run node scripts/public-copy-hygiene.mjs. It fails when a local data/, runtime/, uploads/, .env, or root SQLite file is present in that public source directory. Run the complete test suite with node scripts/run-tests.mjs; it uses an operating-system temporary data directory and removes it when testing ends.

On Windows, configure the private runtime with a fetch-only upstream remote pointing to the public repository. Inspect an update without changing files:

node scripts/update-local.mjs --dry-run

Apply a verified fast-forward update:

node scripts/update-local.mjs --yes

The updater rejects uncommitted source changes and non-fast-forward history. For an actual update it stops only the Node process on port 4173, copies data/ into ignored runtime/backups/, runs release checks and tests, then starts the local service. A failed code update returns to the prior commit and starts the prior service without deleting runtime data.

GitHub Pages Demo

Open the public preview at https://crimson-623.github.io/ceo-cockpit/.

GitHub Pages serves the same frontend entry, login, identity confirmation, overview, workbench, organization, and video assets as the self-hosted application. It runs in a read-only demo mode with fictional browser-memory data. It cannot create accounts, save edits, upload files, send SMS, or access an API, database, session, or tenant data. Use Docker for a complete writable deployment.

  • Demo workspace code: DEMO-2026.
  • CEO demo: demo.ceo / DemoCeo@2026 opens the fictional CEO view.
  • Employee demo: demo.staff / DemoStaff@2026 opens the fictional employee view.
  • Select either account in the login panel to fill the workspace code, account, and password automatically.
  • Internal tenant codes and local test credentials are intentionally not published. They belong only in a private runtime.

Security

  • Production requires SESSION_TOKEN_SECRET, OTP_SECRET, and an SMS provider for password recovery.
  • The server never serves runtime directories as static files; attachments are available only through authorized download routes.
  • New and reset passwords require at least 10 characters containing letters and numbers. Existing accounts remain compatible until their next password change.
  • Run node scripts/check-release.mjs before committing or publishing a release.

See SECURITY.md for vulnerability reporting and docs/deployment.md for deployment guidance.

About

CEO 驾驶舱开源多体系智能经营决策工作空间

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /