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
- Make sure Git and NodeJS is installed.
- Clone this repository to your local computer.
- Create
.env.local
file in root directory. - 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
-
Create a Liveblocks Account:
- If you don't have a Liveblocks account, sign up at Liveblocks.
-
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.
-
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.
-
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 inNEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY
with the copied value.
- You will find the "Public Key" under the API Keys section. Copy the public key that starts with
-
Save and Secure:
- Save the changes to the
.env.local
file.
- Save the changes to the
-
Install Project Dependencies using
npm install --legacy-peer-deps
oryarn install --legacy-peer-deps
. -
Now app is fully configured π and you can start using this app using either one of
npm run dev
oryarn dev
.
NOTE: Please make sure to keep your API keys and configuration values secure and do not expose them publicly.
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.
Useful resources and dependencies that are used in Figma Clone.
- @liveblocks/client: ^1.12.0
- @liveblocks/react: ^1.12.0
- @liveblocks/react-comments: ^1.12.0
- @radix-ui/react-context-menu: ^2.1.5
- @radix-ui/react-dropdown-menu: ^2.0.6
- @radix-ui/react-label: ^2.0.2
- @radix-ui/react-select: ^2.0.0
- @radix-ui/react-slot: ^1.0.2
- class-variance-authority: ^0.7.0
- clsx: ^2.1.1
- fabric: ^5.3.0
- jspdf: ^2.5.1
- lucide-react: ^0.379.0
- next: 14.2.3
- react: ^18
- react-dom: ^18
- tailwind-merge: ^2.3.0
- tailwindcss-animate: ^1.0.7
- uuid: ^9.0.1
- @types/fabric: ^5.3.7
- @types/node: ^20
- @types/react: ^18
- @types/react-dom: ^18
- @types/uuid: ^9.0.8
- eslint: ^8
- eslint-config-next: 14.2.3
- postcss: ^8
- tailwindcss: ^3.4.1
- typescript: ^5
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
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!
You can also give this repository a star to show more people and they can use this repository.