定制 elgibor-solution/laravel-botpress 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elgibor-solution/laravel-botpress

Composer 安装命令:

composer require elgibor-solution/laravel-botpress

包简介

A Laravel bridge for Botpress Community Edition API.

README 文档

README

A production-ready Laravel package that acts as a transparent bridge to the Botpress v12 Community Edition API.

Features

  • Bridge all Botpress API endpoints with a configurable prefix.
  • Mirror same API path, payload, and response as Botpress.
  • Handle configuration from .env or Database.
  • Production ready with comprehensive tests.

Installation

composer require elgibor-solution/laravel-botpress

Configuration

Publish the config file:

php artisan vendor:publish --tag="botpress-config"

Environment Variables

The package supports both Botpress Cloud and Botpress Community Edition (CE) with different authentication methods.

For Botpress Cloud

BOTPRESS_SERVER_URL=https://your-cloud-instance.botpress.cloud
BOTPRESS_AUTH_TYPE=bearer
BOTPRESS_API_TOKEN=bp_pat_your_token_here
BOTPRESS_ROUTE_PREFIX=botpress
BOTPRESS_USE_DATABASE_CONFIG=false

For Botpress CE (No Authentication)

Ideal for development or internal networks:

BOTPRESS_SERVER_URL=http://localhost:3000
BOTPRESS_AUTH_TYPE=none
BOTPRESS_ROUTE_PREFIX=botpress
BOTPRESS_USE_DATABASE_CONFIG=false

For Botpress CE (JWT Authentication)

When your CE instance requires JWT tokens:

BOTPRESS_SERVER_URL=http://your-botpress-server:3000
BOTPRESS_AUTH_TYPE=jwt
BOTPRESS_AUTH_SECRET=your-jwt-secret-key
BOTPRESS_JWT_EXPIRY=3600
BOTPRESS_ROUTE_PREFIX=botpress
BOTPRESS_USE_DATABASE_CONFIG=false

For Botpress CE (Basic Authentication)

When your CE instance uses basic auth:

BOTPRESS_SERVER_URL=http://your-botpress-server:3000
BOTPRESS_AUTH_TYPE=basic
BOTPRESS_AUTH_USERNAME=admin
BOTPRESS_AUTH_PASSWORD=your-password
BOTPRESS_ROUTE_PREFIX=botpress
BOTPRESS_USE_DATABASE_CONFIG=false

Authentication Types

  • bearer - For Botpress Cloud (uses PAT/BAK/IAK tokens)
  • jwt - For Botpress CE with JWT authentication
  • basic - For Botpress CE with HTTP Basic authentication
  • none - For Botpress CE without authentication (development/internal)

Database Configuration

If you want to manage configuration via database, run the migrations:

php artisan vendor:publish --tag="botpress-migrations"
php artisan migrate

Then set BOTPRESS_USE_DATABASE_CONFIG=true in your .env. The package will look for configuration keys in the botpress_configs table:

Available keys:

  • server_url - Botpress server URL
  • api_token - API token (for bearer auth)
  • auth_type - Authentication type (bearer, jwt, basic, none)
  • auth_secret - JWT secret key (for JWT auth)
  • jwt_expiry - JWT expiration in seconds (for JWT auth)
  • auth_username - Username (for basic auth)
  • auth_password - Password (for basic auth)

Usage

Simply make requests to your Laravel application using the configured prefix.

For example, if your prefix is botpress, a request to: POST https://your-laravel-app.com/botpress/api/v1/bots/my-bot/converse/my-user

Will be bridged to: POST http://your-botpress-server:3000/api/v1/bots/my-bot/converse/my-user

Headers (except for excluded ones like host) and payloads are forwarded exactly as received.

Testing

vendor/bin/phpunit

License

MIT

elgibor-solution/laravel-botpress 适用场景与选型建议

elgibor-solution/laravel-botpress 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 97 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「chat」 「Bridge」 「laravel」 「botpress」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 elgibor-solution/laravel-botpress 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 elgibor-solution/laravel-botpress 我们能提供哪些服务?
定制开发 / 二次开发

基于 elgibor-solution/laravel-botpress 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 97
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 30
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-02