forked from
atpota.to/flushes.app
The 1st decentralized social network for sharing when you're on the toilet. Post a "flush" today! Powered by the AT Protocol.
1# Flushes
2
3A 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`.
4
5## Features
6
7- Bluesky OAuth authentication
8- Custom lexicon schema for status updates
9- Emoji selection
10- Responsive design
11- Feed of all users' flushing status updates
12
13## Tech Stack
14
15- Next.js
16- React
17- TypeScript
18- Bluesky AT Protocol
19- Supabase (for feed storage)
20- WebSockets (for firehose connection)
21
22## Local Development
23
241. Clone the repository
252. Install dependencies:
26
27```bash
28npm install
29```
30
313. Create a `.env.local` file based on `.env.example` and add your Supabase credentials
32
334. Start the development server:
34
35```bash
36npm run dev
37```
38
395. Open [http://localhost:3000](http://localhost:3000) in your browser
40
416. For the firehose connection (optional, for feed functionality):
42 - Set up a Supabase project with the SQL in the `sql/setup.sql` file
43 - Run the firehose worker script on a server:
44
45```bash
46node scripts/firehose-worker.js
47```
48
49## Deployment
50
51This application is designed to be deployed on Vercel with the domain `flushing.im`.
52
53For production deployment:
54
551. Update the OAuth redirect URLs in both code and the Bluesky developer settings
562. Make sure the client metadata file is accessible at `https://flushing.im/oauth-client-metadata.json`
573. Deploy the application to Vercel
58
59## Custom Lexicon Schema
60
61This application uses a custom lexicon schema called `im.flushing.right.now` with the following structure:
62
63```json
64{
65 "$type": "im.flushing.right.now",
66 "text": "String - The status text",
67 "emoji": "String - A single emoji character",
68 "createdAt": "String - ISO timestamp"
69}
70```
71
72## License
73
74MIT