Client Onboarding Guide
How to add a new client to the Reformer Platform
Time Required: ~30 minutes per client (currently manual, will be automated)
Step 1: Create Account in Database
Run this in pgAdmin (Render database):
-- Create new account
INSERT INTO accounts (business_name, dashboard_slug, contact_email, status)
VALUES (
'Client Business Name',
'client-slug', -- Used in URLs
'contact@client.com',
'active'
)
RETURNING id; -- Copy this UUID for next steps
Step 2: Set Up Memberstack Integration
2a. In Memberstack Dashboard
- Create new project for client
- Get API key
- Get webhook secret
2b. Add to Database
-- Add Memberstack integration
INSERT INTO integrations (account_id, service, api_key, webhook_secret, active)
VALUES (
'ACCOUNT_UUID_FROM_STEP_1',
'memberstack',
'mem_CLIENT_API_KEY',
'client_webhook_secret_123',
true
);
2c. Configure Webhook in Memberstack
Webhook URL:
https://reformer-platform.onrender.com/webhooks/memberstack/client_webhook_secret_123
Step 3: Set Up Pirsch Analytics (Optional)
3a. In Pirsch Dashboard
- Click Add Dashboard
- Enter client's domain
- Settings → Integration → Access Key
- Copy access key
3b. Add to Database
-- Add Pirsch analytics
INSERT INTO integrations (account_id, service, api_key, config, active)
VALUES (
'ACCOUNT_UUID',
'pirsch',
'pa_ACCESS_KEY_HERE',
jsonb_build_object('type', 'access_key', 'domain', 'clientdomain.com'),
true
);
Step 4: Set Up Close CRM (Optional)
Close CRM uses shared account, no per-client setup needed. Members automatically sync to Close.
Step 5: Set Up Dropbox (Optional)
5a. Get Dropbox Credentials
- Create Dropbox folder structure for client
- Generate access token if using separate Dropbox per client
5b. Add to Database
-- Add Dropbox integration
INSERT INTO integrations (account_id, service, api_key, config, active)
VALUES (
'ACCOUNT_UUID',
'dropbox',
'sl.DROPBOX_ACCESS_TOKEN',
jsonb_build_object('folder_path', '/Clients/ClientName'),
true
);
Step 6: Test Everything
6a. Test Account Creation
SELECT * FROM accounts WHERE id = 'ACCOUNT_UUID';
6b. Test Integrations
SELECT a.business_name, i.service, i.active
FROM integrations i
JOIN accounts a ON i.account_id = a.id
WHERE a.id = 'ACCOUNT_UUID';
6c. Test Webhook
curl -X POST https://reformer-platform.onrender.com/webhooks/memberstack/SECRET \
-H "Content-Type: application/json" \
-d '{"event":"member.created","payload":{"id":"test","auth":{"email":"test@client.com"}}}'
6d. Verify in Database
SELECT * FROM members WHERE email = 'test@client.com';
SELECT * FROM activity_log WHERE account_id = 'ACCOUNT_UUID' ORDER BY created_at DESC;
Step 7: Configure Client Dashboard
Update dashboard configuration to show client's data:
// In client dashboard config
{
"accountId": "ACCOUNT_UUID",
"slug": "client-slug",
"name": "Client Business Name"
}
Onboarding Checklist
| Step | Task | Time |
|---|---|---|
| 1 | Create account in database | 2 min |
| 2 | Set up Memberstack integration | 5 min |
| 3 | Set up Pirsch analytics | 5 min |
| 4 | Configure other integrations | 10 min |
| 5 | Test everything | 5 min |
| 6 | Set up client dashboard | 3 min |
| Total | ~30 min |
Future: Automated Onboarding
Goal: Reduce onboarding from 30 minutes to 5 minutes with a simple form.
Features to build:
- Admin UI with "Add Client" form
- Auto-generate webhook secrets
- Auto-create integrations
- One-click setup
Related Documentation
- Quick Reference - Common SQL queries
- Pirsch Setup - Analytics configuration
- Platform Overview - System architecture
- Authentication & Routing