Skip to content

ThriftStack — an AI-friendly core PHP LAMP boilerplate for budget shared hosting

License

Notifications You must be signed in to change notification settings

salian/thriftstack

Repository files navigation

ThriftStack

Core PHP 8.5 starter focused on logged-in SaaS dashboards, DreamHost shared hosting, and predictable LLM-friendly structure.

Highlights

  • Front controller at /public/index.php with a custom router.
  • Auth: signup/login/logout, email verification, password reset, CSRF.
  • Workspaces: multi-workspace memberships with invites and Workspace Roles.
  • RBAC admin: system access flags plus workspace roles/permissions (per workspace).
  • Admin panel: users list and audit log.
  • Notifications: in-app history and email digests.
  • Uploads for profile images and attachments in /storage/uploads.
  • Billing: plans, hosted checkout, subscriptions, and webhook handling for major providers.
  • Single stylesheet at /public/assets/css/site.css with enterprise baseline.
  • GitHub Actions deploy with releases and migrations.

Local development

  1. Point your web server docroot to /public.
  2. Copy .env.example to .env and fill THRIFTSTACK_-prefixed values.
  3. If you do not have MySQL locally, set THRIFTSTACK_DB_DRIVER=sqlite and THRIFTSTACK_DB_PATH=storage/database.sqlite.
  4. Run migrations: php scripts/migrate.php.
  5. Seed dummy data: php scripts/seed.php.
  6. Optional: set THRIFTSTACK_BUILD_ID to show a build identifier in the footer.
  7. Optional: set THRIFTSTACK_BILLING_OWNER_ROLES (comma-separated) to control who can access billing.

Tests

Run the minimal test suite: php tests/run.php.

Playwright (local E2E)

  1. Install deps: npm install and npx playwright install.
  2. Run: npm run test:e2e.
  3. See docs/testing/PLAYWRIGHT.md for options.

Roles and permissions

  • System access uses user flags: is_system_admin and is_system_staff.
  • Workspace roles/permissions control per-workspace access (e.g., workspace admin, billing within a workspace).
  • Use RequireSystemAdmin/RequireSystemAccess for system scope, and RequireWorkspaceRole/RequireWorkspacePermission for workspace scope.

DreamHost deploy

See docs/installation/SETUP_GUIDE.md for GitHub Actions setup.

About

ThriftStack — an AI-friendly core PHP LAMP boilerplate for budget shared hosting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published