Trivet is an open-source Next.js service that lets Ghost publishers offer “Sign in with Google” for members. Sign up for the free hosted service at trivet.contraption.co
- Google OAuth for blog owners and Ghost members
- Guided onboarding with Ghost Admin API integration
- Member provisioning with “Trivet” labels
- Analytics for new vs returning sign-ins
- Embeddable One Tap script for Ghost Code Injection
- Next.js App Router + React 18 + TypeScript
- Postgres + Prisma Migrate
- Tailwind CSS + shadcn/ui + Lucide
- react-hook-form + Zod
- @tanstack/react-query
- Copy
.env.exampleto.envand fill in values. - Install dependencies:
pnpm install- Run migrations and generate Prisma client:
pnpm prisma:generate
pnpm prisma migrate dev- Start the dev server:
pnpm devpnpm check- TypeScript typecheckpnpm lint- ESLintpnpm format:check- Biome formatting checkpnpm build- Next.js production build
docker build -t trivet .
docker run --rm -p 3000:3000 \
-e DATABASE_URL=postgresql://... \
-e GOOGLE_OAUTH_CLIENT_ID=... \
-e GOOGLE_OAUTH_CLIENT_SECRET=... \
-e TRIVET_SESSION_SECRET=... \
trivetThe container runs migrations on boot before starting the web server.
Required:
DATABASE_URLGOOGLE_OAUTH_CLIENT_IDGOOGLE_OAUTH_CLIENT_SECRETTRIVET_SESSION_SECRET
Optional:
TRIVET_PUBLIC_BASE_URL(defaults to the request origin)
Create an OAuth 2.0 Client ID in Google Cloud Console (Application type: Web).
Authorized JavaScript origins (include every origin where the Google button/One Tap runs):
http://localhost:3000https://trivet.contraption.co(or yourTRIVET_PUBLIC_BASE_URL)- Any Ghost blog origins that will load One Tap with this client ID
Authorized redirect URIs:
http://localhost:3000/api/auth/callbackhttps://trivet.contraption.co/api/auth/callback(or${TRIVET_PUBLIC_BASE_URL}/api/auth/callback)
Use the resulting client ID/secret for GOOGLE_OAUTH_CLIENT_ID and GOOGLE_OAUTH_CLIENT_SECRET (or enter them in the custom Google setup step for a specific account).
MIT