Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a2b2f0a
[LibP2P] First steps
Dec 17, 2025
b62f375
Submodule git fix
Dec 17, 2025
431edaa
fixed .gitignore and removed node_modules
Dec 17, 2025
8f6f2aa
libp2p baseline alignment
Yuliia05 Dec 17, 2025
1010939
browser2browser WebRTC + signaling server
Yuliia05 Dec 17, 2025
9e0ee34
React lifecycle + status UI
Dec 17, 2025
62e3ca9
Message envelope + dedupe + event types
Dec 17, 2025
85a600a
whiteboard event sync (upsert/delete/clear) & unique IDs & no rebroad…
Dec 17, 2025
c3e5ef6
late-join snapshot sync (request/response)
Dec 17, 2025
ee23652
debug UX + manual resync
Dec 17, 2025
415c769
Add shared formatting configs (EditorConfig/Prettier) + ESLint rc files
Dec 17, 2025
437689a
style: apply `npx prettier --write .`
MAKMED1337 Dec 17, 2025
322b269
Fix webrtc-star runtime compat (multiaddr polyfills, publish error ha…
Dec 18, 2025
1acc60b
Fix Jest tests for P2P/Canvas environment
Dec 18, 2025
f914027
Use @libp2p/webrtc, circuit-relay-v2, websockets
Dec 18, 2025
df0d608
switched libp2p-gossipsub -> libp2p/floodsub, several other fixes
Dec 18, 2025
8af36d6
feat: make host reuse the same peer id across restarts
MAKMED1337 Dec 18, 2025
fe5dc6c
feat: add PKGBUILD
MAKMED1337 Jan 15, 2026
07784bf
fix: host PKGBUILD binary and add maintainers
MAKMED1337 Jan 15, 2026
123ebfd
feat: replace env vars with localStorage config + settings button for…
Jan 21, 2026
94d8d33
fix(p2p): handle prompt() errors and remove auto-prompt on load
Jan 21, 2026
ecbff05
fix(p2p): prevent message feedback loop with content-based comparison
Jan 21, 2026
f7d841d
fix(p2p): prevent local strokes from being discarded by P2P updates
Jan 21, 2026
4dd0a9f
fix(p2p): validate historyStep bounds and add debug logging
Jan 21, 2026
3a1c5ea
fix: preserve localStorage data on refresh and fix save condition
Jan 22, 2026
fc73e86
chore: remove debug logging
Jan 22, 2026
0df7915
feat: add systemctl service file
MAKMED1337 Jan 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false


7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
node_modules/
/.pnp
.pnp.js

Expand All @@ -13,6 +13,7 @@

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
Expand All @@ -21,3 +22,7 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
changes.txt
.cursor/
temp-gossipsub/
temp-libp2p/
28 changes: 28 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
**/node_modules/**
**/build/**
**/coverage/**
**/.cache/**
**/dist/**
**/.next/**
**/.turbo/**

# Lockfiles (avoid noisy diffs)
**/package-lock.json
**/yarn.lock
**/pnpm-lock.yaml

# Assets
**/public/**
**/*.svg
**/*.png
**/*.jpg
**/*.jpeg
**/*.gif
**/*.ico
**/*.webp

# Local/CI tooling
.cursor/**
changes.txt


11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf"
}
2 changes: 2 additions & 0 deletions TeachBound-client/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REACT_APP_P2P_HOST=/dns/jamboard.shitpost.monster/tcp/500/wss/p2p/12D3KooWBhg2PnQpvVxANn8Nq2f4YDjBdfsrUXZDfdXMJtxBQ9cP

4 changes: 4 additions & 0 deletions TeachBound-client/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"root": true,
"extends": ["react-app", "react-app/jest"]
}
24 changes: 24 additions & 0 deletions TeachBound-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
31 changes: 31 additions & 0 deletions TeachBound-client/PKG/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Maintainers: Andrii Stolitnii <andrii.stolitnii@student.uj.edu.pl>, Eduard Tykhoniuk <eduard.tykhoniuk@student.uj.edu.pl>, Yuliia Tatarinova <yuliia.tatarinova@student.uj.edu.pl>
pkgname=('TeachBound-client')
pkgver=0.2.0
pkgrel=1
pkgdesc="Digital Whiteboard for Education and Collaboration"
arch=(any)
url="https://github.com/welleyth/TeachBound"
license=('CC BY-NC 4.0')
depends=('nodejs' 'python')
makedepends=('npm')
source=("TeachBound::git+https://github.com/welleyth/TeachBound.git#branch=add-libp2p"
"binary.sh" "teachbound-client.service")
sha256sums=('SKIP' 'SKIP' 'SKIP')
options=('!strip')

build() {
cd "$srcdir/TeachBound/TeachBound-client"
npm ci
npm run build
}

package() {
install -Dm755 "binary.sh" "$pkgdir/usr/bin/teachbound-client"
install -Dm644 "teachbound-client.service" \
"$pkgdir/usr/lib/systemd/user/teachbound-client.service"

cd "$srcdir/TeachBound/TeachBound-client"
install -d "$pkgdir/usr/share/teachbound-client"
cp -r build "$pkgdir/usr/share/teachbound-client/"
}

3 changes: 3 additions & 0 deletions TeachBound-client/PKG/binary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cd /usr/share/teachbound-client || exit 1
exec python3 -m http.server 8080 --directory build
12 changes: 12 additions & 0 deletions TeachBound-client/PKG/teachbound-client.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Teachbound Client
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/teachbound-client
Restart=on-failure

[Install]
WantedBy=multi-user.target

101 changes: 69 additions & 32 deletions README.md → TeachBound-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Teach Bound aims to provide a simple, yet powerful, digital canvas for educators
Experience Teach Bound directly in your browser:
**[https://teachbound.com](https://teachbound.com)**
![Teach Bound screenshot](https://github.com/user-attachments/assets/ab02e556-158b-42f1-8885-7124cea6dfa6)

---

## Overview
Expand All @@ -19,71 +20,105 @@ Teach Bound is an open-source digital whiteboard application built with JavaScri

## Key Features

* **Versatile Drawing Tools:**
* **Pen:** Smooth freehand drawing with selectable colors and line widths
* **Eraser:** Easily clear pen strokes
* **Selection Tool:** Select, move, and manage multiple elements

* **Rich Content Creation:**
* **Sticky Notes:** Add, edit, and move digital sticky notes
* **Text Tool:** Insert formatted text directly onto the canvas
* **Shapes:** Draw rectangles, circles, lines, and arrows to structure information

* **Element Management:**
* **Selection Tool:** Select, move, and manage elements on the board
* **Delete Selected:** Remove selected elements from the canvas
* **Undo/Redo:** Navigate through your action history

* **Export & Share:**
* **Download as PNG:** Save your work as high-quality images (1x, 2x, 3x resolution)
* **Download as PDF:** Export your whiteboard for printing or sharing

* **Professional Interface:**
* **Responsive Design:** Adapts to various screen sizes for a seamless experience
* **Customizable Toolbar:** Choose between icons only, icons with text, or text only display
* **Clear Frame:** Instantly reset the canvas
- **Versatile Drawing Tools:**
- **Pen:** Smooth freehand drawing with selectable colors and line widths
- **Eraser:** Easily clear pen strokes
- **Selection Tool:** Select, move, and manage multiple elements
- **Rich Content Creation:**
- **Sticky Notes:** Add, edit, and move digital sticky notes
- **Text Tool:** Insert formatted text directly onto the canvas
- **Shapes:** Draw rectangles, circles, lines, and arrows to structure information
- **Element Management:**
- **Selection Tool:** Select, move, and manage elements on the board
- **Delete Selected:** Remove selected elements from the canvas
- **Undo/Redo:** Navigate through your action history
- **Export & Share:**
- **Download as PNG:** Save your work as high-quality images (1x, 2x, 3x resolution)
- **Download as PDF:** Export your whiteboard for printing or sharing
- **Professional Interface:**
- **Responsive Design:** Adapts to various screen sizes for a seamless experience
- **Customizable Toolbar:** Choose between icons only, icons with text, or text only display
- **Clear Frame:** Instantly reset the canvas

## Tech Stack

* **Frontend Framework:** React.js
* **Styling:** Custom CSS with responsive design
* **Icons:** Lucide React
* **Font:** Open Sans
* **Hosting:** Vercel
* **Development:** Built using vibe coding techniques with Claude and Gemini AI assistants
- **Frontend Framework:** React.js
- **Styling:** Custom CSS with responsive design
- **Icons:** Lucide React
- **Font:** Open Sans
- **Hosting:** Vercel
- **Development:** Built using vibe coding techniques with Claude and Gemini AI assistants

## Getting Started

### Use Online

1. Visit [https://teachbound.com](https://teachbound.com)
2. Select your desired tool from the toolbar
3. Click and drag on the canvas to create!
4. Use options for colors, line width, and font size to customize

### Run Locally

1. Clone the repository:

```bash
git clone https://github.com/sai-educ/TeachBound.git
cd TeachBound
```

2. Install dependencies:
2. Install dependencies (client):

```bash
cd TeachBound-client
npm install
```

3. Start the development server:
3. (Optional) Start the P2P relay/bootstrap node (default port 9090):

```bash
cd ../TeachBound-host
npm install
npm start
```

The host will print its peer ID and multiaddr, e.g.:
```
[TeachBound-host] Peer ID: 12D3KooW...
[TeachBound-host] For client .env:
REACT_APP_P2P_RELAY_ADDR=/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooW...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This env has a different name

```

4. (Optional) Enable P2P collaboration in the client:
- Create `TeachBound-client/.env` (this file is intentionally ignored by git)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is not ignored?

- Add:

```bash
# Copy the multiaddr from the host output (includes the peer ID)
REACT_APP_P2P_SIGNALING_ADDR=/ip4/127.0.0.1/tcp/9090/ws/p2p/<HOST_PEER_ID>

# Optional: room id (maps to pubsub topic `teachbound/<room>`)
REACT_APP_P2P_ROOM=demo
```

- Restart the client after changing `.env`
- Open the app in multiple browser tabs to test P2P sync

5. Start the client development server:

```bash
cd ../TeachBound-client
npm start
```

4. Open [http://localhost:3000](http://localhost:3000) in your browser
6. Open [http://localhost:3000](http://localhost:3000) in your browser

## Contribution

We believe in the power of open-source and warmly welcome contributions! Whether it's a bug report, feature suggestion, or a pull request, your input is valuable.

### How to Contribute

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
Expand All @@ -101,6 +136,7 @@ Created for educators, by an educator who understands the needs of modern teachi
Teach Bound is licensed under the **Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)**.

This means:

- ✅ You can use, share, and adapt the software for non-commercial purposes
- ✅ You must give appropriate credit
- ❌ Commercial use is not permitted without permission
Expand All @@ -110,6 +146,7 @@ This means:
## Support

For questions, suggestions, or support:

- Open an issue on [GitHub](https://github.com/sai-educ/TeachBound/issues)
- Visit our website: [https://teachbound.com](https://teachbound.com)

Expand Down
Loading