- to fix: cookies syncing for nextjs and keystone admin ui:
Error: Bad hmac value
- NodeJS: ^20.17.0
- Bun
bun installbun run init
- NextJS:
bun run dev:nx- It starts a Next.js app on http://localhost:4000, and KeystoneJS GraphQL API will be available on http://localhost:4000/api/graphql
- Keystone Admin UI:
bun run dev:ks
bun run migrate: Database Migration
- Deploy on fly.io
- Create fly app:
fly app create <app name> - Set env:
fly secrets set DATABASE_URL=<DATABASE_URL>and other secrets as well if needed - set build args in
fly.toml - run
fly deploy
- Create fly app:
- Github Actions
- secrets:
FLY_API_TOKEN,DATABASE_URL
- secrets:
- Build with docker:
docker build -t nextks .
- NextJS Entry Page: src/app/page.tsx
- KeystoneJS Admin UI Custom Pages: admin/pages/custom
- using
/customas path prefix to avoid conflicts with keystone generated paths
- using
- KeystonJS Custom NextJS Pages admin/pages/custom with Pages Router
- src/keystone/context.ts
- NextJS Route Handlers
- Server Actions
- use getContextWithSession() to get context with user session
@prisma/clientneeds to stay at5.19.0for keystone to run
- App: Next.js
- CMS: KeystoneJS
- Style: TailwindCSS
- Data Fetching: SWR
- Data Processing: Lodash
- State Management: Valtio