/nextjs-opinionated-hasura

Next.js boilerplate with: typescript, next.js, tailwindcss, storybook, jest, eslint, prettifier, react hook form, zod, react-query AND hasura, postgreslq, graphql-code-generator

Primary LanguageTypeScriptMIT LicenseMIT

nextjs-opinionated-hasura

- demo

- storybook

extends nextjs-opinionated (demo) - base template, without Hasura and Auth0


This template includes


Pre-Requirements

Before yarn dev

yarn

# create .env.local
cp .env.local.example .env.local

# start your postgress if you have docker
yarn hasuraLocal

# apply DB in other terminal
yarn migrationLocalApply

Go to http://localhost:9696, use admin_secret_local_zzz as admin secret. You must see messages, tags and message_tag tables


Run on local database (with docker)

yarn dev

Run on remote database - heroku (without docker)

yarn devNext

start server

# start docker-compose, generator and next.js
yarn dev

FREE Deploy on Heroku and Vercel


how to use

Just fork and run:

# npm install
yarn install

# next.js site
yarn dev

# storybook site
yarn storybook

# tests
yarn test --watch

configure Auth0


always updated

I'm keeping in sync with nextjs-opinionated base template

# merge
git pull git@github.com:semantix-engagement-hub/nextjs-opinionated.git main

I'm always updating all packages here

# yarn global add npm-check-updates
ncu -u
yarn

tests everything's still works:

yarn checkAll

If everything is working, please make a pull request


based on https://github.com/elitizon/nextjs-tailwind-storybook