kChat is an open-source, browser-based chatroom app built with plain HTML, CSS, and JavaScript, backed by Supabase. Contributions of all kinds are welcome — whether you’re fixing a bug, improving the UI, or suggesting a new feature. The full source code lives at github.com/korynthian/chatroom, and getting started is straightforward since there is no build toolchain to configure.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/korynthian/chatroom/llms.txt
Use this file to discover all available pages before exploring further.
Project structure
The repository is intentionally minimal. Every file serves a clear, focused purpose:Key concepts
Understanding a few core patterns will help you orient quickly in the codebase. Theme system —settings.js defines a confirmCustomCSS() function that runs on every page load. It checks localStorage for a previously saved CSS string. If none exists, it reads the system colour-scheme preference and fetches either themes/default-dark.css or themes/default-light.css from the server, stores the result in localStorage, and injects it as an inline <style> tag. The custom-theme editor in settings/customtheme.html writes directly to the same localStorage key, so the chosen style is shared across all pages.
Messaging — chat.js drives the chat room page. On load, displayMessages() queries the Supabase messages table for the current room and renders each entry as a <p> element containing the sender’s username, message content, and a formatted timestamp. The function is called once immediately on DOMContentLoaded and then again on a setInterval every 1 second to keep the view current. Pressing the Enter key in the message input fires an insert call to Supabase and refreshes the display.
Room navigation — The active room is communicated via the URL hash #roomID=<id> (for example, chat.html#roomID=2). When chat.js detects this hash on load, it writes the room ID to localStorage so the same room is reopened on subsequent visits. indextablenames.js handles the index page: it queries the Supabase rooms table and renders a link for each room using the same chat.html#roomID=<id> pattern.
Making changes
kChat has no build step. As soon as you save a file and refresh the browser, your changes are live. There is nothing to compile, bundle, or transpile.
Fork the repository on GitHub
Visit github.com/korynthian/chatroom and click Fork to create your own copy of the repository under your GitHub account.
Serve the project locally
Because kChat uses ES modules and fetches theme files over HTTP, you need a local server — opening Then open
index.html directly as a file:// URL will not work correctly. A one-liner with Python is enough:http://localhost:8080 in your browser.Make your changes
Edit the appropriate HTML, CSS, or JavaScript file. The project structure above maps each feature area to its file. For example, to change how messages are displayed, edit
chat.js; to adjust the default colour scheme, edit the files in themes/.Test in a browser against your own Supabase project
kChat reads from and writes to a Supabase backend. For local testing, set up your own Supabase project using the schema in
supabase.sql, then update the supabaseUrl and supabaseKey constants at the top of chat.js and indextablenames.js to point to your project. Verify that messaging, room listing, and theme persistence all work as expected.Open a pull request
Push your branch to your fork and open a pull request against the
main branch of korynthian/chatroom. Describe what you changed and why, and include screenshots if your changes affect the UI.