A real-time chat application built with Bun, WebSocket, SQLite, and Tailwind CSS.
- Features
- Installation
- Daytona - Recommended Development
- Development Server
- Production Build and Deployment
- Project Structure
- Technologies
- Environment Variables
- Attributions
- 🔐 User authentication (signup/login)
- 💬 Real-time messaging with WebSocket
- ✍️ Markdown support for messages
- 📝 Typing indicators
- 🌓 Dark mode support
- 🔄 Auto-scroll with smart scroll lock
- 📱 Responsive design
If you just want to use Chatter without setting up a development environment, you can download pre-built executables from the Releases page.
Important
Choose the correct executable for your operating system and CPU architecture (modern
for newer CPUs, base
for older ones).
- Download
windows-modern.zip
(orwindows-base.zip
). - Right-click and extract the ZIP file.
- Double-click the executable to start (or run from the command line with
./chatter.exe
). - Open
http://localhost:5177
in your browser.
- Download
darwin-modern.zip
(ordarwin-base.zip
). - Extract the ZIP file.
- Make the file executable and run it:
chmod +x ./chatter && ./chatter
- Open
http://localhost:5177
in your browser.
- Download
linux-modern.tar.xz
(orlinux-base.tar.xz
). - Extract the archive.
- Make the file executable and run it:
chmod +x ./chatter && ./chatter
- Open
http://localhost:5177
in your browser.
If you want to contribute or modify the application, follow these steps:
Note
It's highly recommended to use Daytona for development. This setup is described in detail in the next section.
- Prerequisites: Ensure you have Bun v1.1.36 or higher installed.
- Clone the Repository:
git clone https://github.com/The-Best-Codes/chatter.git cd chatter
- Install Dependencies:
bun install
Tip
Daytona is the easiest, fastest, and most isolated way to set up your development environment for Chatter. It creates a containerized workspace that includes all the necessary tools and dependencies.
- Install Daytona: Follow the Daytona installation guide.
- Create the Workspace:
daytona create https://github.com/The-Best-Codes/chatter
- Navigate to the Workspace:
daytona open chatter
- Start the Application:
bun run dev
Note
When using Daytona, you can skip the steps in the "Development Setup" section.
Tip
If you are not using Daytona, follow this steps to start the development server.
Start the development server with auto-reload:
bun run dev
Watch and compile CSS:
bun run css:watch
To prepare the application for production, run:
bun run build
Start the production server:
bun run start
The project includes PM2 scripts for production deployment:
bun run pm2-start # Start with PM2
bun run pm2-stop # Stop PM2 service
bun run pm2-restart # Restart PM2 service
bun run pm2-startup # Configure PM2 startup on boot
Caution
Make sure to configure your production environment variables correctly when deploying with PM2.
/src
/db
- Database schema and operations/views
- HTML templates
/public
/css
- Stylesheets (TailwindCSS)/pages
- Client-side JavaScript/images
- Static assets
- Runtime: Bun
- Database: SQLite
- Styling: TailwindCSS with Typography plugin
- Frontend: Vanilla JavaScript with WebSocket
- Security: bcryptjs for password hashing
PORT
- Server port (default: 5177)SCHEMA_PATH
- Path to SQLite schema file