A lightweight whiteboard web application inspired by Excalidraw, built entirely using Vanilla JavaScript and the HTML5 Canvas API.
https://canvaskraft-web-app.vercel.app/
https://github.com/Upendhar10/Canvaskraft-webApp
Canvaskraft is a frontend-focused project designed to explore how drawing tools work under the hood.
Unlike typical projects that rely on frameworks, this app is built from scratch using:
- Vanilla JavaScript
- HTML & CSS
- Canvas API
The goal was to strengthen core JavaScript fundamentals and understand event-driven rendering.
- Freehand drawing (multiple colors & sizes)
- Sticky notes with drag & drop and minimize
- Undo / Redo functionality
- Eraser tool
- Image upload
- Export canvas as PNG
- Frontend: Vanilla JavaScript, HTML, CSS
- Rendering: HTML5 Canvas API
- State Management: Arrays (custom logic)
- Libraries: None (built from scratch)
The app uses the Canvas API for drawing. Since canvas is immediate-mode, everything must be redrawn manually.
Implemented using two stacks:
undoHistoryredoHistory
Each state is stored as an image snapshot (data URL).
All interactions are handled using native DOM event listeners:
mousedown,mousemove,mouseupfor drawing- Drag events for sticky notes
- Implementing undo/redo without built-in state
- Managing drag-and-drop interactions
- Working without frameworks or libraries
- Deep understanding of JavaScript fundamentals
- How Canvas rendering works
- Event-driven architecture
- Trade-offs in frontend design decisions
- Add persistent storage (localStorage / backend)
- Optimize undo/redo memory usage
- Introduce zoom and pan
- Real-time collaboration (WebSockets)
- Inspired by Excalidraw.
Feel free to connect or provide feedback!