|
| 1 | +# Visionaries to the Throne development |
| 2 | + |
| 3 | +This development tenant supports the signup (#274) and login (#275) work in the |
| 4 | +shared ServiceStart codebase. It does not provision a production deployment or |
| 5 | +implement the camper application workflow. |
| 6 | + |
| 7 | +## First-time setup |
| 8 | + |
| 9 | +Complete the [README local setup](../README.md#getting-started), including Docker, |
| 10 | +Juno, your local `.env`, and database migrations. Keep the template's simulated |
| 11 | +email configuration for ordinary development. |
| 12 | + |
| 13 | +Add `visionariesforthethrone.lvh.me` to the comma-separated `ALLOWED_DEV_ORIGINS` |
| 14 | +value in your local `.env` (preserve any existing entries). Restart Next.js after |
| 15 | +changing it. For this tenant's auth work, set: |
| 16 | + |
| 17 | +```dotenv |
| 18 | +BETTER_AUTH_URL=http://visionariesforthethrone.lvh.me:3000 |
| 19 | +``` |
| 20 | + |
| 21 | +With your **local development database** configured, run: |
| 22 | + |
| 23 | +```bash |
| 24 | +pnpm run db:migrate |
| 25 | +pnpm run db:seed |
| 26 | +pnpm dev |
| 27 | +``` |
| 28 | + |
| 29 | +Do not run the development seed against production: it creates accounts with |
| 30 | +known test passwords. Existing contributors can pull this change and rerun |
| 31 | +`pnpm run db:seed`; no new schema migration is required. |
| 32 | + |
| 33 | +## URLs and accounts |
| 34 | + |
| 35 | +- Signup: <http://visionariesforthethrone.lvh.me:3000/signup> |
| 36 | +- Login: <http://visionariesforthethrone.lvh.me:3000/login> |
| 37 | +- Existing application home: <http://visionariesforthethrone.lvh.me:3000/> |
| 38 | + |
| 39 | +`lvh.me` resolves to loopback; no hosts-file entry is normally needed. Use the |
| 40 | +tenant hostname, not `localhost`, which selects the default ServiceStart tenant. |
| 41 | + |
| 42 | +All these development accounts use `password123`: |
| 43 | + |
| 44 | +| Email | Existing ServiceStart role | Use | |
| 45 | +| ----------------------- | -------------------------- | --------------------------------- | |
| 46 | +| `owner@example.com` | owner | Organization owner controls | |
| 47 | +| `admin@example.com` | admin | Staff access | |
| 48 | +| `member1@example.com` | member | Student/member access | |
| 49 | +| `member2@example.com` | member | Second student/member | |
| 50 | +| `nonmember@example.com` | none | Signed-in user without membership | |
| 51 | + |
| 52 | +The same email addresses exist in other seeded organizations, with distinct user |
| 53 | +IDs and memberships. Accounts are selected by the tenant hostname. Public signup |
| 54 | +continues to use existing ServiceStart behavior; a member fixture does not imply |
| 55 | +camp acceptance or automatic membership for new signups. |
| 56 | + |
| 57 | +## Configuration and scope |
| 58 | + |
| 59 | +- Organization ID: `org_visionariesforthethrone` |
| 60 | +- Slug: `visionariesforthethrone` |
| 61 | +- Primary color: `#5C218C`; secondary color: `#C29BDC` (Figma palette). |
| 62 | +- Development tagline: `Visionaries to the Throne`. |
| 63 | +- Initial navbar: horizontal-center, white. |
| 64 | + |
| 65 | +These are organization configuration rows, not organization-name checks in app |
| 66 | +code. Rerunning the seed reapplies these configuration defaults while retaining |
| 67 | +existing account IDs and credentials. The seed does not set `LogoUrl`: until an |
| 68 | +approved logo is configured, the existing ServiceStart/Sunset fallback appears. |
| 69 | +Configure the approved asset through the existing `LogoUrl` setting when available. |
| 70 | + |
| 71 | +The current shared login/signup UI is intentional. The final layout, logo, copy, |
| 72 | +student/admin landing destinations, and account-versus-membership approval flow |
| 73 | +remain part of product/design coordination for #274 and #275. Use the existing |
| 74 | +home page to exercise development accounts until those destinations are built. |
| 75 | +No user schema, camper schema, or new role is introduced here. |
| 76 | + |
| 77 | +## Verify your setup |
| 78 | + |
| 79 | +1. Open signup while signed out; verify the Visionaries name and purple background. |
| 80 | +2. Sign in as `member1@example.com`, then sign out and sign in as `admin@example.com`. |
| 81 | +3. Check the existing member and admin experiences using their respective accounts. |
| 82 | +4. Rerun the seed and confirm the same accounts still work. |
| 83 | + |
| 84 | +The seed integration suite checks repeatability, branding, roles, and login across |
| 85 | +all seeded tenants. With the local test database running on port 5433: |
| 86 | + |
| 87 | +```bash |
| 88 | +pnpm exec vitest run tests/unit/scripts/seed.test.ts |
| 89 | +``` |
| 90 | + |
| 91 | +New PR preview databases also run this seed through the existing workflow. An |
| 92 | +existing preview database needs reseeding to receive the tenant. Preview hostname |
| 93 | +and authentication-origin routing still need a valid tenant-aware URL; a normal |
| 94 | +Netlify preview URL alone does not establish the Visionaries hostname. Local |
| 95 | +development above is the supported starting point for these tickets. |
| 96 | + |
| 97 | +`pnpm run setupOrg` sets up email and optional file storage; it does not create |
| 98 | +the organization. Production organization provisioning, staff invitations, DNS, |
| 99 | +and real email setup are separate maintainer tasks. |
| 100 | + |
| 101 | +## Design reference |
| 102 | + |
| 103 | +[Visionaries Figma section](https://www.figma.com/design/PtssEcXD74l902nKJ2uIAh/Service-Start-Fall-2026?node-id=20936-3387) |
0 commit comments