Skip to content

ajakilas/flaverse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flaverse

License: MIT

A secure anonymous chat application built with Flask and Supabase. Features dark theme, message linking, and real-time updates.

Features

  • Anonymous chat with auto-generated nicknames
  • Supabase backend for message storage
  • Dark theme with responsive design
  • Message permalinks with copy functionality
  • Rate limiting and input validation
  • Real-time message updates
  • Secure environment configuration

Prerequisites

  • Python 3.8+
  • Supabase account
  • Git
  • PIP package manager

Installation

  1. Clone the repository:
git clone https://github.com/synthous/flaverse.git
cd flaverse
  1. Create and activate virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Configuration

  1. Create Supabase project:

    • Go to Supabase Dashboard
    • Create new project
    • Create messages table with:
      CREATE TABLE messages (
        id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
        nickname TEXT NOT NULL,
        message TEXT NOT NULL,
        created_at TIMESTAMPTZ DEFAULT NOW()
      );
    • Enable RLS with policies:
      CREATE POLICY "Allow public insert" ON messages FOR INSERT WITH CHECK (true);
      CREATE POLICY "Allow public select" ON messages FOR SELECT USING (true);
  2. Create .env file:

SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
FLASK_ENV=development

Running the Application

export FLASK_APP=app.py  # On Windows: set FLASK_APP=app.py
flask run

Access the application at: http://localhost:5000

Deployment

  1. Recommended Host: Render.com

    • Create new Web Service
    • Connect your GitHub repository
    • Add environment variables:
      • SUPABASE_URL
      • SUPABASE_KEY
      • FLASK_ENV=production
  2. Custom Domain (Optional):

    • Configure DNS settings
    • Add SSL via Cloudflare
    • Set up proper caching headers

Contributing

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

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgments

About

Online Anonymous Chat written in Flask

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Contributors