Skip to content

Commit 16b359c

Browse files
committed
docs(readme): add contribution guide and architecture overview
1 parent aed1b65 commit 16b359c

File tree

9 files changed

+45
-5
lines changed

9 files changed

+45
-5
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,37 @@ If you'd like to contribute—whether it's improving the UI, optimizing performa
103103
104104
---
105105
106+
### 🧠 How to Contribute
107+
108+
1. **Fork the Repo** and clone it locally
109+
2. Run `pnpm install` and `pnpm dev` to start the dev server
110+
3. Check the `Issues` tab for open tasks — especially those labeled `good first issue`
111+
4. Follow the `CONTRIBUTING.md` (coming soon) for guidelines
112+
5. Submit a Pull Request — even small improvements matter!
113+
114+
💡 **Ideas for Contribution** (feel free to raise these as issues):
115+
- Add undo/redo support in standalone mode
116+
- Add support for duplicating a selected shape using **Ctrl + D** keyboard shortcut.
117+
- Fix: **Rounded corners not working for Diamond shape**
118+
When the **"rounded"** option is selected for diamond shapes, the corners remain sharp. Update the rendering logic to support rounded edges for diamonds.
119+
120+
👉 Tag your issue with `good first issue`, `help wanted`, or `enhancement` so others can discover and contribute!
121+
122+
---
123+
124+
### 📄 Architecture Overview (Differences from Cohort Project)
125+
126+
- **Next.js 15 for Fullstack**: Frontend and backend are handled together using server actions. No separate HTTP services.
127+
- **No Mandatory Auth for Canvas Use**: Users can draw without logging in. Auth is only required for collaboration.
128+
- **Server Actions Instead of REST APIs**: Room creation, joining, and user management are handled through server actions.
129+
- **Standalone Mode with Local Storage**: For solo drawing sessions, data is stored locally and never sent to a server.
130+
- **Interactive Room Collaboration Mode**: Shows participant presence, names, and avatars in real-time sync only as of now.
131+
- **End-to-End Encrypted Collaboration**: No drawn shapes or messages are stored in any database.
132+
- **Database Used Only for Auth**: All other state management is client-side or ephemeral.
133+
- **Hookified WebSocket Layer**: Abstracts the socket connection with clean React patterns.
134+
135+
---
136+
106137
## 📄 License
107138
108139
This project is licensed under a **Custom Personal Use License** — you may view and learn from the code, but **commercial use, redistribution, or claiming authorship is strictly prohibited**.

apps/collabydraw/.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
DATABASE_URL='postgresql://postgres:your_secure_password@localhost:5432/CollabyDraw'
2+
NEXTAUTH_URL="http://localhost:3000"
3+
WS_URL="ws://localhost:8080"
4+
JWT_SECRET=your_secret_here

apps/collabydraw/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ yarn-error.log*
3131
.pnpm-debug.log*
3232

3333
# env files (can opt-in for committing if needed)
34-
.env*
34+
.env
35+
.env.local
3536

3637
# vercel
3738
.vercel

apps/collabydraw/app/(auth-layout)/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { LogoSvg } from "@/components/Branding";
21
import Link from "next/link";
32

43
export default function AuthLayout({
@@ -15,7 +14,7 @@ export default function AuthLayout({
1514
<div className="h-fit min-h-screen w-full relative p-10 lg:p-12 overflow-hidden flex flex-col items-center justify-center">
1615
<div className="relative z-10">
1716
<Link href="/" className="Logo flex items-center select-none is-normal is-plain underline-none text-current">
18-
<div className=""><LogoSvg /></div>
17+
{/* <div className=""><LogoSvg /></div> */}
1918
<div className="md:flex hidden">
2019
<h1 className="brand-title CollabydrawLogo-text font-collabyfont">CollabyDraw</h1>
2120
</div>

apps/collabydraw/components/SignupWelcomeButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function SignupWelcomeButton() {
99
session?.user.id ? (
1010
<></>
1111
) : (
12-
<Link className="welcome-screen-menu-item " href="/auth/signup" target="_blank" rel="noreferrer">
12+
<Link className="welcome-screen-menu-item " href="/auth/signup">
1313
<div className="welcome-screen-menu-item__icon">
1414
<svg aria-hidden="true" focusable="false" role="img" viewBox="0 0 24 24" className="" fill="none" strokeWidth="2" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round">
1515
<g strokeWidth="1.5">

apps/collabydraw/components/auth/signup-form.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ export function SignUpForm() {
109109
</FormItem>
110110
)}
111111
/>
112-
<Button type="submit" className="!mt-[10px] w-full h-12 rounded-md text-sm font-semibold shadow-none bg-color-primary hover:bg-brand-hover active:bg-brand-active active:scale-[.98]">
112+
<Button disabled={isPending}
113+
type="submit"
114+
className="!mt-[10px] w-full h-12 rounded-md text-sm font-semibold shadow-none bg-color-primary hover:bg-brand-hover active:bg-brand-active active:scale-[.98]">
113115
Sign Up
114116
</Button>
115117
</form>

apps/ws/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
JWT_SECRET=your_secret_here

packages/db/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DATABASE_URL="postgresql://postgres:mysecratepassword@localhost:5432/postgres"

packages/db/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
# Keep environment variables out of version control
33
.env
4+
.env.local

0 commit comments

Comments
 (0)