Skip to content

numan7272/funke

Repository files navigation

Funke Logo

Funke

A full-featured, self-hosted Discord alternative built from scratch

Electron React Node.js WebRTC SQLite Socket.IO

Real-time messaging, voice chat with WebRTC, screen sharing, and more — all self-hosted, no third-party services required.


Chat View

Features

Messaging & Channels

  • Real-time text messaging with Socket.IO
  • Server creation with text and voice channels
  • Direct messages and group conversations
  • Message editing, deletion, and pinning
  • Emoji picker and rich text support
  • Full-text message search across channels
  • Typing indicators and read receipts

Chat View


Voice & Video

  • Peer-to-peer voice chat via WebRTC
  • Real-time speaking indicators with Web Audio API
  • Screen sharing with a Discord-style source picker (choose window, monitor, or application)
  • Stream quality selection (720p–1440p, 30/60fps)
  • Stream viewer with volume control, fullscreen mode, and watch/leave toggle
  • Camera support with video grid layout
  • Join/leave/mute/deafen sounds

User System

  • JWT-based authentication with bcrypt password hashing
  • User profiles with avatar uploads
  • Online/idle/DnD/invisible status
  • Friend system (add, accept, remove)
  • Role-based permissions per server

Server Management

  • Create and customize servers with icons
  • Invite system with shareable invite codes
  • Server settings for owners (name, icon, channels)
  • Member list with role badges
  • Channel creation and management (text + voice)

Desktop App (Electron)

  • Native Windows installer (NSIS)
  • Discord-style animated splash screen with update check
  • Auto-updater via GitHub Releases (electron-updater)
  • System tray with server info and quick actions
  • Screen sharing via Electron's desktopCapturer API
  • Single-instance lock

Networking

  • LAN discovery with automatic IP detection
  • ngrok integration for public tunneling (one-click in the invite modal)
  • Resizable sidebar with persistent width

Tech Stack

Layer Technology
Frontend React 18, Vite, Lucide Icons
Backend Node.js, Express, Socket.IO
Database SQLite via sql.js (zero-config, single-file)
Real-time WebRTC (peer-to-peer), Socket.IO (signaling)
Desktop Electron 28, electron-builder, electron-updater
Auth JWT, bcryptjs
Uploads Multer (avatars, server icons, attachments)
Tunneling ngrok (optional, for public access)

Architecture

funke/
├── client/                  # React frontend (Vite)
│   └── src/
│       ├── components/      # 17 React components
│       ├── contexts/        # App state (useReducer + Context)
│       ├── utils/           # WebRTC manager, Socket.IO, sounds
│       └── styles/          # Dark theme CSS (~4000 lines)
├── server/                  # Express + Socket.IO backend
│   ├── routes/              # REST API (auth, uploads)
│   ├── socket/              # Real-time handlers (chat, voice, DM, friends)
│   ├── database.js          # SQLite schema & queries
│   └── index.js             # Server entry point + ngrok
├── electron/                # Desktop app shell
│   ├── main.js              # Main process (splash, updater, IPC, tray)
│   ├── preload.js           # Context bridge (desktopCapturer)
│   └── splash.html          # Animated startup screen
└── package.json             # Build config (electron-builder + NSIS)

Getting Started

Prerequisites

Development

# Install all dependencies
npm run setup

# Start in development mode (hot-reload)
npm run dev

The app runs at http://localhost:4000.

Build Desktop App

# Build Windows installer
npm run dist

The installer is output to dist-app/.

Run as Electron App (dev)

npm run build      # Build frontend first
npm run electron   # Start Electron

Connecting with Friends

  1. Same network (LAN): Open the Invite Modal → copy the LAN address → send it to your friend
  2. Different network: Click "ngrok Tunnel starten" in the Invite Modal → share the public URL
  3. Your friend opens the address in a browser, creates an account, and joins with the invite code

Screenshots

Add screenshots to a docs/screenshots/ folder and uncomment the image tags above.

License

MIT License — see LICENSE for details.


Built with ☕ by Numan

About

A self-hosted Discord alternative with real-time messaging, WebRTC voice chat, and screen sharing

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors