Coder Social home page Coder Social logo

sanidhyy / figma-clone Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 1.15 MB

A minimalist Figma clone using Fabric.js and Liveblocks for real-time collaboration.

Home Page: https://clone-figmaa.netlify.app

License: MIT License

TypeScript 97.10% CSS 2.40% JavaScript 0.50%
css drawing-app figma-clone html liveblock liveblocks next nextjs react reactjs

figma-clone's Introduction

A minimalist Figma clone using Fabric.js and Liveblocks for real-time collaboration.

A minimalist Figma clone using Fabric.js and Liveblocks for real-time collaboration.

Ask Me Anything! GitHub license Maintenance GitHub branches Github commits GitHub issues GitHub pull requests Netlify Status

๐Ÿ“” Table of Contents

โ€ผ๏ธ Folder Structure

Here is the folder structure of this app.

figma-clone/
  |- app/
    |-- app.tsx
    |-- apple-icon.png
    |-- favicon.ico
    |-- globals.css
    |-- icon1.png
    |-- icon2.png
    |-- layout.tsx
    |-- page.tsx
    |-- room.tsx
  |- components/
    |-- comments/
    |-- cursor/
    |-- reaction/
    |-- settings/
    |-- ui/
    |-- users/
    |-- left-sidebar.tsx
    |-- live.tsx
    |-- loader.tsx
    |-- navbar.tsx
    |-- right-sidebar.tsx
    |-- shapes-menu.tsx
  |- config/
    |-- index.ts
  |- constants/
    |-- index.ts
  |- hooks/
    |-- use-interval.ts
  |- lib/
    |-- canvas.ts
    |-- key-events.ts
    |-- shapes.ts
    |-- use-max-zindex.ts
    |-- utils.ts
  |- public/
  |- scripts/
    |-- prod.ts
    |-- reset.ts
    |-- seed.ts
  |- store/
    |-- use-exit-modal.ts
    |-- use-hearts-modal.ts
    |-- use-practice-modal.ts
  |- types/
    |-- declaration.d.ts
    |-- type.ts
  |- .env.local
  |- .env.example
  |- .eslintrc.js
  |- .gitignore
  |- .prettierrc.json
  |- components.json
  |- environment.d.ts
  |- liveblocks.config.ts
  |- next.config.mjs
  |- package-lock.json
  |- package.json
  |- postcss.config.js
  |- tailwind.config.ts
  |- tsconfig.json

๐Ÿงฐ Getting Started

  1. Make sure Git and NodeJS is installed.
  2. Clone this repository to your local computer.
  3. Create .env.local file in root directory.
  4. Contents of .env.local:
# .env.local

# disable next.js telemetry
NEXT_TELEMETRY_DISABLED=1

# liveblocks api key
NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY=pk_dev_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

5. Set Up Liveblocks

  1. Create a Liveblocks Account:

    • If you don't have a Liveblocks account, sign up at Liveblocks.
  2. Create a New Project:

    • After logging in, navigate to the Liveblocks dashboard.
    • Click on "Create Project" to set up a new project for Figma-Clone.
    • Provide a name for your project and create it.

6. Obtain the Liveblocks Public Key

  1. Navigate to the Project Settings:

    • In your Liveblocks dashboard, select the project you created for Figma-Clone.
    • Go to the "Settings" or "API Keys" section.
  2. Copy the Public Key:

    • You will find the "Public Key" under the API Keys section. Copy the public key that starts with pk_dev_ and replace placeholder value in NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY with the copied value.
  3. Save and Secure:

    • Save the changes to the .env.local file.
  4. Install Project Dependencies using npm install --legacy-peer-deps or yarn install --legacy-peer-deps.

  5. Now app is fully configured ๐Ÿ‘ and you can start using this app using either one of npm run dev or yarn dev.

NOTE: Please make sure to keep your API keys and configuration values secure and do not expose them publicly.

๐Ÿ“ท Screenshots

Modern UI/UX

Right Click Context Menu

Fully functional Drawing Board

โš™๏ธ Tech Stack

React JS Next JS Typescript Tailwind CSS Netlify

๐Ÿ”ง Stats

Stats for Figma Clone

๐Ÿ™Œ Contribute

You might encounter some bugs while using this app. You are more than welcome to contribute. Just submit changes via pull request and I will review them before merging. Make sure you follow community guidelines.

๐Ÿ’Ž Acknowledgements

Useful resources and dependencies that are used in Figma Clone.

โ˜• Buy Me a Coffee

๐Ÿš€ Follow Me

Follow Me Tweet about this project Subscribe to my YouTube Channel

๐Ÿ“š Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

๐Ÿ“ƒ Deploy on Netlify

The simplest way to deploy your React.js app is to use the Netlify Platform - a powerful platform for modern web projects.

Explore the Netlify deployment documentation for step-by-step instructions on deploying your React.js app on Netlify.

Happy coding, and feel free to share your thoughts and improvements with the Netlify community!

โญ Give A Star

You can also give this repository a star to show more people and they can use this repository.

๐ŸŒŸ Star History

Star History Chart

(back to top)

figma-clone's People

Contributors

dependabot[bot] avatar sanidhyy avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.