一个功能完整的待办事项管理应用,使用现代化技术栈构建。
todo_list/ ├── backend/ # Flask 后端 │ ├── app.py # 主应用文件 │ ├── models.py # 数据库模型 │ ├── requirements.txt # Python 依赖 │ └── todos.db # SQLite 数据库(自动生成) ├── frontend/ # React 前端 │ ├── public/ │ ├── src/ │ │ ├── App.jsx # 主组件 │ │ ├── App.css # 样式 │ │ ├── main.jsx # 入口文件 │ │ └── index.css # 全局样式 │ ├── index.html │ ├── package.json │ └── vite.config.js └── README.md # 本文件
cd backend
pip install -r requirements.txt
python app.py
后端服务将运行在 http://localhost:5000
cd frontend
npm install
npm run dev
前端服务将运行在 http://localhost:5173
获取所有待办事项
创建新的待办事项
{
"title": "待办事项标题"
}
更新待办事项
{
"title": "新标题",
"completed": true
}
删除待办事项
按照上述快速开始步骤即可
cd frontend && npm run buildMIT License