{"id":19262896,"url":"https://github.com/datawhalechina/wow-fullstack","last_synced_at":"2025-05-06T20:08:21.880Z","repository":{"id":215198090,"uuid":"736641434","full_name":"datawhalechina/wow-fullstack","owner":"datawhalechina","description":"wow-fullstack，令人惊叹的全栈开发教程","archived":false,"fork":false,"pushed_at":"2025-03-31T15:46:36.000Z","size":11537,"stargazers_count":166,"open_issues_count":3,"forks_count":39,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-05T01:33:57.570Z","etag":null,"topics":["element","fastapi","typescript","vue3","wow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datawhalechina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-12-28T13:08:49.000Z","updated_at":"2025-04-03T08:40:26.000Z","dependencies_parsed_at":"2024-01-17T10:40:20.866Z","dependency_job_id":"d0668a51-ed72-4065-9ee0-d5cef87e1bc0","html_url":"https://github.com/datawhalechina/wow-fullstack","commit_stats":null,"previous_names":["datawhalechina/wow-ts","datawhalechina/wow-fullstack","datawhalechina/zishu"],"tags_count":0,"template":false,"template_full_name":"datawhalechina/repo-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fwow-fullstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fwow-fullstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fwow-fullstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fwow-fullstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datawhalechina","download_url":"https://codeload.github.com/datawhalechina/wow-fullstack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252761191,"owners_count":21800124,"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":["element","fastapi","typescript","vue3","wow"],"created_at":"2024-11-09T19:34:02.288Z","updated_at":"2025-05-06T20:08:21.842Z","avatar_url":"https://github.com/datawhalechina.png","language":"Jupyter Notebook","readme":"# wow-全栈\n\n好的教程可以一路运行。\n我们要做一个能够一路拷贝代码运行的全栈开发教程。集成了许多优秀代码片段，在开发过程中可以随时复制。同时搭配了一个练手项目，一个用来做时间管理的项目。前端采用ts+vue3+vite架构，后端采用fastapi架构。开源项目和开源教程可以打配合。开源项目里用到的知识写入开源教程。开源教程所用到的例子来源于开源项目。互相印证。\n\n# 教程使用方法\n\n- TS：进入tutorial文件夹，再进入[TypeScript](https://github.com/datawhalechina/wow-fullstack/tree/main/tutorial/TypeScript)文件夹，自行阅读各个章节。文档都是Markdown，点开后可直接阅读。代码的输出结果已经写在相应代码下方了。需要什么代码尽管拷贝。\n- Vue3：进入tutorial文件夹，再进入[Vue3](https://github.com/datawhalechina/wow-fullstack/tree/main/tutorial/Vue3)文件夹，自行阅读各个章节。文档都是Markdown，点开后可直接阅读。代码的输出结果已经写在相应代码下方了。需要什么代码尽管拷贝。\n- FastAPI：进入tutorial文件夹，再进入[FastAPI](https://github.com/datawhalechina/wow-fullstack/tree/main/tutorial/FastAPI)文件夹。文档都是jupyter notebook，需要把ipynb文件下载到本地去运行。直接运行每个代码格子就可以。\n\n# 前后端使用方法\n\n首先如果是首次拉取代码，用git clone https://github.com/datawhalechina/wow-fullstack.git ，把所有代码拉取下来。如果以前有拉取过，就用git pull\n\n### 确保版本正确\npython需要的版本是3.10\nnode需要的版本是v18.18.0\nnpm需要的版本是10.2.5\n### 安装后端依赖库\n进入`tm-backend`文件夹，确保`requirement.txt`文件是在的，然后\n`pip install -r requirement.txt`\n### 生成数据库\n如果根目录有`mydatabase.db`这个文件，其实是可以直接输入命令 `python main.py` 启动后端的，不过出于教学的目的，我们可以先把这个文件删掉，重新生成一遍。\n在`alembic.ini`所在的文件夹所在的cmd窗口输入命令创建迁移脚本：\n`alembic revision --autogenerate -m \"my first db\"`\n这将在`alembic/versions` 目录下创建一个新的迁移脚本，打开脚本，确认一下upgrade函数有没有问题，是不是想要的变更？如果没问题就输入\n`alembic upgrade head`\n在根目录下会看到mydatabase.db这个数据库文件。这样数据库就建好了。但是数据表里还没有数据\n\n### 填充测试数据\n可以填写一些假数据，方便测试\n在cmd窗口输入 `python seed.py` 即可。\n这个seed.py的作用是新建一下static文件夹以及下面的profiles文件夹，然后在数据库填充管理员的账号。\n运行完python seed.py可以看看mydatabase.db这个数据库文件是不是更新了，有数据了。\n查看sqlite数据库可以到https://sqlitebrowser.org/ 下载一个DB Browser for SQLite这样就可以用可视化的图形界面查看sqlite数据库里的数据了。\n\n### 测试填充数据\n在cmd窗口输入 `python check_password.py` 即可。如果后端输出了\n自塾\nTrue\n说明运行正确。数据库中的数据库有效。就不需要再去管seed.py。seed.py已经完成了它的历史使命。\n\n### 启动后端\n在main.py 所在的文件开启cmd窗口，输入命令 python，查看是否是python3.10 版本？如果版本不对，请自行解决python版本问题。\n版本正确后，输入命令 `python main.py` 即可启动后端。\n\n### 测试后端是否正常运行\n\n浏览器中输入 http://127.0.0.1:8008 看是否能出现 {\"Hello\":\"World\"} ？\n浏览器中输入 http://127.0.0.1:8008/docs 看是否能出现 FastAPI 各种post、get接口文档？\n如果两个都没问题，就说明后端一切正常。\n\n\n### 启动前端\nnode需要的版本是v18.18.0\nnpm需要的版本是10.2.5\n进入 tm-fronfend，输入命令 npm install\n如果出现报错可尝试删除package-lock.json项目\n如果运行顺利，输入 npm run dev\n如果顺利，会输出浏览器链接，不要用localhost：5173。我们找一个 192.168 的贴到浏览器，就可以打开页面了。\n打开前端页面后，点右上角的登录按钮，输入手机号15812345678，密码 zishu，即可进入网站。\n\n\n\n\n## 参与贡献\n\n本项目由[自塾](https://zishu.co/v1/tw/article/121)团队负责维护。\n\n- 如果你想参与到项目中来欢迎查看项目的 [Issue]() 查看没有被分配的任务。\n- 如果你发现了一些问题，欢迎在 [Issue]() 中进行反馈🐛。\n- 如果你对本项目感兴趣想要参与进来可以通过 [Discussion]() 进行交流💬。\n\n如果你对 Datawhale 很感兴趣并想要发起一个新的项目，欢迎查看 [Datawhale 贡献指南](https://github.com/datawhalechina/DOPMC#%E4%B8%BA-datawhale-%E5%81%9A%E5%87%BA%E8%B4%A1%E7%8C%AE)。\n\n## 贡献者名单\n\n需要开发的产品和对应的大写首字母有：  \n1.时间管理课程 Course  \n2.技术教程 Tutorial  \n3.用户使用指南 Guide  \n4.开发文档 Docs  \n5.前端代码 Frontend  \n6.后端代码 Backend  \n\n开发者需要根据自己的技能和兴趣选定一个开发产品作为主产品。  \n目前的开发人员安排：  \nCourse：[Susan](https://github.com/Susan2048)  \nTutorial：[Hoshino-wind](https://github.com/Hoshino-wind)、[KMnO4-zx](https://github.com/KMnO4-zx)  \nGuide：张某  、[WuXiaoMing](https://xlight5.github.io)  \nDocs：[Kailigithub](https://github.com/Kailigithub)  、[WuXiaoMing](https://xlight5.github.io)  \nFrontend：[lime](https://github.com/yyhhxx)  、[WuXiaoMing](https://xlight5.github.io)  \nBackend：[Tom.Yang](https://github.com/7n8fail)、[lish](https://github.com/kevin-light)、[wu](https://github.com/AIzealotwu)  、[WuXiaoMing](https://xlight5.github.io)\n\n\n## 关注我们\n\n\u003cdiv align=center\u003e\n\u003cp\u003e扫描下方二维码关注公众号：Datawhale\u003c/p\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/datawhalechina/pumpkin-book/master/res/qrcode.jpeg\" width = \"180\" height = \"180\"\u003e\n\u003c/div\u003e\n\n## LICENSE\n\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/\"\u003e\u003cimg alt=\"知识共享许可协议\" style=\"border-width:0\" src=\"https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey\" /\u003e\u003c/a\u003e\u003cbr /\u003e本作品采用\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/\"\u003eMIT\u003c/a\u003e进行许可。\n\n*注：默认使用CC 4.0协议，也可根据自身项目情况选用其他协议*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatawhalechina%2Fwow-fullstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatawhalechina%2Fwow-fullstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatawhalechina%2Fwow-fullstack/lists"}