Skip to content

knurdz/Sonar-Code-Editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

456 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sonar Code Editor Logo

🌊 Sonar Code Editor & Monitoring System

A modern, real-time collaborative IDE built for supervised exams, hackathons, and secure coding environments.

Electron React Vite TypeScript Appwrite


πŸš€ Download Beta Release

Mac Logo (Recommended)

Install the latest beta with Homebrew:

brew install --cask rkvishwa/knurdz/sonar-code-editor

Alternative: Manual Download Download the latest .dmg from GitHub Releases: Download Mac Beta (.dmg)

Note on Mac Installation: If you manually download the .dmg, macOS Gatekeeper may flag the app as damaged or from an unidentified developer because it is not yet code-signed in the beta phase.

To bypass and install: Open your terminal and run the following command on the extracted app:

sudo xattr -rd com.apple.quarantine /Applications/Sonar\ Code\ Editor.app

Windows Logo

Microsoft Store (Recommended)
Microsoft Store

Manual Download (.exe) Download the NSIS installer from GitHub Releases: Download Windows Beta (.exe)

Note on Windows Installation: If using the .exe installer, Windows SmartScreen may show an "Untrusted" or "Windows protected your PC" prompt since the beta is not EV-signed.

To bypass and install: Click "More info" and then "Run anyway". The Windows installer supports custom installation directory selection.

πŸ› Known Issues

If you encounter bugs or want to see what's being tracked, check our GitHub Issues.


πŸ“– Overview

Sonar Code Editor is a feature-rich desktop IDE built with Electron, React, and Vite. It provides a VS Code-like coding experience via Monaco Editor and enables real-time collaboration through Yjs and a self-hosted WebSocket server. Beyond standard editing, Sonar includes a monitoring system, activity logging, PDF report generation, and build attestation β€” making it ideal for supervised coding competitions, hackathons, and educational exam environments.

The project consists of two components:

  • Sonar Code Editor β€” Electron desktop app (this repository)
  • Sonar Web App β€” SvelteKit companion website at sonar.knurdz.org, providing the public homepage, hosted admin dashboard, and documentation.

✨ Key Features

  • πŸ’‘ Advanced Code Editing

    • Powered by Monaco Editor (the engine behind VS Code).
    • Syntax highlighting, auto-completion, and code formatting.
    • @knurdz/jack-editor-tab for multi-document tab management.
    • LF line-ending enforcement across operating systems.
  • 🀝 Real-time Collaboration

    • Google Docs-style real-time typing via Yjs CRDTs and y-monaco.
    • Self-hosted WebSocket server (y-websocket protocol, port 1234) running in the Electron main process.
    • Collaborative cursors, awareness states, and team-isolated rooms.
    • Windows Hosted Network creation (netsh) for offline LAN-only exam environments.
  • πŸ—‚οΈ Smart File Management

    • @knurdz/jack-file-tree β€” custom file explorer with create, rename, delete, and drag-drop.
    • Resizable panels (File Tree, Editor, Preview) via react-resizable-panels.
  • πŸ›‘οΈ Administration & Monitoring

    • Keystroke, focus, and clipboard monitoring via MonitoringService.
    • Offline behavior logging β€” persisted locally via electron-store and synced to Appwrite when online.
    • Generates PDF activity reports with jsPDF + jsPDF-autotable.
    • Admin Dashboard available via the Sonar Web App (cloud-based, removed from in-editor in beta.6).
  • 🌐 Secure Preview Panel

    • Embedded webview restricted to localhost URLs only.
    • All navigation events are intercepted; non-localhost requests are blocked.
    • Custom local-file:// protocol for serving images from the filesystem safely.
  • πŸ” Cloud & Authentication

    • Appwrite BaaS β€” team authentication (Hackathon ID + Student ID + password), session management, and real-time data sync.
    • Build Attestation β€” official builds are HMAC-signed to prevent unauthorized client access.
    • ASAR Integrity Check β€” verifies the application bundle on startup.
    • Deep Link support (sonar-editor://) for invite-based team joining.
  • βš™οΈ Theme & Customization

    • System Default, Light, and Dark themes selectable from Settings.

πŸ› οΈ Tech Stack

Frontend (Renderer)

  • Framework: React 18 with TypeScript
  • Build Tool: Vite
  • Editor: Monaco Editor (@monaco-editor/react)
  • Routing: React Router DOM (v6)
  • Styling: CSS with Radix UI Colors & Lucide React icons
  • Collaboration: Yjs, y-monaco, y-websocket
  • File Tree: @knurdz/jack-file-tree
  • Editor Tabs: @knurdz/jack-editor-tab

Backend / Desktop Core

  • Desktop Framework: Electron
  • IPC: Context Bridge + Preload scripts
  • Local Storage: electron-store
  • BaaS: Appwrite (Auth, Database, Functions)
  • WebSocket Server: ws library (y-websocket protocol)
  • PDF Reports: jsPDF + jsPDF-autotable
  • Security: bytenode (bytecode compilation), HMAC build attestation, ASAR integrity

Companion Web App

  • Framework: SvelteKit
  • Styling: Tailwind CSS
  • Auth: Appwrite
  • Hosting: Cloudflare Pages / static adapter

πŸ“š Documentation

Document Description
DEVELOPMENT.md Local setup, project structure, and build guide
ARCHITECTURE.md System architecture, process model, and collaboration design
appwrite.md Appwrite backend setup and environment variable reference
SECURITY.md Security policy, permissions, and vulnerability reporting
CHANGELOG.md Version history and release notes
CONTRIBUTING.md Contribution guidelines

πŸ‘₯ Contributors

A huge thank you to everyone who has contributed to the Sonar Code Editor project.

Commits
rkvishwa @rkvishwa 225
Kasun Kumara @Kasun-Kumara 66
SadeepaNHerath @SadeepaNHerath 53
Thesaru-p @Thesaru-p 47
RKK Vishva Kumar @rkvishwa 39
Praveen Ramanathan @Praveen-R-2518 22
harshasilva @harshasilva 14
Senuka-Deneth @Senuka-Deneth 8

πŸ“œ License

This project is licensed under the MIT License. See LICENSE for details.

About

A secure, real-time collaborative coding environment designed specifically for supervised exams and technical interviews.

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors