All Projects → cjquines → qboard

cjquines / qboard

Licence: MIT license
The efficient digital whiteboard.

Programming Languages

typescript
32286 projects
SCSS
7915 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to qboard

flat
Project flat is the Web, Windows and macOS client of Agora Flat open source classroom.
Stars: ✭ 4,251 (+5644.59%)
Mutual labels:  whiteboard
WisdomEducation
智慧云课堂是网易云信提供的在线互动课堂场景解决方案,基于在线教育场景提供多种课堂模式实践。专为线上课堂场景打造,覆盖多种班型的教学场景、全终端的接入能力,支持课程录制、白板互动、课程活跃度分析等远程课堂功能。在实现云课堂实时互动功能的基础上,还支持业务功能的灵活扩展,帮助您快速上线专属互动教学平台。
Stars: ✭ 23 (-68.92%)
Mutual labels:  whiteboard
room.cafe
An extremely simple video meeting, integrated whiteboard, chat and screen sharing
Stars: ✭ 34 (-54.05%)
Mutual labels:  whiteboard
ng-whiteboard
angular whiteboard component
Stars: ✭ 28 (-62.16%)
Mutual labels:  whiteboard
mirotalk
🚀 WebRTC - P2P - Simple, Secure, Fast Real-Time Video Conferences Up to 4k and 60fps, compatible with all browsers and platforms.
Stars: ✭ 1,593 (+2052.7%)
Mutual labels:  whiteboard
tableaunoir
An online blackboard 🖉 with fridge magnets 🌈🧲 for teaching, and making animations 🏃 and presentations ⎚.
Stars: ✭ 149 (+101.35%)
Mutual labels:  whiteboard
vindigo
📝 A brand new kanban inspired planning tool for all your projects. 💻
Stars: ✭ 52 (-29.73%)
Mutual labels:  whiteboard
Hiring Without Whiteboards
⭐️ Companies that don't have a broken hiring process
Stars: ✭ 25,494 (+34351.35%)
Mutual labels:  whiteboard
Excalidraw
Virtual whiteboard for sketching hand-drawn like diagrams
Stars: ✭ 25,509 (+34371.62%)
Mutual labels:  whiteboard
js-data-structures-and-algorithms
JavaScript implementations of common data structure and algorithm concepts.
Stars: ✭ 31 (-58.11%)
Mutual labels:  whiteboard
SyncPaint
A web app for synchronized group drawing. Draw together with other people in real time.
Stars: ✭ 42 (-43.24%)
Mutual labels:  whiteboard
rainbow-board
22nd Century Whiteboard App for Linux, Windows and Mac.
Stars: ✭ 57 (-22.97%)
Mutual labels:  whiteboard
Nibriboard
🖼 An infinite whiteboard for those big ideas. Currently unstable and in alpha.
Stars: ✭ 15 (-79.73%)
Mutual labels:  whiteboard
core
Renderer for tldraw and maybe you, too.
Stars: ✭ 418 (+464.86%)
Mutual labels:  whiteboard
meeting
https://github.com/GrowthEase/NetEase_Meeting
Stars: ✭ 38 (-48.65%)
Mutual labels:  whiteboard

qboard

Lint workflow status ShiftLeft Scan workflow status

The efficient digital whiteboard.

qboard is a wholly client-side whiteboard app with efficient keyboard shortcuts, to make drawing feel as seamless as possible. In the spirit of Vim, it's possible to do everything that isn't drawing without moving your hands. It's hosted on my website. Here's a demo video.

Features

Here are the default keybindings:

Image showing default key bindings

Tab cycles through three toolbar visibilities: the full toolbar, a status pane, and completely hidden. Shift snaps lines to multiples of 45°, and makes squares and circles.

X is Cut when there's something selected, and Eraser when nothing is selected. The Eraser is element level: it removes entire paths. You can use X to delete whatever you have selected. E or R, when already that color, resets it to black.

There are also keybindings with Shift and Ctrl, which you can view in-app. Other neat things you can do:

  • Hit the export button to save to a PDF. The save button exports to a JSON file, which you can later load back in to qboard.
  • Use your browser's paste function (usually Ctrl+V or Cmd+V on Mac) to paste images from the system clipboard. You can also drag images onto the board, or use the file picker on the left side of the screen (labeled Open).
  • Open your saved JSON files with the file picker to replace your current board with one from a file. Alternatively, drag and drop your saved JSON files; instead of overwriting your current board, this will insert the contents of the files into the board after the current page!
  • Right-click to bring up a context menu to change the style.
  • If you have a saved JSON file accessible via a URL, you can make a link that preloads the board with that file, like this one: https://cjquines.com/qboard/?json=example.json.

Design principles

qboard is made for seamless lecturing. It's designed to be easy to use and nice to look at while sharing your screen. It should also be easy to share what you've written afterward as a PDF. This guides some of its principles:

  • It should be possible to do everything that isn't drawing just with keys. Ideally, only with the keys on one half of the keyboard, to make presentations flow smoothly. You shouldn't need to move your mouse all the way to the left to change tools, or to move your hand to the right to switch to the pen tool.
  • It has pages, rather than extending in different directions. It should feel like writing on multiple blackboards, and not an infinite sheet of paper.
    • We are considering changing this to allow an infinite scroll mode (see #6).
  • Pages are fixed at a 16:9 ratio, so when that, in full-screen mode, most screens are perfectly filled by qboard. Additionally, when pages are later exported to a PDF, they have the same dimensions as a slideshow.

There are some sense to the default keybindings:

  • The three keys I use the most are on F, D, and S. A is assigned to make sense with S, and Shift + F to make sense with F.
  • I tend to switch between colors and back while presenting, hence the E and R bindings.
  • Imitating vim, X is like delete, which both cuts and erases.
  • Ellipse and Rectangle start with E and R, while V is Move in Photoshop too.
  • Q, A, and Z control stroke style, and W, S, and X control fill style. They form a column, going from "least" to "most".
  • The Ctrl keybindings are pretty universal, except maybe D, for Duplicate.

Although initially designed for giving lectures, the whiteboard controls are pretty good.

Frequently asked questions

My saved file won't open. Help!

There was a short period of time when we used a different file format for our JSON files. It's very unlikely that you have such a file. In case you do, you can make it compatible with the modern qboard app by taking the file and wrapping the contents like so:

{
  "qboard-version": 1,
  "pages": OLD_FILE_CONTENTS_GO_HERE
}

If we have released a new file version beyond version 1, just opening any old files and saving them again will update them to the latest version.

Implementation details

It's build on the nwb toolkit, which handles React, Webpack, and Babel. We're using Typescript. The main app is mostly powered through Fabric.js, with KeyboardJS handling keybindings, and pdfmake handling exporting to PDF.

We extend the Fabric canvas to a Page class with some convenience functions. The Pages class stores pages in a JSON array; whenever we switch pages, we remove all the objects in the canvas and reload from memory. In other words, we only store the live objects for the current page; all other pages are stored serialized. Boards are serialized to JSON just by collecting the serialized array, and adding a small amount of metadata to ensure compatibility. A saved qboard file is thus entirely human-readable, though since it also stores paths, it may be unwieldy.

We also work with two canvas elements. The top canvas is a temporary one that renders lines, ellipses, and rectangles as they're being drawn, and after they're drawn, they're removed and added to the base canvas. The base canvas handles everything else: the move tool, free drawing, the eraser, and so on; the top canvas is hidden for these operations. This is for performance reasons, so the base canvas doesn't have to rerender every time the mouse moves on the top canvas.

The main source is qboard.ts, which handles listening to mouse events and switching tools. Everything else is delegated to handlers, which are in individual files:

  • action.ts, which abstracts the actions for the front-end.
  • clipboard.ts, which handles cutting, copying, and pasting.
  • history.ts, which undoes and redoes with a pure(-ish) history stack.
  • keyboard.ts, which catches keyboard events that aren't H.
  • styles.ts, which gives an interface for changing pen style.
  • tools.ts, which implements each non-free-drawing tool.

Development

Running npm start will start a development server, which watches source files for changes. Run npm run build to generate the static application files, suitable for hosting or offline use. We have linters; run the full suite with npm run lint, and automatically fix most warnings/errors with npm run lint:fix. If you maintain a top-level deploy.js file, you can build the files and deploy in one step by running npm run deploy. We also have a Dockerfile which runs the development server in a container; build the image with docker build -t qboard ., then run with docker run -d --name qboard qboard. Note that this server is not suitable for production use; just host the static files instead.

The FabricJS file is huge and it doesn't support tree shaking, so the qboard demo at cjquines.com uses a custom build. It includes gestures, animation, free drawing, interaction, serialization, fabric.Rect, fabric.Ellipse, fabric.Image, fabric.Line, and window.fabric, which I think is the absolute minimum needed for it to work. (Do note that custom build currently has issues, though. If you encounter errors, you may wish to try this demo, which uses the full build.)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].