Skip to content

Commit 4505f16

Browse files
committed
docs: add doc for solana integration
1 parent f39b0e9 commit 4505f16

File tree

2 files changed

+92
-6
lines changed

2 files changed

+92
-6
lines changed

apps/collabydraw/components/canvas/CanvasBoard.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,21 @@ export default function CanvasBoard() {
267267
setCanvasEngineState(prev => ({ ...prev, sidebarOpen: !prev.sidebarOpen }));
268268
}, []);
269269

270+
const handleScaleUpdate = useCallback((newScale: number | ((prev: number) => number)) => {
271+
setCanvasEngineState(prev => {
272+
const finalScale = typeof newScale === 'function' ? newScale(prev.scale) : newScale;
273+
274+
if (prev.engine) {
275+
prev.engine.setScale(finalScale); // 🔥 this handles panX, panY, canvas.clear
276+
}
277+
278+
return {
279+
...prev,
280+
scale: finalScale
281+
};
282+
});
283+
}, []);
284+
270285
if (isLoading) {
271286
return <ScreenLoading />
272287
}
@@ -375,12 +390,7 @@ export default function CanvasBoard() {
375390
{matches && (
376391
<ZoomControl
377392
scale={canvasEngineState.scale}
378-
setScale={(newScale: SetStateAction<number>) =>
379-
setCanvasEngineState(prev => ({
380-
...prev,
381-
scale: typeof newScale === 'function' ? newScale(prev.scale) : newScale
382-
}))
383-
}
393+
setScale={handleScaleUpdate}
384394
/>
385395
)}
386396

docks/Solana.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
### 🖌️ CollabyDraw: Collaborative Canvas Meets Solana
2+
3+
---
4+
5+
#### 🚀 Project Summary
6+
**CollabyDraw** is a real-time collaborative drawing app where users co-create visual art in shared rooms. We're integrating Solana to let users **mint their collaborative artwork as NFTs**, making it possible to **own, preserve, and showcase creative moments on-chain**.
7+
8+
This bridges the gap between creative collaboration and decentralized ownership using the power of Solana NFTs.
9+
10+
---
11+
12+
#### 🧠 Problem Statement
13+
Digital creativity is often trapped inside centralized tools. Collaborative art sessions are temporary, with no on-chain permanence, attribution, or ownership. There’s a clear need for **authentic, co-owned, and immutable records of digital creativity**.
14+
15+
---
16+
17+
#### 🌐 Solution Overview
18+
By integrating Solana, CollabyDraw enables:
19+
20+
- 🔐 **Phantom Wallet Login** for creator authentication
21+
- 🖼️ **One-click NFT Minting** of exported drawings
22+
- 📜 **On-chain Metadata** including title, description & contributor addresses
23+
- 🗃️ **Decentralized Storage** via Arweave/IPFS
24+
- 🎨 A smooth UX blending creativity and blockchain ownership
25+
26+
---
27+
28+
#### 🧩 Feature Checklist
29+
30+
| Feature | Status |
31+
|----------------------------|-------------|
32+
| Real-time drawing | ✅ Complete |
33+
| Room-based collaboration | ✅ Complete |
34+
| Wallet integration (Phantom) | 🛠️ In Progress |
35+
| NFT minting via Metaplex | 🛠️ Planned |
36+
| Arweave upload (via Bundlr) | 🛠️ Planned |
37+
| Contributor attribution | 🛠️ Optional Bonus |
38+
39+
---
40+
41+
#### ⚒️ Tech Stack
42+
43+
- **Framework**: Next.js 15 (App Router + Server Actions)
44+
- **Real-time Sync**: Custom WebSocket engine
45+
- **Solana SDKs**: `@solana/web3.js`, `@solana/wallet-adapter`, `@metaplex-foundation/js`
46+
- **Storage**: Arweave via Bundlr (optional IPFS fallback)
47+
48+
---
49+
50+
#### 💡 Why This Matters for Solana
51+
52+
- 🔥 Introduces **real-time co-creation** to the NFT space
53+
- 👥 Promotes **multi-user attribution** and collaborative minting
54+
- 🧠 Merges intuitive UX with blockchain utility
55+
- 🛠️ Potential to evolve into a **collaborative minting platform or art DAO**
56+
57+
---
58+
59+
#### 📦 Grant Request
60+
Looking for support to:
61+
62+
- Finalize **wallet auth** and **minting flow**
63+
- Set up **Arweave storage**
64+
- Design a clean **UX for co-creation + minting**
65+
- Cover infrastructure, asset hosting, and dev time
66+
67+
---
68+
69+
#### 🔗 Links
70+
- GitHub: [Coming Soon]
71+
- Demo: [Coming Soon]
72+
- Twitter: [@omcodes_](https://twitter.com/omcodes_)
73+
74+
---
75+
76+
### ✨ Built by Om Sharma

0 commit comments

Comments
 (0)