DEV Community

Cover image for ๐Ÿš€ I finally built my first project on Electron Js: A Draggable Floating Webcam for Creators.
Rahman Nugar
Rahman Nugar

Posted on

๐Ÿš€ I finally built my first project on Electron Js: A Draggable Floating Webcam for Creators.

Recently, I started a new job where one of the requirements was working with Electron.js โ€” a framework I hadnโ€™t touched before. Coming from a web development background (React, TypeScript, etc.), the idea of building desktop apps with web technologies felt both exciting and a bit daunting.

To speed up my learning and get comfortable with Electronโ€™s ecosystem, I decided to build a side project: a floating, draggable webcam overlay for creators.

๐ŸŽฅFloating Webcam โ€” A Lightweight Camera Overlay App

If youโ€™ve ever recorded tutorials, walkthroughs, or gameplay, you know how tedious it can be to position and overlay your webcam footage during post-production. I wanted to eliminate that step entirely.

So I built Floating Webcam, a minimal desktop tool that lets you keep your webcam feed on top of other windows โ€” no editing needed. Just launch the app, drag the camera feed where you want it, and start your screen recording software.

No overlays. No clutter. Just record.

๐Ÿ› ๏ธ What Itโ€™s Built With
Electron.js โ€“ For creating a native-feeling cross-platform desktop app.

React โ€“ To structure the UI and manage component state.

TypeScript โ€“ For better DX and safer code.

TailwindCSS โ€“ For rapid and responsive styling.

Watch the demo on LinkedIn
Demo

You can view the full source code and try it yourself on GitHub:
GitHub

๐Ÿ’ก Why I Built It

At work, I inherited an old Electron-based project that needed some serious improvements. Rather than dive straight into the legacy code, I figured the best way to understand how Electron works was to build something new and practical from the ground up.

Floating Webcam became the perfect sandbox โ€” not too simple, not overly complex, and aligned with real-world use cases.

๐Ÿ” What I Learned About Electron

Before this project, my mental model was: "Electron just wraps a web app in a desktop shell."

But once I got into it, I quickly realized Electron has its own architecture and design considerations.

Hereโ€™s a breakdown of key concepts I picked up:

๐Ÿงต Main vs Renderer Process
Electron apps run two types of processes:

  1. Main process โ€“ Manages the appโ€™s lifecycle, windows, and system-level interactions.

  2. Renderer process โ€“ Runs inside each window (like a browser tab) and handles the UI.

Understanding how they work together โ€” and when to separate logic between them โ€” was a foundational step.

๐Ÿ” Context Isolation + IPC
Because of security risks, Electron enforces context isolation between the main and renderer. So if you want to pass data (like media devices, window state, etc.), you need to use IPC (inter-process communication) via the contextBridge API.

I learned how to expose safe APIs from the main process to the renderer, which allowed React to control Electron-native behavior without direct access to Node.js.

๐ŸŽฅ Accessing Media Devices
Electron gives you access to the same Web APIs youโ€™d use in the browser โ€” like

navigator.mediaDevices.getUserMedia.
Enter fullscreen mode Exit fullscreen mode

This meant I could handle webcam streams just as I would in a regular React app โ€” but now within a persistent desktop environment.

๐Ÿ‘จโ€๐Ÿ’ป Final Thoughts
Electron can be intimidating at first, especially if you're coming from a web-only background. But once you get the hang of its architecture and build flow, itโ€™s surprisingly powerful.

If youโ€™ve ever wanted to turn a web app into a desktop app โ€” or need native system access without learning a whole new language โ€” Electron is absolutely worth exploring.

This project gave me the hands-on experience I needed to start contributing confidently to Electron-based projects at work.

Top comments (0)