Project for playing with blitz & redux & other useful tools
Start the dev server :
npm run dev
- UI : material ui - material ui icons
- State management : redux - redux toolkit
- Deployment
- Deployment on Heroku: increase boot timeout, put on max (because take more than 60sec to generate files) here https://tools.heroku.support/limits/boot_timeout
- Blitz / Next.js
- https://blitzjs.com/
- https://nextjs.org/
- Always use option
refetchOnWindowFocus: true
when useQuery is used - double render page in dev mode when getServerSideProps used (it's ok in prod)
- don't forget to use
as
on<Link>
if use dynamic routing, if not it's trigger an error 404
- Redux
- https://redux.js.org
- https://redux-toolkit.js.org
- Select from global state :
const extractedState = useSelector(fnSelectFromSlice)
- Dispatch action :
const dispatch = useDispatch(); dispatch(fnAction())
- Prisma
-
Auth by Blitz (currently in pre-release)
-
User can not fetch more than N entities defined in the backend
- function checker
- function checker when
take
argument it's used with include - each queries can have a custom N max entities
- test with middleware (prisma >=2.3 in next release of blitz) for global check
-
User can not fetch attributs not public (via postman)
-
User can not fetch too much deep relationship
-
Admin
-
Blog
-
React Player living on every public front page-
test switch pages
-
-
Artist page
- access via artist/[id]/[slugArtist]
- HTTP 301 redirect any inbound display url that matches ID but doesn't match the text to the correct text.
- design: default cover , name...