承接 moh8med/bffs 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

moh8med/bffs

Composer 安装命令:

composer create-project moh8med/bffs

包简介

BFFS is a simple project built with Laravel that implements the backend for frontend pattern to help you build a security shield in front of your APIs and Microservices.

README 文档

README

BFFS is a simple project built with Laravel that implements the backend for frontend pattern to help you build a security shield in front of your APIs and Microservices.

Here are some key points about BFFS:

  • Implements the backend for frontend pattern to separate the concerns of the frontend and backend and improve security.
  • Includes advanced request validation features, such as E.164 international phone number standard, password NIST standards, email RFC and DNS validation, email spoofing detection, and scanning uploaded files with Cisco ClamAV.
  • Uses Redis for rate limiting requests to improve security and reduce the risk of DDoS attacks.
  • Utilizes Swoole to speed up response time and improve overall performance.
  • Built using Laravel, a popular PHP web application framework, making it easy to integrate with existing systems.

Features

Monitoring

  • Uptime Monitor
  • SSL Certificate Expiry
  • Email notification
  • Slack notification

Performance Tuning

  • Running on Octane (Swoole or Roadrunner)
  • API Aggregation
  • Response Caching with Redis

Security Hardening

  • Trusted Hosts
  • Add Cloudflare IPs to Trusted Proxies
  • CORS Handling
  • Rate Limiting with Redis
  • Restricting Access by GeoIP2 (MaxMind DB)

Web Application Firewall (WAF)

  • Bot: Bad Bot Detection
  • RFI: Remote File Inclusion
  • XSS: Cross Site Scripting
  • SQLi: SQL Injection

Antivirus and Malware

  • Scanning uploaded files with Cisco ClamAV

Advanced Request Validation

  • Email RFC compliance
  • Email domain DNS
  • Email disposable/throwaway domains
  • Email spoofing detection
  • Email deliverability check
  • Password NIST standards
  • HaveIBeenPwned password check
  • Phone country prefix checking and E.164 standard
  • Phone number type: mobile, landline, etc
  • Phone number verification

Getting Started

To get started with BFFS, you will need to have a basic understanding of Laravel and its dependencies.

Installation

  1. Install the package via composer:
composer create-project moh8med/bffs
  1. Run the migrations:
php artisan migrate
  1. Configure your environment variables in the .env file.

  2. Update the databases:

# update the disposable domains list
php artisan disposable:update

# retrieves and cache Cloudflare's IP blocks
php artisan cloudflare:reload

# register for a license key at www.maxmind.com
# set your MAXMIND_LICENSE_KEY in .env file
# and update the geoip database
php artisan geoip:update
  1. Create your first uptime monitor:
# create your first monitor
php artisan monitor:create https://example.com/

# check the uptime of all sites
php artisan monitor:check-uptime
  1. You will need Cisco ClamAV installed to scan uploaded files against malwares:
docker run \
    --interactive \
    --publish 13310:3310 \
    --publish 7357 \
    --tty \
    --rm \
    --name "clam_container_01" \
    clamav/clamav:unstable

Then set CLAMAV_SKIP_VALIDATION=false in the .env file.

Usage

Once the server is running, you can start making requests to the endpoints that are protected by the BFFS shield.

  1. Start the server:
php artisan octane:start --port=8001 --watch
  1. Test your BFFS server:
curl http://127.0.0.1:8001/todos | jq

Contributions

If you would like to contribute to the project, please feel free to open a pull request with your changes.

License

This project is licensed under the MIT License.

moh8med/bffs 适用场景与选型建议

moh8med/bffs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 32, 最近一次更新时间为 2023 年 01 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 moh8med/bffs 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-31