A lightning-fast, modern support widget and dashboard for your SaaS.
- ⚡ 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.
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS & Shadcn UI
- Database: PostgreSQL
- ORM: Drizzle ORM
- Deployment: Docker & GitHub Actions
- Node.js 18+
- Docker (optional, for containerized run)
- PostgreSQL Database
-
Clone the repository:
git clone https://github.com/your-username/flashbot.git cd flashbot -
Install dependencies:
npm install # or yarn install # or pnpm install
-
Environment Setup: Create a
.envfile 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"
-
Database Migration: Push the schema to your database:
npm run db:push
-
Run Development Server:
npm run dev
Open http://localhost:3000 to view the application.
This project is optimized for deployment on AWS EC2 using Docker and GitHub Actions.
-
Build the image:
docker build -t flashbot . -
Run the container:
docker run -p 3000:3000 --env-file .env flashbot
We use GitHub Actions to automatically build and deploy the application to your EC2 instance on every push to main.
- Configure Secrets: Add
EC2_HOST,EC2_USER, andEC2_KEYto your repository secrets. - Push to Main: The workflow will handle the rest!
.
├── 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
└── ...Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.