docs/

directory
v0.35.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2025 License: GPL-3.0

README ΒΆ

FlowBot Documentation

FlowBot is a workflow-based intelligent chatbot framework.

Directory Structure

  • πŸ“ api/ - API documentation and interface definitions

    • swagger.json - OpenAPI 3.0 specification file (JSON format)
    • swagger.yaml - OpenAPI 3.0 specification file (YAML format)
    • docs.go - Auto-generated API documentation code
    • api.http - HTTP request examples collection
  • πŸ“ config/ - Configuration files and examples

    • config.yaml - Main configuration file template
    • agent.yaml - Agent configuration file template
    • examples/ - Configuration example files
  • πŸ“ deployment/ - Deployment-related documentation

    • flowbot-agent.service - Systemd service configuration file
  • πŸ“ development/ - Development-related documentation and tools

    • example.fish - Fish Shell script example
    • http-client.private.env.json - HTTP client environment configuration
  • πŸ“ database/ - Database-related documentation

    • schema.md - Database table structure documentation
  • πŸ“ architecture/ - System architecture documentation

    • architecture.png - System architecture diagram
    • flowchart.mermaid - Workflow flowchart
  • πŸ“„ notify.md - Notification configuration guide

Quick Start

  1. Configuration: Refer to configuration files in the config/ directory
  2. Deployment: Check deployment guides in the deployment/ directory
  3. API: View API documentation in the api/ directory
  4. Development: Refer to development tools in the development/ directory

Development Tools

Task Management
# Install
go install github.com/go-task/task/v3/cmd/task@latest

# View available tasks
task -a
Code Generation
# Generate bot
go run github.com/flowline-io/flowbot/cmd/composer generator bot -name example -rule collect,command,cron,form,input,instruct

# Generate vendor
go run github.com/flowline-io/flowbot/cmd/composer generator vendor -name example
Database Migration
# Import migration
go run github.com/flowline-io/flowbot/cmd/composer migrate import

# Create migration file
go run github.com/flowline-io/flowbot/cmd/composer migrate migration -name file_name

# Import workflow
go run github.com/flowline-io/flowbot/cmd/composer workflow import -token xxx -path ./docs/config/examples/docker_example.yaml
Code Linting
# Install revive
go install github.com/mgechev/revive@latest

# Run code check
revive -formatter friendly ./...
Code Statistics
# Install cloc
sudo apt install cloc  # Linux
brew install cloc      # macOS

# Count code
cloc --exclude-dir=node_modules --exclude-ext=json .
Security Check
# Install govulncheck
go install golang.org/x/vuln/cmd/govulncheck@latest

# Run security check
govulncheck ./...
API Documentation Generation

Reference: https://github.com/swaggo/swag/blob/master/README.md

# Install swag
go install github.com/swaggo/swag/cmd/swag@latest

# Generate documentation
swag init -g cmd/main.go

# Format documentation
swag fmt -g cmd/main.go
Database Migration Tool
# Install migration tool
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest

# Run migration
migrate -source file://./internal/store/migrate -database mysql://user:password@tcp(127.0.0.1:3306)/db?parseTime=True&collation=utf8mb4_unicode_ci up
Git Leak Detection
# Install gitleaks
go install github.com/zricethezav/gitleaks/v8@v8.21.1

# Check for leaks
gitleaks git -v

Contributing

  1. Fork this project
  2. Create a feature branch
  3. Commit your changes
  4. Create a Pull Request

License

This project is licensed under the GPL 3.0 License. See the LICENSE file for details.

Directories ΒΆ

Path Synopsis
Package api Code generated by swaggo/swag.
Package api Code generated by swaggo/swag.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL