Initial baseline: LaraBlog core with plugin commerce surface.
Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# LaraBlog
|
||||
|
||||
Laravel 12 + Filament 5 + Livewire + Spatie + Workerman 的现代博客平台,支持 sablog 内容迁移、主题/插件、S3 兼容附件、HTML/Markdown 双轨、AI 队列与 `/api/v1` 只读接口。
|
||||
|
||||
## 快速开始
|
||||
|
||||
```bash
|
||||
composer install
|
||||
cp .env.example .env
|
||||
php artisan key:generate
|
||||
# 配置 DB_*;开发可设 ATTACHMENTS_DRIVER=local,生产配 AWS_* / MinIO
|
||||
php artisan migrate
|
||||
php artisan db:seed
|
||||
php artisan plugins:sync --enable=larablog/ai-comment-moderation
|
||||
php artisan themes:publish
|
||||
php artisan serve
|
||||
```
|
||||
|
||||
- 前台:`/`、`/show-{id}.shtml`、`/login.shtml` 等
|
||||
- 后台:`/admin`(`admin@larablog.test` / `password`)
|
||||
- API:`/api/v1/*`(OpenAPI:`/docs/api/openapi.yaml`)
|
||||
|
||||
## 文档索引
|
||||
|
||||
| 文档 | 内容 |
|
||||
|---|---|
|
||||
| [docs/architecture.md](docs/architecture.md) | 架构、分层、开发思想 |
|
||||
| [docs/themes.md](docs/themes.md) | 皮肤目录格式与开发 |
|
||||
| [docs/plugins.md](docs/plugins.md) | 插件格式 / Hook |
|
||||
| [docs/routing.md](docs/routing.md) | `.shtml` 路由策略 |
|
||||
| [docs/api/](docs/api/) | OpenAPI + 小程序向只读 API |
|
||||
| [docs/ops/deploy.md](docs/ops/deploy.md) | PM2 / Redis 前缀 / 部署 |
|
||||
| [docs/specs/larablog-platform/](docs/specs/larablog-platform/) | SPEC / CHECKLIST / TESTPLAN |
|
||||
|
||||
## 进程与 CI
|
||||
|
||||
- PM2:`ecosystem.config.cjs`(queue / schedule / workerman)
|
||||
- GitHub Actions:`.github/workflows/ci.yml`(PHP 8.2/8.3 + PHPUnit)
|
||||
|
||||
## 测试
|
||||
|
||||
```bash
|
||||
php artisan test
|
||||
```
|
||||
|
||||
- 默认 **sqlite `:memory:`**(见 `phpunit.xml`)
|
||||
- 覆盖:legacy URL、导入 fixture、auth、附件、AI stub、API v1 等
|
||||
- **不是**全站手工 E2E;支付/会员真实链路等属二期
|
||||
|
||||
## Redis 前缀
|
||||
|
||||
```env
|
||||
REDIS_PREFIX=larablog_
|
||||
CACHE_PREFIX=larablog_cache_
|
||||
```
|
||||
|
||||
## sablog 导入
|
||||
|
||||
```bash
|
||||
php artisan sablog:import --mode=raw --attachments=/path/to/attachments
|
||||
php artisan sablog:import --mode=markdown --attachments=/path/to/attachments
|
||||
```
|
||||
Reference in New Issue
Block a user