Skip to content

devadarshh/flashbot

Repository files navigation

🚀 Flashbot

A lightning-fast, modern support widget and dashboard for your SaaS.

Next.js Tailwind CSS Shadcn UI Drizzle ORM Docker

🌐 Live Demo

FeaturesGetting StartedDeploymentTech Stack


✨ Features

  • ⚡ Embeddable Widget: A lightweight, high-performance support widget you can drop into any website.
  • 📊 Admin Dashboard: Comprehensive dashboard to manage tickets, view analytics, and configure settings.
  • 🎨 Modern UI/UX: Built with Shadcn UI and Tailwind CSS for a sleek, accessible, and responsive design.
  • 🔒 Secure Authentication: Robust authentication system powered by Scalekit.
  • 🗄️ Database Management: Type-safe database interactions with Drizzle ORM and PostgreSQL.
  • 🐳 Dockerized: Fully containerized for easy deployment and scalability.
  • 🤖 CI/CD Ready: Automated build and deployment pipelines using GitHub Actions.

🛠️ Tech Stack

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • Docker (optional, for containerized run)
  • PostgreSQL Database

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/flashbot.git
    cd flashbot
  2. Install dependencies:

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Environment Setup: Create a .env file in the root directory and add the following variables:

    # Database
    DATABASE_URL="postgres://user:password@host:port/database?sslmode=no-verify"
    
    # Scalekit (Auth)
    SCALEKIT_ENVIRONMENT_URL="https://flashbot.scalekit.dev"
    SCALEKIT_CLIENT_ID="your-client-id"
    SCALEKIT_CLIENT_SECRET="your-client-secret"
    SCALEKIT_REDIRECT_URI="http://localhost:3000/api/auth/callback"
    SCALEKIT_WEBHOOK_SECRET="your-webhook-secret"
    
    # AI & Tools
    GEMINI_API_KEY="your-gemini-api-key"
    ZENROWS_API_KEY="your-zenrows-api-key"
    
    # Security
    JWT_SECRET="your-jwt-secret"
  4. Database Migration: Push the schema to your database:

    npm run db:push
  5. Run Development Server:

    npm run dev

    Open http://localhost:3000 to view the application.

📦 Deployment

This project is optimized for deployment on AWS EC2 using Docker and GitHub Actions.

Manual Deployment (Docker)

  1. Build the image:

    docker build -t flashbot .
  2. Run the container:

    docker run -p 3000:3000 --env-file .env flashbot

Automated Deployment (GitHub Actions)

We use GitHub Actions to automatically build and deploy the application to your EC2 instance on every push to main.

  1. Configure Secrets: Add EC2_HOST, EC2_USER, and EC2_KEY to your repository secrets.
  2. Push to Main: The workflow will handle the rest!

📂 Project Structure

.
├── app/                  # Next.js App Router pages
│   ├── api/              # API Routes
│   ├── dashboard/        # Dashboard views
│   └── embed/            # Embeddable widget code
├── components/           # Reusable UI components
├── db/                   # Database schema and client
├── drizzle/              # Migration files
├── lib/                  # Utility functions
├── public/               # Static assets
└── ...

🤝 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

About A lightning-fast, modern support widget and dashboard for SaaS businesses grounded in scraped business knowledge via a RAG pipeline. Strict tenant data isolation, sub-100ms query targets.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages