Skip to content

Commit e9220b9

Browse files
committed
feat: update seed script to use environment variables for demo user credentials and enhance documentation
1 parent 584af3c commit e9220b9

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

nuxt.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,16 @@ export default defineNuxtConfig({
5858
demoOrgSlug: process.env.DEMO_ORG_SLUG || (isRailwayPreview ? 'reqcore-demo' : ''),
5959
/** Public live-demo account email used to prefill sign-in */
6060
liveDemoEmail:
61-
process.env.LIVE_DEMO_EMAIL
61+
process.env.NUXT_PUBLIC_LIVE_DEMO_EMAIL
62+
|| process.env.LIVE_DEMO_EMAIL
6263
|| process.env.DEMO_EMAIL
6364
|| 'demo@reqcore.com',
6465
/** Public URL for hosted plan upsell CTA shown in preview mode modals */
6566
hostedPlanUrl: process.env.NUXT_PUBLIC_HOSTED_PLAN_URL || 'https://reqcore.com',
6667
/** Public live-demo secret used to prefill sign-in */
6768
liveDemoSecret:
68-
process.env.LIVE_DEMO_SECRET
69+
process.env.NUXT_PUBLIC_LIVE_DEMO_SECRET
70+
|| process.env.LIVE_DEMO_SECRET
6971
|| process.env.DEMO_PASSWORD
7072
|| 'demo1234',
7173
/** Whether in-app feedback via GitHub Issues is enabled */

server/scripts/seed.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Seeds the database with realistic demo data for Reqcore.
33
*
44
* Creates:
5-
* - 1 demo user (demo@reqcore.com / demo1234)
5+
* - 1 demo user (DEMO_EMAIL env / demo@reqcore.com · DEMO_PASSWORD env / demo1234)
66
* - 1 organization ("Reqcore Demo")
77
* - 5 jobs with varying statuses
88
* - 30 candidates
@@ -45,7 +45,7 @@ if (!DATABASE_URL) {
4545
process.exit(1)
4646
}
4747

48-
const DEMO_EMAIL = 'demo@reqcore.com'
48+
const DEMO_EMAIL = process.env.DEMO_EMAIL ?? 'demo@reqcore.com'
4949
const DEMO_PASSWORD = process.env.DEMO_PASSWORD ?? 'demo1234'
5050
const DEMO_ORG_NAME = 'Reqcore Demo'
5151
const DEMO_ORG_SLUG = 'reqcore-demo'

0 commit comments

Comments
 (0)