diff --git a/README.md b/README.md index 0165a77..e0ef809 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,223 @@ -
+# Tstore - +Tstore 是一个基于 Laravel 12 的 Typecho 插件/主题商店项目,包含展示前台、网页后台和 API 接口三部分。 -## About Laravel +## 功能概览 -Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: +- 前台展示站:首页、插件列表、主题列表、详情页 +- 网页后台:账号密码登录、分类管理、扩展管理、版本管理、ZIP 发布 +- 仓库 API:扩展列表、详情、更新检查、下载、分类 +- 管理 API:包管理、分类管理、版本管理 -- [Simple, fast routing engine](https://laravel.com/docs/routing). -- [Powerful dependency injection container](https://laravel.com/docs/container). -- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. -- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). -- Database agnostic [schema migrations](https://laravel.com/docs/migrations). -- [Robust background job processing](https://laravel.com/docs/queues). -- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). +## 技术栈 -Laravel is accessible, powerful, and provides tools required for large, robust applications. +- PHP 8.2+ +- Laravel 12 +- Vite 7 +- Tailwind CSS 4 -## Learning Laravel +## 主要入口 -Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. You can also check out [Laravel Learn](https://laravel.com/learn), where you will be guided through building a modern Laravel application. +- 前台首页:`/` +- 后台登录:`/admin/login` +- 仓库 API:`/api/v1/repo/*` +- 管理 API:`/api/admin/*` +- 健康检查:`/up` -If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. +## 本地开发 -## Laravel Sponsors +```bash +composer install +cp .env.example .env +php artisan key:generate +php artisan migrate --force +npm install +npm run dev +php artisan serve +``` -We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com). +也可以直接使用项目内置脚本: -### Premium Partners +```bash +composer run setup +composer run dev +``` -- **[Vehikl](https://vehikl.com)** -- **[Tighten Co.](https://tighten.co)** -- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** -- **[64 Robots](https://64robots.com)** -- **[Curotec](https://www.curotec.com/services/technologies/laravel)** -- **[DevSquad](https://devsquad.com/hire-laravel-developers)** -- **[Redberry](https://redberry.international/laravel-development)** -- **[Active Logic](https://activelogic.com)** +## 生产部署 -## Contributing +以下步骤以 `Linux + Nginx + PHP-FPM` 为例。生产环境不要运行 `php artisan serve` 和 `npm run dev`。 -Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). +### 1. 准备运行环境 -## Code of Conduct +- 安装 PHP 8.2 及常用扩展:`mbstring`、`openssl`、`pdo`、`pdo_mysql` 或 `pdo_sqlite`、`fileinfo`、`zip` +- 安装 Composer 2 +- 安装 Node.js 20+ 和 npm +- 准备 Web 服务器,例如 Nginx +- 准备数据库,生产建议使用 MySQL 或 MariaDB,不建议继续使用 SQLite -In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). +### 2. 拉取代码并安装依赖 -## Security Vulnerabilities +```bash +git clone