Get the admin dashboard running with realistic fake data in about 45 minutes.
You only need Supabase and Railway for the demo — no Chiirp or Tango required.
- A live admin dashboard at
https://your-app.up.railway.app/admin - 12 fake customers, 15 referrals across all statuses, charts, pipeline — looks fully live
- The WordPress landing page shortcode ready to install
- The customer portal shortcode ready to install
- Everything running in demo mode — no real texts or gift cards fire
- A GitHub account (free)
- A Railway account — sign up with GitHub (free to start)
- A Supabase account (free)
- Node.js 18+ installed on your computer
- Git installed on your computer
If you downloaded the project as a zip from Claude, unzip it somewhere easy to find like your Desktop or Documents. Open a terminal and navigate to the folder:
cd ~/Desktop/lex-referral-app
# or wherever you unzipped itInstall dependencies:
npm install- Go to supabase.com and sign in
- Click New project
- Fill in:
- Name:
lex-referral - Database Password: generate one and save it (you won't need it again but keep it safe)
- Region:
US East (N. Virginia)
- Name:
- Click Create new project and wait about 2 minutes
- In the left sidebar, click SQL Editor
- Click New query
- Open the file
sql/schema.sqlfrom the project folder, copy the entire contents, paste it in - Click Run
- You should see:
Success. No rows returned - Click Table Editor in the left sidebar — you should see 4 tables:
customers,referrals,job_events,texts_log
- Go to Settings → API in the left sidebar
- Copy these two values — you'll need them in the next step:
- Project URL (looks like
https://abcdefgh.supabase.co) - service_role secret key — click the eye icon to reveal it
- Project URL (looks like
In the project folder, make a copy of .env.example and name it .env:
cp .env.example .envOpen .env in any text editor and fill in the values. For the demo you only need to fill in the ones marked below — leave everything else as-is:
PORT=3000
NODE_ENV=production
# ✏️ Fill these in from Supabase
SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_SERVICE_KEY=your-service-role-key-here
# Leave these as-is for demo mode
ST_APP_ID=rlaxwjh55wy6t
ST_TENANT_ID=1498628772
ST_CLIENT_ID=placeholder
ST_CLIENT_SECRET=placeholder
ST_WEBHOOK_SECRET=demo-secret-placeholder
# Leave these as-is — demo mode stubs these out
CHIIRP_API_KEY=placeholder
CHIIRP_FROM_NUMBER=9725550000
TANGO_API_KEY=placeholder
TANGO_ACCOUNT_ID=placeholder
TANGO_FUND_ID=placeholder
TANGO_DEFAULT_CATALOG_ITEM=VISA_VIRTUAL
TANGO_AUTO_REWARD=false
# ✏️ Fill this in
SITE_URL=https://lexair.com
REFERRAL_PAGE_SLUG=referral
MIN_JOB_VALUE=150
REFERRER_REWARD=75
NEW_CUSTOMER_DISCOUNT=50
# ✏️ Set a password for the admin dashboard
ADMIN_PASSWORD=choose-something-strong
# This is what makes demo mode work
DEMO_MODE=true
Save the file.
With your .env filled in, run the seed script from your project folder:
npm run seedYou should see output like this:
🌱 LEX Referral Demo Seed Script
─────────────────────────────────
👥 Creating demo customers...
✓ Sarah Mitchell → sarah-m-4f2a
✓ James Thornton → james-t-9k1b
...
🔗 Creating demo referrals...
✓ Sarah Mitchell → Kevin Mitchell [rewarded]
✓ Sarah Mitchell → Amy Caldwell [rewarded]
...
✅ Demo seed complete!
Customers created: 12
Referrals created: 15
Rewarded: 6
Total paid out: $450
If you need to start over and re-seed fresh data at any point:
npm run seed:clearRun the app on your machine first to make sure everything works:
npm run devThen open your browser and go to: http://localhost:3000/admin
You should be redirected to a login page. Enter the ADMIN_PASSWORD you set and you should see the dashboard with all the seeded data — charts, pipeline, referral table, everything.
Once you've confirmed it works, stop the server with Ctrl+C and move on to deployment.
- Go to github.com/new
- Name it
lex-referral-app - Set it to Private
- Do not check any of the initialization boxes
- Click Create repository
Back in your terminal, from the project folder:
git init
git add .
git commit -m "LEX Referral App — initial commit"
git branch -M main
git remote add origin https://github.com/YOUR_GITHUB_USERNAME/lex-referral-app.git
git push -u origin mainReplace YOUR_GITHUB_USERNAME with your actual GitHub username.
✅ Your
.envfile is listed in.gitignoreso your Supabase credentials will never be pushed to GitHub.
- Go to railway.app and sign in with GitHub
- Click New Project
- Choose Deploy from GitHub repo
- Select
lex-referral-app - Railway will kick off a first deploy — it will fail because env variables aren't set yet. That's fine.
- Click on your service in Railway
- Go to the Variables tab
- Click Raw Editor
- Paste in the entire contents of your local
.envfile (open it, copy everything, paste it in) - Click Save — Railway will automatically trigger a new deploy
- Go to the Settings tab in your Railway service
- Under Networking, click Generate Domain
- Your URL will look like:
https://lex-referral-app-production.up.railway.app - Copy this URL — you'll need it for WordPress
Visit https://your-railway-url.up.railway.app/health in your browser.
You should see:
{ "status": "ok", "app": "LEX Referral App" }If you see an error, click the Deploy Logs tab in Railway — the error message will tell you what's wrong. Most common cause is a missing or mistyped environment variable.
Go to:
https://your-railway-url.up.railway.app/admin
Log in with your ADMIN_PASSWORD. You should see the full dashboard with all the seeded demo data.
Things to click through for the demo:
- Overview tab — KPI cards, pipeline bar, trend chart, donut chart, activity feed
- Referrals tab — full table, try the status filter buttons (notice the amber badge on "Completed")
- Top Referrers tab — leaderboard with Sarah Mitchell at the top
- Activity tab — chronological event log
- On the Referrals tab, find a row with status "Completed" and click ✓ Mark Rewarded to show the manual reward flow
If you want to show the customer-facing side during the demo, install both WordPress plugins.
- Go to WordPress Admin → Plugins → Add New → Upload Plugin
- Upload
wordpress/lex-referral.php - Activate it
- Open the plugin file and update this line with your Railway URL:
define('LEX_REFERRAL_API_URL', 'https://your-railway-url.up.railway.app');
- Create a new WordPress page:
- Title: Refer a Friend
- Slug:
referral - Content:
[lex_referral] - Publish it
Visit https://lexair.com/referral — you should see the generic referral page. To see it with a real referral link, grab any referral_link value from the Supabase customers table and visit that URL.
- Upload
wordpress/lex-referral-portal.phpthe same way - Activate it
- Update the API URL constant at the top of the file to your Railway URL
- Create a new WordPress page:
- Title: My Referrals
- Slug:
my-referrals - Content:
[lex_referral_portal] - Publish it
Visit https://lexair.com/my-referrals — you'll see the phone number lookup form. To test it, use one of the demo phone numbers from the seed data, for example 9724561001 (Sarah Mitchell).
| What | Where |
|---|---|
| Admin dashboard | https://your-railway-url.up.railway.app/admin |
| Health check | https://your-railway-url.up.railway.app/health |
| Referral landing page | https://lexair.com/referral |
| Customer portal | https://lexair.com/my-referrals |
| Re-seed demo data | npm run seed:clear (run locally) |
| Railway deploy logs | Railway dashboard → your service → Deploy Logs tab |
| Supabase data viewer | supabase.com → your project → Table Editor |
These are the numbers seeded into the database:
| Name | Phone |
|---|---|
| Sarah Mitchell (3 referrals) | 9724561001 |
| James Thornton (2 referrals) | 9724561002 |
| Maria Gonzalez (2 referrals) | 9724561003 |
| Robert Chen (1 referral) | 9724561004 |
| Marcus Johnson (1 referral) | 9724561008 |
Railway deploy fails
Check the Deploy Logs tab. Most likely a missing env variable — confirm every line from your .env is in Railway's Variables tab.
npm run seed fails with "Invalid API key"
Your SUPABASE_SERVICE_KEY in .env is wrong. Go back to Supabase → Settings → API, re-copy the service_role key (not the anon key), and update your .env.
Dashboard loads but shows no data
The seed script didn't run against the right database. Double-check SUPABASE_URL in your .env matches the project you ran the schema on, then run npm run seed:clear again.
Customer portal says "Account Not Found"
Make sure you're entering just the 10-digit number with no formatting — or let the field auto-format it for you. Also confirm the seed script ran successfully and that your Railway SUPABASE_URL matches your local one.
WordPress shortcode shows nothing
The LEX_REFERRAL_API_URL constant in the plugin file needs to be updated to your actual Railway URL. Edit the file and re-upload it.