Public website for STEMMechanics, showcasing programs, workshops, and resources.
- Laravel (PHP)
- Vite (frontend build)
- MySQL (typical production setup)
- PHP 8.x
- Composer
- Node.js 18+ (22 recommended for builds in deploy script)
- A database supported by Laravel (MySQL recommended)
composer install
npm install
npm run build
php artisan key:generate
php artisan migrate
php artisan serve- Copy
.env.exampleto.envand update values. APP_VERSIONis set during deploy (release tag).APP_COMMITis set during deploy (git hash).
The site uses a mix of environment variables and database-stored options. The most important values are:
| Key or secret | Where it lives | Notes |
|---|---|---|
APP_KEY |
.env |
Laravel encryption key. Rotating it invalidates encrypted cookies and sessions. |
DB_PASSWORD |
.env |
Database user password used by Laravel. |
REDIS_PASSWORD |
.env |
Redis password, if Redis auth is enabled. |
MAIL_PASSWORD |
.env |
SMTP password for outbound mail. |
ALTCHA_HMAC_KEY |
.env |
Used to sign ALTCHA challenges. |
LIVEKIT_API_KEY / LIVEKIT_API_SECRET |
.env |
Used for LiveKit access tokens and webhook validation. |
SQUARE_ACCESS_TOKEN / SQUARE_WEBHOOK_SIGNATURE_KEY |
.env |
Square API credentials and webhook validation secret. |
FLARE_KEY |
.env |
Flare error reporting API key. |
POSTMARK_TOKEN / MAILGUN_SECRET |
.env |
Alternate mail provider credentials, if configured. |
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY |
.env |
Used by cache, queue, and SES/DynamoDB integrations if enabled. |
PUSHER_APP_SECRET |
.env |
Pusher auth secret if broadcasting is enabled. |
SLACK_BOT_USER_OAUTH_TOKEN |
.env |
Slack notifications token if configured. |
minecraft.webhook-secret |
Database site option | Managed in the admin Site Options screen. Used to sign STEMCraft webhook traffic. |
If you suspect a leak, rotate the affected credential at the provider, update the matching value here, and then clear any cached config if needed.
Standard Laravel deployment. This repo uses a release‑tag based flow. The server deploy script:
- Checks the latest tag
- Checks out that tag
- Runs
composer install, migrations, andnpm run build - Updates
APP_VERSIONandAPP_COMMITin.env - Uses
scripts/deploy.shby default, withDEPLOY_SCRIPT_PATHavailable if you need to override the location.
Production permissions expected by the app and deploy script:
- The deploy user must be able to write to the repository working tree,
.git,.env,public/build,node_modules,vendor,bootstrap/cache, andstorage. - The web user must be able to read the checked-out app and write to
storageandbootstrap/cache. - Deploy-time Git, npm, and Composer state is stored under
storage/app(deploy-gitconfig,npm-cache,composer-home, andcomposer-cache) so the deploy does not depend on a writable/var/wwwhome directory. - Shared writable directories should normally be owned by the deploy/web user group with directories
775and files664. In a typical Debian/Ubuntu PHP-FPM setup, keepstorageandbootstrap/cacheaccessible towww-data. - The deploy script runs best-effort permission repair on
public,storage, andbootstrap/cache. When run as root, it also changes mutable deploy paths such as.git,.env,public/build,node_modules,vendor,storage, andbootstrap/cachetowww-data:www-databy default. Override withDEPLOY_WEB_USERandDEPLOY_WEB_GROUPif the container uses a different deploy/web user. - Local file backups live under
storage/app/backups/files; backup run directories must remain readable by the web user so the admin backups page can list and inspect them.
See CHANGES.md for release notes.
See CONTRIBUTING.md.
See SECURITY.md.
See CODE_OF_CONDUCT.md.
See ARCHITECTURE.md for a high‑level overview and notes on models, tables, and views.