The 1st decentralized social network for sharing when you're on the toilet. Post a "flush" today! Powered by the AT Protocol.
TypeScript 76.8%
CSS 18.4%
JavaScript 4.8%
246 1 0

Clone this repository

https://tangled.org/atpota.to/flushes.app
git@tangled.org:atpota.to/flushes.app

For self-hosted knots, clone URLs may differ based on your setup.

README.md

Flushes#

A React/Next.js application that allows users to login with their Bluesky account and set a status update with a custom lexicon schema called im.flushing.right.now.

Features#

  • Bluesky OAuth authentication
  • Custom lexicon schema for status updates
  • Emoji selection
  • Responsive design
  • Feed of all users' flushing status updates

Tech Stack#

  • Next.js
  • React
  • TypeScript
  • Bluesky AT Protocol
  • Supabase (for feed storage)
  • WebSockets (for firehose connection)

Local Development#

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Create a .env.local file based on .env.example and add your Supabase credentials

  2. Start the development server:

npm run dev
  1. Open http://localhost:3000 in your browser

  2. For the firehose connection (optional, for feed functionality):

    • Set up a Supabase project with the SQL in the sql/setup.sql file
    • Run the firehose worker script on a server:
node scripts/firehose-worker.js

Deployment#

This application is designed to be deployed on Vercel with the domain flushing.im.

For production deployment:

  1. Update the OAuth redirect URLs in both code and the Bluesky developer settings
  2. Make sure the client metadata file is accessible at https://flushing.im/client-metadata.json
  3. Deploy the application to Vercel

Custom Lexicon Schema#

This application uses a custom lexicon schema called im.flushing.right.now with the following structure:

{
  "$type": "im.flushing.right.now",
  "text": "String - The status text",
  "emoji": "String - A single emoji character",
  "createdAt": "String - ISO timestamp"
}

License#

MIT