Skip to content

UmarMahmoodShaikh/fugue-app

Repository files navigation

🌌 Fugue β€” Ephemeral Anonymous Chat

β€œA conversation that leaves no trace.”
Inspired by the fugue state β€” a temporary amnesic condition β€” Fugue is a secure, in-memory, peer-to-peer chat where nothing persists.

Deployed with CI/CD Docker Node.js React + Vite


✨ Features

Feature Description
πŸ” Account-Based Access Users sign up and log in with username + password. Sessions persist via secure cookies until logout.
🎯 Interest Matching Select multiple interests; chat pairing prioritises shared interests with optional "extend search" fallback.
πŸ”„ Real-Time Sync WebSocket-powered live messaging with automatic pairing and partner presence events.
πŸšͺ Leave Any Time Leave chat without logging out β€” return to the lobby with a single click.
🧼 Ephemeral by Design Messages live only in memory β€” nothing saved after disconnect.
🎨 Dark Mode UI Clean Tailwind UI with responsive layout.
🐳 Docker-Ready Dev & prod Dockerfiles included.
πŸ”„ CI/CD Pipeline Automated testing, building, and deployment via GitHub Actions.

πŸš€ Quick Start (Local Dev)

Prerequisites

  • Node.js v18+
  • PostgreSQL (local or remote). The default dev DSN expects a local database named fugue_app.
  • Docker (optional, for container testing)

1. Install dependencies

# Clone the repo
git clone https://github.com/umarmahmoodshk/fugue-app.git
cd fugue-app

# Backend deps
npm install

# Frontend deps
npm install --prefix client

2. Configure Postgres

# Create the local database (optional if you supply DATABASE_URL)
createdb fugue_app

Create a .env in the project root if you want to override defaults:

DATABASE_URL=postgres://user:password@localhost:5432/fugue_app
SESSION_SECRET=super-secret

3. Run the app

# Start the backend (ensures schema automatically)
npm run dev

# Option A: run the Vite dev server (hot reload)
npm run dev --prefix client
#   visit http://localhost:5173

# Option B: build the client once and let Express serve it
npm run build:client
#   reload http://localhost:8080

Sign up with a username/password, pick interests, then start matching. Use the Leave button to exit a chat without logging out.


🐳 Docker Usage

Build & Run Dev Image (Backend Only)

docker build -f Dockerfile.dev -t fugue-dev .
docker run -p 3000:3000 fugue-dev

Keep frontend running via npm run dev in client/.

Build & Run Production Image (Full App)

docker build -f Dockerfile.prod -t fugue-prod .
docker run -p 3000:3000 fugue-prod

πŸ‘‰ Visit http://localhost:3000 β€” frontend + backend in one container!


πŸ”„ CI/CD Pipeline (GitHub Actions)

Based on the Trinity Bootstrap workflow:

Branch Pipeline Action
dev βœ… Run tests β†’ πŸ—οΈ Build dev image
main βœ… Run tests β†’ πŸ—οΈ Build prod image β†’ πŸš€ Push to GHCR

πŸ“ See: .github/workflows/ci.yml


πŸ“‚ Project Structure

fugue-app/
β”œβ”€β”€ client/               # React + Vite frontend
β”‚   β”œβ”€β”€ src/              # Components, hooks, styles
β”‚   └── vite.config.js    # Dev server config (host: 0.0.0.0)
β”œβ”€β”€ index.js              # Node.js + WebSocket backend
β”œβ”€β”€ package.json          # Backend dependencies
β”œβ”€β”€ Dockerfile.dev        # Dev container (backend only)
β”œβ”€β”€ Dockerfile.prod       # Production container (full app)
β”œβ”€β”€ .gitignore
└── .github/workflows/ci.yml

πŸ” Privacy & Security

  • No data persistence: All state is in-memory (server + browser).
  • No logs: Backend never stores messages after disconnect.
  • Anti-screenshot: UI blurs on logout.
  • No tracking: Zero analytics, cookies, or telemetry.

πŸ•ŠοΈ Fugue respects your right to forget.


🌍 Deploy to Cloud (Coming Soon)

  • Fly.io (1-command deploy)
  • Render
  • AWS ECS

πŸ™Œ Contributing

This is a learning project aligned with the Trinity Bootstrap DevOps workflow.
Feel free to:

  • ✨ Improve UI/UX
  • πŸ§ͺ Add unit tests
  • πŸš€ Add cloud deployment scripts

Fugue: Ephemeral Chat

πŸ”§ Key Features Implementation

Real-time WebSocket Communication

  • Automatic user pairing system
  • Room-based chat management
  • Connection health monitoring
  • Graceful disconnect handling

Production Optimizations

  • Multi-stage Docker builds for minimal image size
  • Non-root user execution for security
  • Environment-based configuration
  • Cloud Run with WebSocket support

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ™ Acknowledgments

  • Built as part of the Trinity Bootstrap project
  • Real-time functionality powered by WebSockets
  • Deployed on Google Cloud Platform
  • Continuous deployment via GitHub Actions

⭐ Star this repo if you found it helpful!

β€œWe met in the fog. We spoke. We vanished.”
β€” Fugue v1.0


🌍 Live Deployment

βœ… Currently deployed on Google Cloud Run: Try Fugue Live

About

A modern, anonymous peer-to-peer chat application built with real-time WebSocket technology and deployed on Google Cloud Platform.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors