This is the repo for the course by Codemochi called End to End React with Prisma 2. We will cover all of the techniques needed to build a fully fledged app- user login, permissions, database management, backend creation. The works!
We will build an entire social RSS reader full stack application from scratch over 10 hours and learn all of the fundamentals of building a professional grade app.
Check out the master
branch to see a step by step guide for building this application from the ground up. Each step is a commit which makes it easy to tell exactly what changed from step to step.
If you just want the finished product, you can clone this repo and the mater
branch will have the finished version if you pull the latest.
If you just want to run the app, check out the latest on the master
branch and then create a .env
file in the root of your file. This .env
has changed with the latest version of nextjs-auth0 package, so I include the lower block so you can see how the variable names changed with the latest version of nextjs-auth0- you only need the top block of variables.
.env
# NEW ENVIRONMENTAL VARIABLES
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/prisma?schema=public"
AUTH0_CLIENT_ID=xxxx
AUTH0_ISSUER_BASE_URL='https://yyyy.us.auth0.com'
AUTH0_CLIENT_SECRET=zzzzz
AUTH0_SCOPE='openid profile'
AUTH0_SECRET='some-really-long-string-has-to-be-at-least-40-characters'
AUTH0_BASE_URL=http://localhost:3000
# OLD ENVIRONMENTAL VARIABLES- DO NOT USE WITH STEP 33 OR LATER
#DATABASE_URL="postgresql://postgres:postgres@localhost:5432/prisma?schema=public"
#AUTH0_CLIENTID=xxxx
#AUTH0_DOMAIN=yyyy.us.auth0.com
#AUTH0_CLIENT_SECRET=zzzzz
#AUTH0_SCOPE='openid profile'
#AUTH0_COOKIE='some-really-long-string-has-to-be-at-least-40-characters'
#BACKEND_ADDRESS=http://localhost:3000
You can get the Auth0 credentials by following the video in step 3. The database will get set up in step 2 when we configure Prisma 2.
You can start the app locally by running npm run dev
.
Create the Backend
- Create Next.js base
- Configure Prisma 2 schema
- Configure Auth0
- Add graphQL server
- Add Context and Middleware
- Add Feed queries and mutations
- Add Bundle queries and mutations
- Add Nested Author information
- Add FeedTag and BundleTag relations
- Add LikeBundle and LikeFeed Mutations
- Add Find queries
- Add Update mutations
- Add Create Saved Article operations
- Add Delete mutations
- Add queries, mutations and fragments
Create the Frontend
- Add Tailwindcss
- Add Layout and Navbar
- Add ItemList component
- Add OneListItem component
- Add Badges
- Create Items and Item Detail pages
- Start the NewEditItem component
- Add SearchItems component
- Finish create item functionality
- Add update existing item functionality
- Add delete button
- Add like button
- Create the generate article list component
- Add saved article list component
- Add one article component
- Add saved articles page
- Tidy it all up