Skip to content

BenJeau/bluflare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bluflare Logo Bluflare

Docker Image Version (latest semver) GitHub Actions Workflow Status - Rust Compilation GitHub Actions Workflow Status - TypeScript Compilation GitHub Actions Workflow Status - Rustfmt Check GitHub Actions Workflow Status - Prettier Check

Monitor Bluesky posts and analyze trends in real-time.

Powered by the Bluesky Firehose via their Jetstream websocket service using Rust with a React frontend.

Bluflare Homepage Screenshot

Features

  • Track and filter Bluesky posts based on custom keywords
  • Real-time monitoring of the Bluesky Firehose
  • View and manage interests/keywords
  • Analyze and summarize posts matching your interests with Gemini
  • Sentiment analysis of posts
  • French and English user interface
  • Light and dark mode
  • Simple authentication and authorization

Getting Started

Prerequisites

  • Rust (latest stable version)
  • Node.js (latest LTS version)
  • pnpm
  • SQLite

Running the Application

  1. Clone the repository:
git clone https://github.com/BenJeau/bluflare.git
cd bluflare
  1. Start the backend:
cd backend
cargo run --bin backend
  1. Start the frontend:
cd frontend
pnpm install
pnpm dev

The frontend will be available at http://localhost:5173 by default and the backend at http://localhost:3000.

Backend configuration

Figment is used to define the configuration of the service. Default values are set within the config.toml file and all fields can be overwritten using environment variables starting with BLUFLARE__ and have sections in uppercase and separated with double underscores __. For example, to disable the Jetstream websocket client via an environment variable, you would use BLUFLARE__JETSTREAM__ENABLED=false as variable.

Authentication

By default, authentication is disabled and anyone can hit all endpoints (create/delete/update). To enabled authentication, you need to set the BLUFLARE__SERVER__AUTH__ENABLED environment variable to true and set the BLUFLARE__SERVER__AUTH__PASSWORD_HASH and BLUFLARE__SERVER__AUTH__USERNAME environment variables to the password hash and username of the admin user.

The password hash can be generated using the following command:

cd backend && cargo run --bin gen-auth 'PASSWORD'

Authentication is done via a cookie and only a single session is allowed at a time. If you log in multiple times, only the last session will be valid.

Development

The backend is built with:

The frontend is built with:

Deployment

Please refer to the deployment documentation for more information to deploy to DigitalOcean.

Project Structure

bluflare/
├── backend/           # Rust backend
│   ├── src/          # Source code
│   └── Cargo.toml    # Rust dependencies
├── frontend/         # React frontend
│   ├── src/          # Source code
│   └── package.json  # Node.js dependencies
└── README.md         # This file

Contributing

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

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Ingest and analyze Bluesky posts using Rust + React

Topics

Resources

License

Stars

Watchers

Forks

Packages