- Add draft management functions to app.js (saveDraft, loadDraft, clearDraft, getDraftTimestamp)
- Implement draft auto-save in chat that saves every 2 seconds after typing stops
- Show draft restoration banner on page load if draft exists and is less than 7 days old
- Display draft age with "X minutes/hours/days ago" format
- Add Restore and Discard buttons to draft indicator
- Clear draft automatically after successfully sending a message
- Add draft indicator styles matching beige/blue/pink theme with cyan restore button
- Support dark mode with appropriate color adjustments
- Draft indicator slides in from top with smooth animation
Draft key format: draft_chat_{boardId} for per-board draft storage.
|
||
|---|---|---|
| config | ||
| handlers | ||
| legacy | ||
| models | ||
| static | ||
| templates | ||
| .gitignore | ||
| DOCUMENTATION.md | ||
| README.md | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
README.md
Welcome to ThreadR Rewritten
This is the source code for the ThreadR Forum Engine, rewritten in Go. ThreadR is a free and open-source forum engine designed to allow users to host their own forum instances on personal web servers.
Project Overview
ThreadR was originally started as a school project in 2019 with the aim of creating a hybrid between a forum and a social media platform. It was built with PHP and (back then still) MySQL. After we finished school, it was temporarily abandoned. An attempt was made to revive it in 2020, open-sourcing the code and making some things configurable, but not much else happened. Here we are now, with a full rewrite in Go started in 2025.
Project Setup
This is for development only. Currently, ThreadR is not ready for production use.
Prerequisites
- UNIX-like OS
- Go (golang)
- Mariadb
Setup Steps
- Create a mariadb user and database for ThreadR (the names can be changed):
CREATE USER threadr IDENTIFIED BY 'super secure password';
CREATE DATABASE `threadr`;
GRANT ALL PRIVILEGES ON `threadr`.* TO 'threadr';
- Create a config file: In the
configsubdirectory,cp config.json.sample config.jsonand edit it to suit your needs. - Create an about page: Also in the
configsubdirectory,cp about_page.htmlbody.sample about_page.htmlbodyand edit it to suit your needs.
Running the Application
After configuration, run the following command once to initialize the DB:
go run main.go --initialize
To start the ThreadR server, run this:
go run main.go
The server will start on port 8080 by default.
Contributing
We welcome contributions! Please join our Discord server to get in touch: discord.gg/r3w3zSkEUE.
License
ThreadR is licensed under the Apache 2.0 License. See LICENSE.md for details.
Authors: BodgeMaster, Jocadbz