This is the source code that runs the DevRel(ish) community site.
devrelish/ — complete Astro 6 SSR project
config.ts— all app tables (Groups,Meetups,RSVPs) + better-auth tables (User,Session,Account,Verification) in one placeseed.ts— 2 approved groups (SF + NYC), 1 pending (Austin), 3 gatherings
auth.ts— better-auth with drizzle adapter, admin plugin, email/passwordauth-client.ts— browser client for React componentsmiddleware.ts— injectsuser/sessionintoAstro.localson every request
| Route | Purpose |
|---|---|
/ |
Hero + why section + featured groups |
/groups |
All approved groups grid |
/groups/[slug] |
Group page with upcoming gatherings |
/groups/register |
Public group application form |
/gatherings/[id]/rsvp |
RSVP form (no auth required) |
/auth/login |
Email/password sign-in |
/dashboard/* |
Group manager views (group edit, gathering management, attendees) |
/admin/* |
Admin queue to approve/reject applications |
- Warm, whimsical palette (terracotta, sunny yellow, fresh green)
- Fredoka One display font + Nunito body font
- Full responsive CSS with custom properties — no CSS framework
# Generate a real secret
openssl rand -base64 32 # paste into .env as BETTER_AUTH_SECRET
npm run dev
# Visit http://localhost:4321To create your first admin user you'll need to call the better-auth API to sign up and then manually set role = "admin" in the database, or add it to the seed file.
| Password | Role | |
|---|---|---|
| admin@devrelish.tech | admin-devrelish | Admin |
| alex@example.com | alex-devrelish | Group manager (SF) |
| sam@example.com | sam-devrelish | Group manager (NYC) |
One-time setup (do these before the first deploy):
-
Create a Turso database
turso db create devrelish turso db show devrelish --url # → ASTRO_DB_REMOTE_URL turso db tokens create devrelish # → ASTRO_DB_APP_TOKEN
-
Set Netlify environment variables (Site settings → Environment variables):
BETTER_AUTH_SECRET—openssl rand -base64 32BETTER_AUTH_URL— your Netlify URL (e.g.https://<your-site>.netlify.app)ASTRO_DB_REMOTE_URL— from Turso aboveASTRO_DB_APP_TOKEN— from Turso aboveSETUP_TOKEN—openssl rand -base64 24(temporary, for admin setup)
-
Push the schema to Turso (run locally once with the env vars set):
npm run db:push
-
Deploy to Netlify — the build command (
astro db push --remote && astro build) will keep the schema in sync on every future deploy automatically. -
Create your admin account — visit
https://your-site.netlify.app/setup, paste theSETUP_TOKEN, fill in your name/email/password. -
Remove
SETUP_TOKENfrom Netlify environment variables — this permanently disables the/setuppage (it shows "Already configured" anyway once an admin exists, but removing the token is belt-and-suspenders).