Topview Logo
  • Create viral videos with
    GPT-4o + Ads library
    Use GPT-4o to edit video empowered by Youtube & Tiktok & Facebook ads library. Turns your links or media assets into viral videos in one click.
    Try it free
    gpt video

    ? [LIVE] Build and deploy a Graphic Design AI SAAS Platform with NextJS - Day 1 ?

    blog thumbnail

    Introduction

    Welcome to the first day of our exciting live course series, where we will explore building and deploying a Graphic Design AI SaaS platform using Next.js! I’m Kiran Dash, and I will be your guide throughout this creative and technical journey. In this session, we’ll dive into the foundational aspects of our project and set up the necessary environment for our application.

    Course Overview

    In this course, we will develop a robust graphic design platform inspired by Canva. Over the next few sessions, we will cover various technologies and frameworks including React, Next.js, Tailwind CSS, PostgreSQL, Stripe, Drizzle, Hono, Fabric.js, Vercel, and Replicate AI. We’ll build everything from a dynamic design editor to the payment processing system and deploy our platform live.

    Project Structure

    Our main project, termed Canvas Pro AI, will consist of several components, including:

    • A Homepage showcasing recommended templates and recent designs.
    • An Editor Page enabling users to create and edit their designs.
    • A Projects Page for managing design projects.
    • A Billing Page for handling payment subscriptions.
    • An Authentication Page for user sign-up and sign-in.

    We will start off by examining the project structure and setting up the development environment.

    Setting Up the Environment

    Prerequisites

    Ensure you have the latest version of Node.js installed. The current version should be around 20.11.1. You can check your version by running the command:

    node -v
    

    Creating the Next.js App

    To create our project, we will utilize Next.js with the command:

    npx create-next-app@latest canvas-pro-ai
    

    During the setup, it will prompt you to select configurations including using TypeScript, ESLint, and Tailwind CSS. Opt for these features to facilitate better coding practices and styling.

    Project Directory Structure

    After the setup, our project structure should look like this:

    canvas-pro-ai/
    ├── app/
    ├── components/
    ├── features/
    ├── pages/
    ├── public/
    ├── styles/
    └── tailwind.config.js
    
    • app/: Contains the main application pages.
    • features/: This will house the different functionalities we will implement, such as the editor logic.
    • components/: Where we will create reusable components for our UI.

    Installing Dependencies

    We will need several packages for our project. First, we install Fabric.js, a powerful library for managing objects on a canvas:

    npm install fabric@5.3.0
    

    We will also install JS Dom, as it may be necessary for handling some functionalities:

    npm install jsdom
    

    Additionally, we will use TypeScript definitions for Fabric:

    npm install @types/fabric --save-dev
    

    Implementing the Editor

    Upon installation, we will create the initial setup for our editor component. The editor will be responsible for handling all graphical interactions.

    Hooking Up the Editor

    Inside the editor folder, create a file called useEditor.tsx. This hook will manage the canvas initialization. Within it, we will establish the canvas reference and set its height and width according to the wrapper element.

    Creating the Initial Canvas

    To create a responsive canvas, we will utilize resizeObserver, allowing the canvas to resize dynamically based on the user’s browser window size. In the hook, we will implement a resize observer for this purpose.

    Enhancing User Interaction

    Finally, we will ensure that objects drawn on the canvas can be manipulated. This includes functions to create rectangles, adjust sizes, and handle user inputs.

    Key Points Covered

    1. Course Introduction and Goals: An overview of the Graphic Design AI SaaS platform we aim to build.
    2. Setup Instructions: Detailed steps for creating the Next.js application, setting up the project structure, and installing necessary dependencies.
    3. Editor Development: Initial setup for the editor, involving canvas adjustments and user interactions.

    Introduction

    • Next.js
    • Graphic Design
    • AI SaaS
    • Fabric.js
    • Responsive Canvas
    • React
    • Tailwind CSS
    • Project Structure
    • JavaScript

    Introduction

    Q: What technologies are used in this course?
    A: We will be using React, Next.js, Tailwind CSS, PostgreSQL, Stripe, Drizzle, Hono, Fabric.js, Vercel, and Replicate AI.

    Q: How long will the course take?
    A: The course will have multiple sessions, and the completion time may vary based on participant engagement and project complexity.

    Q: Can I ask questions during the session?
    A: Yes! Feel free to ask any questions in the chat during the live sessions.

    Q: Will there be recording available?
    A: Yes, all sessions will be recorded and shared for later viewing.

    Q: Are there any prerequisites for this course?
    A: A basic understanding of JavaScript and React is beneficial but not mandatory.


    Thank you for joining me on this first day of exploration into building a graphic design AI SaaS platform. I look forward to seeing you in the next session, where we will dive even deeper into developing our editor functionalities!

    One more thing

    In addition to the incredible tools mentioned above, for those looking to elevate their video creation process even further, Topview.ai stands out as a revolutionary online AI video editor.

    TopView.ai provides two powerful tools to help you make ads video in one click.

    Materials to Video: you can upload your raw footage or pictures, TopView.ai will edit video based on media you uploaded for you.

    Link to Video: you can paste an E-Commerce product link, TopView.ai will generate a video for you.

    You may also like