Skip to content

parthmax2/TriChat

Repository files navigation

TriChat

Temporary anonymous rooms for quick sharing between nearby devices.

No account. No phone login. No personal messenger on shared PCs.

Open a room. Share what you need. Everything clears after 5 hours.

Live Demo FastAPI WebSockets Temporary

Live Demo · Quick Start · Story · Architecture

TriChat hero banner

PC-1

open
no login

room: project-drop

files links notes images

quick exchange, same room, any browser
PC-2

join
same room
Temporary by design  ·  auto-delete after 5 hours
No Login
Open a room instantly.
Share Fast
Drop files, links, and notes.
Temporary
History clears after 5 hours.
Any Device
Works in a browser.

The Little Office Problem

The little office problem

Three friends. Three computers. One tiny task.

Can you send me that file?

Sure. Wait... should I log into WhatsApp Web on your PC?

Maybe email?

No no, I do not want my personal account open here.

And suddenly, sharing one small file becomes a whole ritual: open a personal messenger, scan a QR code, wait for sync, remember to log out, and hope nothing private stays open.

So TriChat started as a tiny escape hatch.

Not a social network. Not a permanent chat app. Just a quick temporary room where teammates can drop files, links, and notes without logging into personal accounts.


The Idea

What if sharing between office PCs felt like passing a sticky note?

  1. Create a room.
  2. Tell your friend the room name.
  3. Drop files, links, images, or text.
  4. Leave when the work is done.
  5. History disappears after 5 hours.
The TriChat idea moment

That is TriChat.

Need TriChat answer
Move a file from one PC to another Join the same room and upload it
Avoid WhatsApp, email, or personal logins No account needed
Share quick links or notes Send them as room messages
Avoid long-term clutter Auto-clears after 5 hours
Use any device nearby Works in a browser

Features

Anonymous rooms
Join with a name and room. No account ceremony.
Quick sharing
Send text, links, images, and files between devices.
Realtime chat
WebSocket-powered messages feel instant.
5-hour expiry
Messages and uploaded files are temporary by design.
Room cache
Small in-memory cache keeps recent room loading snappy.
Self-hostable
Run locally, in Docker, or on Hugging Face Spaces.

Sharing Flow

TriChat sharing flow

flowchart LR
    A[Open TriChat] --> B[Enter name + room]
    B --> C[Friend joins same room]
    C --> D[Share text, links, images, files]
    D --> E[Work gets done]
    E --> F[History clears after 5 hours]
Loading

Temporary By Design

TriChat auto delete scene

Built to disappear after the job is done.

Every saved message and uploaded file gets an expiry time.

created_at + 5 hours = expires_at

The cleanup worker runs in the background and removes expired database messages, uploaded files, and stale cached history.

TriChat is intentionally short-lived. It is for quick exchange, not forever storage.


Quick Start

Run TriChat locally
git clone https://github.com/parthmax2/TriChat.git
cd TriChat
pip install -r requirements.txt

Create your environment file:

cp .env.example .env

Fill in:

SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-supabase-secret-key
SUPABASE_BUCKET=chat-files
ROOM_HISTORY_HOURS=5
HISTORY_CACHE_SECONDS=30
CLEANUP_INTERVAL_SECONDS=600
PORT=7860

Run it:

uvicorn app:app --reload --port 7860

Open:

http://127.0.0.1:7860

Setup

1. Create The Database

In your Supabase SQL editor, run:

supabase_schema.sql

This creates the messages table and adds:

  • expires_at for 5-hour cleanup
  • file_path so uploaded files can be deleted from storage
  • indexes for faster room history
2. Create The File Bucket

Create a public storage bucket named:

chat-files

TriChat stores uploaded files there and deletes expired file objects during cleanup.

3. Add Environment Variables

Use .env.example as your guide.

Never commit your real .env file.


How It Works

Architecture map
Browser
room UI
FastAPI
routes + WebSockets
Supabase Postgres
room history
Supabase Storage
uploaded files
open room  →  send message/file  →  sync realtime  →  cleanup expired data

Core stack:

Layer Tool Why it is here
Backend FastAPI Serves the app, APIs, uploads, and room logic.
Realtime WebSockets Keeps room messages live across devices.
Database Supabase Postgres Stores temporary messages with expiry timestamps.
File storage Supabase Storage Stores uploaded files until cleanup removes them.
Deployment Docker / Hugging Face Spaces Makes the project easy to run and share.

Test The Integration

Run:

python test.py

Expected result:

Supabase database integration successful.
Inserted, read, and deleted test row id: ...

Perfect For

Office teammates
Move files across shared PCs without personal logins.
Computer labs
Share notes and files between lab machines.
Hackathon teams
Drop links, screenshots, builds, and quick notes.
Support desks
Create a temporary room for fast exchange.

Safety Note

TriChat is built for quick temporary exchange, not permanent private storage.

Do not share passwords, private keys, confidential company documents, or anything that should not appear in a public temporary room.

The Short Story

I built TriChat because my coworkers and I often needed to move files between office PCs.

Using WhatsApp Web was annoying because nobody wanted to log into a personal account on someone else's computer.

TriChat is a temporary anonymous room: open a room, share files or links, and the history clears after 5 hours.


Roadmap

Copy invite link button Room expiry countdown in the UI
Drag-and-drop file upload Dark mode
Optional room password One-click deploy buttons

TriChat friends success scene

Open a room. Share the thing. Leave no mess.

Temporary rooms. Quick sharing. No personal login.

Try TriChat live · Run locally

About

Temporary anonymous rooms for quick file, link, and note sharing between devices.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors