{"id":14973664,"url":"https://github.com/eitsxiaozhai/fastapi_blog","last_synced_at":"2025-06-21T06:42:01.262Z","repository":{"id":204610686,"uuid":"712273243","full_name":"EITSxiaozhai/FastApi_Blog","owner":"EITSxiaozhai","description":"A modern blogging system based on FastAPI and Vue 3, using asynchronous front-end and back-end separation architecture, supporting Docker automated deployment, both efficient performance and ease of use.","archived":false,"fork":false,"pushed_at":"2025-06-12T06:41:17.000Z","size":29486,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-12T07:41:23.354Z","etag":null,"topics":["blog","celery","celery-beat","cicd","fastapi","mysql","sqlalchemy","synchronous-programming","vue2","vue3"],"latest_commit_sha":null,"homepage":"https://blog.exploit-db.xyz","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EITSxiaozhai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-31T06:18:39.000Z","updated_at":"2025-05-13T07:30:14.000Z","dependencies_parsed_at":"2024-02-27T02:29:02.499Z","dependency_job_id":"48219cfa-98e7-4949-bc90-d27fe25e36a4","html_url":"https://github.com/EITSxiaozhai/FastApi_Blog","commit_stats":{"total_commits":688,"total_committers":4,"mean_commits":172.0,"dds":"0.39389534883720934","last_synced_commit":"a2ef8825581ffc74d43d7d4b1e29ba5ed2501448"},"previous_names":["eitsxiaozhai/fastapi_blog"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EITSxiaozhai/FastApi_Blog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EITSxiaozhai%2FFastApi_Blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EITSxiaozhai%2FFastApi_Blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EITSxiaozhai%2FFastApi_Blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EITSxiaozhai%2FFastApi_Blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EITSxiaozhai","download_url":"https://codeload.github.com/EITSxiaozhai/FastApi_Blog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EITSxiaozhai%2FFastApi_Blog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261080113,"owners_count":23106564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","celery","celery-beat","cicd","fastapi","mysql","sqlalchemy","synchronous-programming","vue2","vue3"],"created_at":"2024-09-24T13:49:10.718Z","updated_at":"2025-06-21T06:41:56.242Z","avatar_url":"https://github.com/EITSxiaozhai.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fastapi + Vue3/2 的全栈项目\n\n# 基本实现功能\n\n---\n\n## 普通用户端\n* 查看文章功能\n* 登录注册功能\n* 评论区功能\n* 打分公告\n* Google验证码登录注册验证\n* 文章博客实时传输到Redis中。减轻数据库压力。实现了Redis和Mysql同步功能\n\n## 管理员功能\n\n* 增删改查对应文章\n* 使用了[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)进行管理员端管理\n* 审查评论\n* 查看注册用户\n* 发送重置密码邮件(暂未实现)\n* 详细实现功能可以跳转到vue-element-admin上查看。\n* Google验证码登录注册验证\n* 双Token自动续期，全局管理员Token拦截。\n* WebSocket+折线图监控主机情况\n\n## 中间件功能\n* 全局Token验证拦截。必须携带token才能进行某些接口的访问。\n* 日志格式化功能.接受来自uvicorn的日志。并且格式化成对应形式。通过ELK进行日志存储使用等\n---\n\n\n## 前提准备\n\n- Mysql\n- redis\n- RabbitMQ或者其他消息队列代替\n- Python3-Fastapi\n- vue3和vue2的环境\n- 阿里云的OSS key，用来存放文章首页图片\n- Google 验证码的密钥，分为两个角色请分开。\n- ELK的日志服务器地址\n## 目录介绍\n* app目录存储为\n# 部署方法\n\n---\n\n## 0.部署前提\n\n该项目目前存在的Python env配置.当然可以自己后续自行添加,如果你不知道什么是ENV请Google\n```\n- ACCESS_KEY_ID\n- ACCESS_KEY_SECRET\n- DB_HOSTNAME\n- DB_NAME\n- DB_PASSWORD\n- DB_PORT\n- DB_USERNAME\n- RECAPTCHA_SECRET_KEY\n- REDIS_DB_HOSTNAME\n- REDIS_DB_NAME\n- REDIS_DB_PASSWORD\n- REDIS_DB_PORT\n- MQ_USERNAME\n- MQ_USERPASSWORD\n- MQ_HOSTNAME\n- MQ_DBNAME\n- MQ_DBPORT\n- MQ_USERNAME\n```\n# 程序目录介绍\n- [app](app)\n  - [Fast_blog](/app/Fast_blog) \n    - [database](/app/Fast_blog/database) 数据库链接\n    - [middleware](/app/Fast_blog/middleware) 中间件模块\n    - [model](/app/Fast_blog/model) 数据库模型模块\n    - [schemas](/app/Fast_blog/schemas) 请求验证模块\n    - [unit](/app/Fast_blog/unit) app模块文件夹\n      - [AdminAPP](/app/Fast_blog/unit/AdminApp) 管理员接口\n      - [Blog_app](/app/Fast_blog/unit/Blog_app) 博客接口\n      - [Power_crawl](/app/Fast_blog/unit/Power_Crawl) 爬虫接口（自用。可以删除）\n      - [SystemMonitoring](/app/Fast_blog/unit/SystemMonitoring) websocket系统监控模块\n      - [User_app](/app/Fast_blog/unit/User_app) 普通用户接口\n        \n\n---\n\n## 1.手动部署  \n\n### 后端部署方法\n\n####  可以利用python直接运行后端接口\n\n```\nuvicorn.exe main:app --reload\n```\n\n后端启动完成后。代码中包含了自动启动邮件发送定时任务。当然你可以拆除它。并使用下面的命令进行手动启动\n\n#### 启动Celery的主服务\n``` python\n celery -A app.Fast_blog.middleware.backlist worker --loglevel=info -P eventlet\n```\n#### 启动Celery的循环定时任务调度器进行自动执行\n``` python\n celery -A app.Fast_blog.middleware.celerybeat-schedule:celery_app beat\n```\n---\n\n## 前端部署\n#### 前端测试启动方法--部署到生产环境不安全。仅供功能测试\n前端分为用户前端和管理前端。需要分别CD到对应的文件夹中随后开启web。\n```\nnpm run dev\n```\n#### 前端生产环境部署方法\n\n请参阅  [Deploy a Vite 3 site](https://developers.cloudflare.com/pages/framework-guides/deploy-a-vite3-project/)\n\n---\n## 其他提示\n\n#### 后端接口地址\n\n```\nhttp://192.168.0.150:49200/docs\n```\n\n#### 用户前端接口地址\n\n```\nhttp://127.0.0.1:49300/\n```\n\n#### 管理员端地址\n\n```\nhttp://127.0.0.1:49400/\n```\n\n**注意此处会遇到跨域问题。如果在本机上开发就不需要担心这个问题。如果需要搭建到公网上去且安装SSL证书。参考nginx反向代理配置文件**\n\n---\n# Gitlab自动部署\n在文件目录中存在了对应了.gitlab-ci.yml文件。该文件利用流水线发布。包含测试，打包，部署，可以自行修改。后端前端都存在了对应的Dockerfile，可以进行自动修改，你只需要将这个项目推送到存在这gitlab-runner仓库中。部署完成即可","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feitsxiaozhai%2Ffastapi_blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feitsxiaozhai%2Ffastapi_blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feitsxiaozhai%2Ffastapi_blog/lists"}