mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
https://www.loom.com/share/b3216a8f83bb4260a3be4cfca4988cb4
<!--
Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md
-->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added an opt-in sample-project population (toggle via environment) to
explore the app.
* Sample dataset expanded with teams, users, memberships, subscriptions,
transactions/purchases, payment setup, emails, and many richer demo
records.
* **Chores**
* Introduced an environment toggle to enable/disable the dummy sample
project.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds an optional dummy project seeding flow (toggled by
`STACK_SEED_ENABLE_DUMMY_PROJECT`) that populates teams, users,
memberships, payments config, transactions, and emails.
>
> - **Backend Seed (`apps/backend/prisma/seed.ts`)**:
> - **Dummy Project**: Creates/updates `DUMMY_PROJECT_ID` with config
(email theme, OAuth providers, localhost, API key options) and sets
`stripeAccountId`.
> - **Sample Data**: Seeds teams, users, and team memberships via CRUD
handlers.
> - **Payments**: Applies payments override (catalogs, items, products
incl. `starter`, `growth`, `regression-addon`) and installs all apps.
> - **Transactions**: Seeds subscriptions, item quantity changes, and
one-time purchases with fixed IDs.
> - **Emails**: Seeds sent emails with sample senders, content, and
errors.
> - **Env (`apps/backend/.env.development`)**:
> - Adds toggle `STACK_SEED_ENABLE_DUMMY_PROJECT=true` to enable dummy
project seeding.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
98fa6559aa. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
73 lines
3.8 KiB
Plaintext
73 lines
3.8 KiB
Plaintext
NEXT_PUBLIC_STACK_API_URL=http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}02
|
|
NEXT_PUBLIC_STACK_DASHBOARD_URL=http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}01
|
|
STACK_SERVER_SECRET=23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
|
|
|
|
STACK_SEED_ENABLE_DUMMY_PROJECT=true
|
|
STACK_SEED_INTERNAL_PROJECT_SIGN_UP_ENABLED=true
|
|
STACK_SEED_INTERNAL_PROJECT_OTP_ENABLED=true
|
|
STACK_SEED_INTERNAL_PROJECT_ALLOW_LOCALHOST=true
|
|
STACK_SEED_INTERNAL_PROJECT_OAUTH_PROVIDERS=github,spotify,google,microsoft
|
|
STACK_SEED_INTERNAL_PROJECT_USER_GITHUB_ID=admin@example.com
|
|
STACK_SEED_INTERNAL_PROJECT_USER_INTERNAL_ACCESS=true
|
|
STACK_SEED_INTERNAL_PROJECT_PUBLISHABLE_CLIENT_KEY=this-publishable-client-key-is-for-local-development-only
|
|
STACK_SEED_INTERNAL_PROJECT_SECRET_SERVER_KEY=this-secret-server-key-is-for-local-development-only
|
|
STACK_SEED_INTERNAL_PROJECT_SUPER_SECRET_ADMIN_KEY=this-super-secret-admin-key-is-for-local-development-only
|
|
|
|
STACK_OAUTH_MOCK_URL=http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}14
|
|
|
|
STACK_GITHUB_CLIENT_ID=MOCK
|
|
STACK_GITHUB_CLIENT_SECRET=MOCK
|
|
STACK_GOOGLE_CLIENT_ID=MOCK
|
|
STACK_GOOGLE_CLIENT_SECRET=MOCK
|
|
STACK_MICROSOFT_CLIENT_ID=MOCK
|
|
STACK_MICROSOFT_CLIENT_SECRET=MOCK
|
|
STACK_SPOTIFY_CLIENT_ID=MOCK
|
|
STACK_SPOTIFY_CLIENT_SECRET=MOCK
|
|
|
|
STACK_ALLOW_SHARED_OAUTH_ACCESS_TOKENS=true
|
|
|
|
STACK_DATABASE_CONNECTION_STRING=postgres://postgres:PASSWORD-PLACEHOLDER--uqfEC1hmmv@localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}28/stackframe?connection_limit=20
|
|
STACK_DIRECT_DATABASE_CONNECTION_STRING=postgres://postgres:PASSWORD-PLACEHOLDER--uqfEC1hmmv@localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}28/stackframe?connection_limit=20
|
|
|
|
STACK_EMAIL_HOST=127.0.0.1
|
|
STACK_EMAIL_PORT=${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}29
|
|
STACK_EMAIL_SECURE=false
|
|
STACK_EMAIL_USERNAME=does not matter, ignored by Inbucket
|
|
STACK_EMAIL_PASSWORD=does not matter, ignored by Inbucket
|
|
STACK_EMAIL_SENDER=noreply@example.com
|
|
|
|
STACK_ACCESS_TOKEN_EXPIRATION_TIME=30s
|
|
|
|
STACK_SVIX_SERVER_URL=http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}13
|
|
STACK_SVIX_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2NTUxNDA2MzksImV4cCI6MTk3MDUwMDYzOSwibmJmIjoxNjU1MTQwNjM5LCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.En8w77ZJWbd0qrMlHHupHUB-4cx17RfzFykseg95SUk
|
|
|
|
STACK_ARTIFICIAL_DEVELOPMENT_DELAY_MS=500
|
|
|
|
STACK_ENABLE_HARDCODED_PASSKEY_CHALLENGE_FOR_TESTING=yes
|
|
|
|
STACK_INTEGRATION_CLIENTS_CONFIG=[{"client_id": "neon-local", "client_secret": "neon-local-secret", "id_token_signed_response_alg": "ES256", "redirect_uris": ["http://localhost:30000/api/v2/identity/authorize", "http://localhost:30000/api/v2/auth/authorize"]}, {"client_id": "custom-local", "client_secret": "custom-local-secret", "id_token_signed_response_alg": "ES256", "redirect_uris": ["http://localhost:30000/api/v2/identity/authorize", "http://localhost:30000/api/v2/auth/authorize"]}]
|
|
CRON_SECRET=mock_cron_secret
|
|
STACK_FREESTYLE_API_KEY=mock_stack_freestyle_key
|
|
STACK_OPENAI_API_KEY=mock_openai_api_key
|
|
STACK_STRIPE_SECRET_KEY=sk_test_mockstripekey
|
|
STACK_STRIPE_WEBHOOK_SECRET=mock_stripe_webhook_secret
|
|
|
|
# S3 Configuration for local development using s3mock
|
|
STACK_S3_ENDPOINT=http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}21
|
|
STACK_S3_REGION=us-east-1
|
|
STACK_S3_ACCESS_KEY_ID=s3mockroot
|
|
STACK_S3_SECRET_ACCESS_KEY=s3mockroot
|
|
STACK_S3_BUCKET=stack-storage
|
|
|
|
# AWS region defaults to LocalStack
|
|
STACK_AWS_REGION=us-east-1
|
|
STACK_AWS_KMS_ENDPOINT=http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}24
|
|
STACK_AWS_ACCESS_KEY_ID=test
|
|
STACK_AWS_SECRET_ACCESS_KEY=test
|
|
|
|
# Upstash defaults to one of the pre-build test users of the local emulator
|
|
STACK_QSTASH_URL=http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}25
|
|
STACK_QSTASH_TOKEN=eyJVc2VySUQiOiJkZWZhdWx0VXNlciIsIlBhc3N3b3JkIjoiZGVmYXVsdFBhc3N3b3JkIn0=
|
|
STACK_QSTASH_CURRENT_SIGNING_KEY=sig_7kYjw48mhY7kAjqNGcy6cr29RJ6r
|
|
STACK_QSTASH_NEXT_SIGNING_KEY=sig_5ZB6DVzB1wjE8S6rZ7eenA8Pdnhs
|