
Explore building a full-stack blog posting platform with secure authentication, image uploads, and CRUD APIs using Next.js 13, Prisma, MongoDB, Tailwind, and NextAuth.
This is the source code attached.
If you find any bug, you can create an issue.
Learn to create a Next.js 13 app with TypeScript and Tailwind, set up the app router, and understand project structure and basic server and client components.
Learn how Prisma connects your Next.js app to a database with a type-safe API and query builder, supporting MongoDB, MySQL, and Postgres; install it as a development dependency.
Define models for user, blog, and category in Prisma schema, map MongoDB _id to id, and configure relations with on delete cascade, then push and sync to MongoDB.
Build the rest API and add user authentication with NextAuth, an open source framework for Next.js that supports JWT and OpenID Connect with secure tokens and simple integration.
Set up next-auth in a Next.js app by installing next-auth, creating a catch-all api route, and configuring providers like GitHub and Google with client id and secret from environment variables.
Learn to configure next-auth credentials provider with email and password in a Next.js 13 SaaS blog platform, implement authorize logic, and set up login versus register endpoints.
Create a user registration route for signup via credentials in a Next.js API, connect to the database with Prisma, hash passwords with bcrypt, validate input, and return the created user.
Finish the credentials provider setup in a Next.js 13 advanced SaaS blog platform by implementing async authorize, Prisma user lookup, bcrypt password verification, and provider user handling for secure login.
Learn how to access session data in Next.js 13 client components by wrapping your app with a session provider, creating a client component, and using useSession to read user details.
Plan api design for blocks and categories with the prisma schema, implement user and category routes, and enable image uploads via form data to cloudinary.
Learn to build and test user API endpoints in a Next.js 13 SaaS app, including all users and by id routes with Prisma queries and standardized responses.
Build and test category apis in a Next.js 13 app by implementing get all categories, create category, and get category by id using Prisma and json request handling.
Set up Cloudinary for blog insertions by uploading post data and image blobs, storing images in Cloudinary, and configuring Prisma routes and environment variables for scalable blocks CRUD.
Configure Cloudinary v2 in post route, validate form data (title, user ID, category ID, location) and upload an image via Cloudinary; create a blog entry in the database with Prisma.
Build blocks CRUD for the blog posting platform in Next.js 13 by implementing get, put, delete, and search routes with Prisma, including input validation and 422 error handling.
Complete the backend of the Next.js 13 blog platform, including NextAuth, user registration, and category-based search. Then move to the front end to learn its integration with the backend.
Design and implement a sticky application header with a logo, navigation links, and a footer for a Next.js 13 blog platform, rendering auth or non-authenticated links based on user session.
Fetch and display recent blog articles from the backend in a Next.js 13 app, design article cards, and fetch six blocks with no-store cache.
Render blog posts as reusable block item cards in a Next.js saas project, using a ui card with tailwind, images, and dangerously set html content.
Limit the words displayed on blog cards by extracting text from HTML and slicing content for six cards in the Next.js 13 blog platform.
Design the footer with an explore more blogs link to the main blogs page. Center the content and ensure the explore more articles button uses hover states on mobile.
Design a responsive footer component for a blog platform, including a logo, copyright text, and social icons using React icons.
Design a blog home in a Next.js 13 app by building a blocks page with a sticky navigation, a filter dropdown, and a search bar that renders posts by category.
Preview locally selected images and publish a blog post by editing the title with a content editable h1, uploading images, and applying responsive styling for real-world use.
Learn to add dropdowns and the React Draft editor to a Next.js 13 blog platform, including image selection, title, location, and category inputs.
Implement React Hook Form to manage a blog post editor, capturing heading, image blob, location, category, and editor data with registration, validation, and a unified handle submit.
Configure next-auth callbacks to include the user id in the session via token sub, extend types with a declaration file, and verify the session shows name, email, and id.
Design and render blog post blocks in Next.js by fetching data via http requests, using server components, and building a dynamic view page with edit and view routes.
Explore building a dynamic profile page in Next.js 13, using server components, get server session, and real data for user profiles and blocks, with conditional actions for edit and delete.
Learn how to build a fully-featured SaaS blog posting application with Next.js 13, NextAuth, Prisma, MongoDB, Typescript, React, Tailwind, ShadCN UI, middlewares, API routes, passwordless sign-in, protected routes, rich text editor, and Image upload to Cloudinary.
This course is perfect for developers who want to learn how to build a modern, scalable, and secure blog posting application. We will cover all the essential concepts and technologies, including:
Next.js 13: A React framework that makes it easy to build server-rendered and static websites.
NextAuth: A headless authentication solution for Next.js applications.
Prisma: A modern ORM that makes it easy to interact with MongoDB from TypeScript.
MongoDB: A scalable and flexible NoSQL database.
Typescript: A typed programming language that helps to prevent errors.
React: A popular JavaScript library for building user interfaces.
Tailwind CSS: A utility-first CSS framework that makes it easy to style your application.
ShadCN UI: A beautiful and responsive UI library for Next.js applications.
Middlewares: Custom code that runs between the client and server.
API routes: Routes that expose your application's data to other applications.
Passwordless sign in: A secure and convenient way for users to sign in to your application.
Protected routes: Routes that can only be accessed by logged-in users.
Rich text editor: A tool that allows users to create and edit rich text content.
Image upload to Cloudinary: A service that makes it easy to upload and store images.
By the end of this course, you will have the skills and knowledge to build your own SaaS blog posting application. You will also be able to apply these skills to build other types of web applications.
What you will learn:
How to set up a Next.js 13 project with NextAuth, Prisma, MongoDB, and Typescript.
How to build a user authentication system with NextAuth.
How to interact with MongoDB from TypeScript using Prisma.
How to create a beautiful and responsive UI with Tailwind CSS and ShadCN UI.
How to add middlewares to your application to protect it from attacks.
How to expose your application's data to other applications using API routes.
How to implement passwordless sign in for your users.
How to protect routes in your application so that only logged-in users can access them.
How to use a rich text editor to create and edit rich text content.
How to upload images to Cloudinary and display them in your application.
Who this course is for:
Developers who want to learn how to build a modern, scalable, and secure blog posting application.
Developers who want to learn how to use Next.js 13, NextAuth, Prisma, MongoDB, Typescript, React, Tailwind CSS, ShadCN UI, middlewares, API routes, passwordless sign in, protected routes, rich text editor, and image upload to Cloudinary.
Developers who want to learn the latest trends in web development.