A modular web application for building and managing AI-powered Slack bots with workflow automation capabilities.
- Workflows: Create and manage automated workflows with code generation
- Slack Bot: Manage bot installation across Slack channels
- Integrations: Connect with Kubernetes, Jira, and Grafana
- Git Repository: Version control and file management
- PostgreSQL Database: Persistent storage for all application data
- Docker
- Docker Compose
-
Clone the repository
git clone <repository-url> cd slack-bot-builder
-
Build and start all services
docker-compose up --build
-
Access the application
- Frontend: http://localhost
- Backend API: http://localhost:5000
- Database: localhost:5432
- Database:
slack_bot_db
- Username:
slack_bot_user
- Password:
slack_bot_password
- Host:
postgres
(internal) orlocalhost
(external) - Port:
5432
The backend is a Flask application with PostgreSQL database support.
Key Files:
backend/app.py
- Main Flask applicationbackend/db_utils.py
- Database utilities and managersbackend/init.sql
- Database schema and initial data
Database Managers:
WorkflowManager
- Manage workflowsSlackChannelManager
- Manage Slack channelsIntegrationManager
- Manage integrationsWorkspaceManager
- Manage workspace information
The frontend is a React TypeScript application with modular page structure.
Key Files:
frontend/src/App.tsx
- Main application with navigationfrontend/src/pages/
- Page componentsWorkflowsPage.tsx
- Workflow managementSlackBotPage.tsx
- Slack bot managementIntegrationsPage.tsx
- Integration managementGitRepoPage.tsx
- Git repository management
- Image:
postgres:15-alpine
- Port:
5432
- Volume:
postgres_data
(persistent) - Initialization:
backend/init.sql
- Base Image:
python:3.11-slim
- Port:
5000
- Dependencies: Flask, psycopg2-binary, python-dotenv
- Environment: Connected to PostgreSQL database
- Build Stage:
node:18-alpine
- Production Stage:
nginx:alpine
- Port:
80
- Features: React SPA with API proxy to backend
- workflows - Store workflow configurations and generated code
- integrations - Store integration settings and connection status
- slack_channels - Store Slack channel information and bot installation status
- workspace - Store workspace information
The database is initialized with sample data including:
- Sample workflows
- Integration configurations (Kubernetes, Jira, Grafana)
- Sample Slack channels with bot installation status
- Workspace information
GET /api/workflows
- Get all workflowsPOST /api/workflows
- Create new workflowPUT /api/workflows/:id
- Update workflowDELETE /api/workflows/:id
- Delete workflow
GET /api/slack/channels
- Get all channelsPUT /api/slack/channels/:id/install
- Install/remove bot
GET /api/integrations
- Get all integrationsPUT /api/integrations/:id/connect
- Connect/disconnect integration
DATABASE_URL
- PostgreSQL connection stringFLASK_ENV
- Flask environment (development/production)FLASK_APP
- Flask application entry point
POSTGRES_DB
- Database namePOSTGRES_USER
- Database usernamePOSTGRES_PASSWORD
- Database password
# Start all services
docker-compose up
# Start in background
docker-compose up -d
# View logs
docker-compose logs -f
# Stop all services
docker-compose down
# Rebuild and start
docker-compose up --build
# Access database
docker-compose exec postgres psql -U slack_bot_user -d slack_bot_db
# Build production images
docker-compose -f docker-compose.yml build
# Start production services
docker-compose -f docker-compose.yml up -d
- Check if PostgreSQL container is running:
docker-compose ps
- Check database logs:
docker-compose logs postgres
- Verify environment variables in docker-compose.yml
- Clear node_modules:
docker-compose exec frontend rm -rf node_modules
- Rebuild frontend:
docker-compose build frontend
- Check Python dependencies:
docker-compose exec backend pip list
- Check application logs:
docker-compose logs backend
- Fork the repository
- Create a feature branch
- Make your changes
- Test with Docker setup
- Submit a pull request
This project is licensed under the MIT License.