https://github.com/sanidhyy/figma-clone
A minimalist Figma clone using Fabric.js and Liveblocks for real-time collaboration.
https://github.com/sanidhyy/figma-clone
css drawing-app figma-clone html liveblock liveblocks next nextjs react reactjs shadcn-ui tailwindcss typescript
Last synced: 12 months ago
JSON representation
A minimalist Figma clone using Fabric.js and Liveblocks for real-time collaboration.
- Host: GitHub
- URL: https://github.com/sanidhyy/figma-clone
- Owner: sanidhyy
- License: mit
- Created: 2024-05-25T14:01:40.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-01T14:13:37.000Z (12 months ago)
- Last Synced: 2025-07-01T14:30:36.687Z (12 months ago)
- Topics: css, drawing-app, figma-clone, html, liveblock, liveblocks, next, nextjs, react, reactjs, shadcn-ui, tailwindcss, typescript
- Language: TypeScript
- Homepage: https://clone-figmaa.netlify.app
- Size: 1.47 MB
- Stars: 23
- Watchers: 1
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# A minimalist Figma clone using Fabric.js and Liveblocks for real-time collaboration.

[](https://github.com/sanidhyy "Ask Me Anything!")
[](https://github.com/sanidhyy/figma-clone/blob/main/LICENSE "GitHub license")
[](https://github.com/sanidhyy/figma-clone/commits/main "Maintenance")
[](https://github.com/sanidhyy/figma-clone/branches "GitHub branches")
[](https://github.com/sanidhyy/figma-clone/commits "Github commits")
[](https://github.com/sanidhyy/figma-clone/issues "GitHub issues")
[](https://github.com/sanidhyy/figma-clone/pulls "GitHub pull requests")
[](https://clone-figmaa.netlify.app/ "Netlify Status")
# :notebook_with_decorative_cover: Table of Contents
- [Folder Structure](#bangbang-folder-structure)
- [Getting Started](#toolbox-getting-started)
- [Screenshots](#camera-screenshots)
- [Tech Stack](#gear-tech-stack)
- [Stats](#wrench-stats)
- [Contribute](#raised_hands-contribute)
- [Acknowledgements](#gem-acknowledgements)
- [Buy Me a Coffee](#coffee-buy-me-a-coffee)
- [Follow Me](#rocket-follow-me)
- [Learn More](#books-learn-more)
- [Deploy on Netlify](#page_with_curl-deploy-on-netlify)
- [Give A Star](#star-give-a-star)
- [Star History](#star2-star-history)
- [Give A Star](#star-give-a-star)
## :bangbang: Folder Structure
Here is the folder structure of this app.
```bash
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
```
## :toolbox: 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
# .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](https://liveblocks.io/).
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.
## :camera: Screenshots



## :gear: Tech Stack
[](https://react.dev/ "React JS") [](https://nextjs.org/ "Next JS") [](https://www.typescriptlang.org/ "Typescript") [](https://tailwindcss.com/ "Tailwind CSS") [](https://netlify.app/ "Netlify")
## :wrench: Stats
[](https://pagespeed.web.dev/analysis?url=https://clone-figmaa.netlify.app/ "Stats for Figma Clone")
## :raised_hands: 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.
## :gem: Acknowledgements
Useful resources and dependencies that are used in Figma Clone.
- [@liveblocks/client](https://www.npmjs.com/package/@liveblocks/client): ^1.12.0
- [@liveblocks/react](https://www.npmjs.com/package/@liveblocks/react): ^1.12.0
- [@liveblocks/react-comments](https://www.npmjs.com/package/@liveblocks/react-comments): ^1.12.0
- [@radix-ui/react-context-menu](https://www.npmjs.com/package/@radix-ui/react-context-menu): ^2.1.5
- [@radix-ui/react-dropdown-menu](https://www.npmjs.com/package/@radix-ui/react-dropdown-menu): ^2.0.6
- [@radix-ui/react-label](https://www.npmjs.com/package/@radix-ui/react-label): ^2.0.2
- [@radix-ui/react-select](https://www.npmjs.com/package/@radix-ui/react-select): ^2.0.0
- [@radix-ui/react-slot](https://www.npmjs.com/package/@radix-ui/react-slot): ^1.0.2
- [class-variance-authority](https://www.npmjs.com/package/class-variance-authority): ^0.7.0
- [clsx](https://www.npmjs.com/package/clsx): ^2.1.1
- [fabric](https://www.npmjs.com/package/fabric): ^5.3.0
- [jspdf](https://www.npmjs.com/package/jspdf): ^2.5.1
- [lucide-react](https://www.npmjs.com/package/lucide-react): ^0.379.0
- [next](https://www.npmjs.com/package/next): 14.2.3
- [react](https://www.npmjs.com/package/react): ^18
- [react-dom](https://www.npmjs.com/package/react-dom): ^18
- [tailwind-merge](https://www.npmjs.com/package/tailwind-merge): ^2.3.0
- [tailwindcss-animate](https://www.npmjs.com/package/tailwindcss-animate): ^1.0.7
- [uuid](https://www.npmjs.com/package/uuid): ^9.0.1
- [@types/fabric](https://www.npmjs.com/package/@types/fabric): ^5.3.7
- [@types/node](https://www.npmjs.com/package/@types/node): ^20
- [@types/react](https://www.npmjs.com/package/@types/react): ^18
- [@types/react-dom](https://www.npmjs.com/package/@types/react-dom): ^18
- [@types/uuid](https://www.npmjs.com/package/@types/uuid): ^9.0.8
- [eslint](https://www.npmjs.com/package/eslint): ^8
- [eslint-config-next](https://www.npmjs.com/package/eslint-config-next): 14.2.3
- [postcss](https://www.npmjs.com/package/postcss): ^8
- [tailwindcss](https://www.npmjs.com/package/tailwindcss): ^3.4.1
- [typescript](https://www.npmjs.com/package/typescript): ^5
## :coffee: Buy Me a Coffee
[
](https://www.buymeacoffee.com/sanidhy "Buy me a Coffee")
## :rocket: Follow Me
[](https://github.com/sanidhyy "Follow Me")
[](https://twitter.com/intent/tweet?text=Check+out+this+amazing+app:&url=https%3A%2F%2Fgithub.com%2Fsanidhyy%2Ffigma-clone "Tweet about this project")
[](https://www.youtube.com/@OPGAMER./?sub_confirmation=1 "Subscribe to my YouTube Channel")
## :books: Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## :page_with_curl: Deploy on Netlify
The simplest way to deploy your React.js app is to use the [Netlify Platform](https://app.netlify.com/start) - a powerful platform for modern web projects.
Explore the [Netlify deployment documentation](https://docs.netlify.com/site-deploys/create-deploys) 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](https://community.netlify.com)!
## :star: Give A Star
You can also give this repository a star to show more people and they can use this repository.
## :star2: Star History
