Skip to content

RealWorld (Conduit) implementation with NextJS using Incremental Static Regeneration (ISR)

License

Notifications You must be signed in to change notification settings

fanatic007/realworld_mongodb-prisma-isr

 
 

Repository files navigation

NextJS codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API. This implementation uses Incremental Static Generaration (ISR) for Articles.

This codebase is created to demonstrate a simple blogging app including CRUD operations, authentication, static site generation routing, pagination, and more using Incremental Static Regenation (ISR) kind of data fetching in NextJS and PRISMA.

For more information on how to this works with other frontends/backends, head over to the RealWorld repo.

How it works

Architecture | Stack

  • Database : MongoDB
  • ORM : PRISMA
  • Backend : NextJS API pages
  • Front : NextJS (React) pages

The pages (e.g. /home with params) are generated at build time based on expected props using getStaticPaths but also regenerated after configured time using getStaticProps and its revalidate configuration property.

Getting started

  • npm install
  • npm run dev (Dev server for demo and APIs required for build)
  • npm run build (Prod build generates pages from getStaticPaths )
  • npm run start (Starts a server from above build) Pages can be seen statically generated and in case changes are made to data, pages would only be updated after specified time using revalidate

About

RealWorld (Conduit) implementation with NextJS using Incremental Static Regeneration (ISR)

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.5%
  • JavaScript 1.3%
  • CSS 0.2%