Giter Club home page Giter Club logo

lavuei's Introduction

Build Status Total Downloads Latest Stable Version License

About Lavuei

更名为 EasyWrite 中文 易写

基于 Laravel8 实现的开源博客, 其用到的技术栈都是目前最新也是入门最容器的技术栈,并且在这个全栈框架中我们使用 InertiaJs (惯性) 来当做胶水语言而 Vue 在项目中退化为了纯视图层。

  • Laravel Jetstream

Laravel Jetstream 是一个设计精美的 Laravel 应用程序入门套件,为您的下一个 Laravel 应用程序提供了完美的起点。 Jetstream 为您的应用程序的登录、注册、电子邮件验证、两因素身份验证、会话管理、通过 Laravel Sanctum 提供的 API 以及可选的团队管理功能提供实现。

  • Tailwind CSS

前端框架采用 Tailwind CSS 高度可定制化组件依靠 class 就能很好的设计出我们想达到的目的, 可通过在线编辑器查看 https://play.tailwindcss.com/

  • InertiaJs

惯性JS 当做胶水语言帮助 Laravel 与 Vue 进行交互而 Laravel 中的路由非常的优秀我们可以省去 Vue 路由的部分而快速进行全栈开发

  • MavonEditor

一款开箱即用的基于 vue 的 Markdown 编辑器目前项目中采用最新的 vue3 beta 版本

  • v-code-diff

目前支持 vue3.0 可进行代码比较两种模式进行切换代码高亮

  • gateway-worker

workerman 是一款优秀的处理高并发的框架,项目中可实现了多人协同编辑示例

  • v-viewer

v-viewer.js 使用 vue3 版本帮助渲染 html 中的图片

  • admin-one-vue-tailwind

由作者@justboil 的后台管理模板,其中的黑暗模式也是按照其中的方式进行引入

  • docsearch

一款帮助搜索文档搜索神器,其中 Tailwind CSS 也是使用了其优雅的搜索功能只需要 CTRL+K 即可进行全文档搜索

目录结构

本项目采用 MVC 方式,可采用 service 层逻辑处理,后续加入存储模式,严格遵守单元测试,代码上传后采用 jenkins 持续集成。

环境部署

laravel sail 环境一键安装 laravel8 + php8.1 (注意 sail 环境需要在 WSL2 中使用) 使用阿里源安装 composer

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

注意在 WSL2 如果放在 /mnt/c 会影响 IO 性能建议放在 ~ 下

cd ~
su root
cd /home/www

注意环境中已经配置为 PHP8.1 版本并且在可使用 XDEBUG 进行调试

上传文件中权限问题在 .env 中添加

# uid
WWWUSER=1000
# 所属用户组
WWWGROUP=1000

起步

git clone [email protected]:whitexiong/lavuei.git

cp .env.example .env

composer install

进入目录

alias sail='bash vendor/bin/sail'
sail up -d
sail build --no-cache  # 改了dockefile 文件后需要重新编译
sail shell # 进入 shell 环境
php artisan migrate
php artisan schedule:run 运行定时任务

启动前端

npm install && npm run dev
sail npm run watch-poll  # 热重启

命令

sail php artisan code:models --table=xxx  生成模型文件

实现功能

  • 用户管理
  • 文章管理
  • Markdown 编辑器集成
  • 标签管理
  • 文章历史版本管理代码比对
  • 分组管理
  • 权限认证
  • 评论系统

分支说明

  • main 分支开发环境
  • test 测试环境

测试环境在线地址。 需要用户自己注册邮箱

创建 policy 策略

php artisan make:policy UserPolicy --model=User

License

The Laravel framework is open-sourced software licensed under the MIT license.

lavuei's People

Contributors

whitexiong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xiangwork weeisc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.