Refactor: Apply Clean Architecture, Patrols Design, Principles Solid
@DontStopPrograming 已經在處理了。
開始於 2024年7月23日。
評估
這個 Issue 還沒有評估資料。
描述
DESCRIPTION:
Refactor the project to improve maintainability and scalability. This involves reorganizing the project structure and updating the code to adhere to these principles.
TASK:
1. Controllers:
- Implement the functions 'getsUserList, getUserList, postUserList, patchUserList, delUserList' using the services
2. Data:
- Structure the JSON file to store user data
3. Repositories:
- Implement functions for reading and writing user data
4. Middleware:
- Implement JWT authentication and error handling
5. Utilities:
- Implement utilities for generating JWT tokens and hashing passwords
6. Services:
- Encapsulate business logic for user operations
7. Routes:
- Define routes and apply authentication and authorization middleware
8. Main Application
- Configure the Express Application with security, compression, logging, and rate limiting
JUSTIFICATION
These changes will improve the code structure, making it easier to maintain. Applying these principles helps to keep the code organized, modular, and scalable.
IMPACT
This refactor is not expected to affect existing functionalities, but thorough testing is required to ensure everything works correctly after the changes.
REFERENCES
- Clean Architecture
- SOLID Principles
- Middleware Pattern
- 主要語言
- JavaScript
- 星號
- 0
- 分支
- 0
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id 未關閉bug
難度 2/5 1-3 小時 新手友好度 75/100
nightscout/nocturne#1414 ·
-
bug v2
難度 2/5 1-3 小時 新手友好度 75/100
modelcontextprotocol/inspector#2458 · 1 則留言 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
難度 2/5 1-3 小時 新手友好度 70/100
carbon-design-system/ibm-products#9907 ·