Skip to content

Commit cb490a9

Browse files
committed
chore: Archive completed plans and add integration documentation
1 parent 53e1a66 commit cb490a9

File tree

49 files changed

+22237
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+22237
-0
lines changed

docs/REQUIREMENTS.md

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# Mac Dev Cleaner - Yêu Cầu Dự Án
2+
3+
> **Ngày tạo:** 2025-12-15
4+
> **Stakeholder:** @thanhngo
5+
> **Status:** Draft - Đang đánh giá
6+
7+
---
8+
9+
## 📋 Tổng Quan
10+
11+
Phát triển một công cụ giúp developers dọn dẹp các thư mục phát triển, giải phóng dung lượng ổ đĩa trên máy Mac.
12+
13+
---
14+
15+
## 🎯 Mục Tiêu Chính
16+
17+
1. **Clean thư mục iOS/Xcode development**
18+
- `DerivedData`
19+
- Xcode caches
20+
- Archives không cần thiết
21+
22+
2. **Clean thư mục Android development**
23+
- `build/` folders
24+
- `.gradle/` caches
25+
- Android SDK caches
26+
27+
3. **Clean cache chung**
28+
- System caches
29+
- Application caches
30+
31+
4. **Clean package manager artifacts**
32+
- `node_modules/`
33+
- Có thể mở rộng: `Pods/`, `.cargo/`, etc.
34+
35+
---
36+
37+
## 🖥️ Yêu Cầu Giao Diện
38+
39+
| Loại | Mô tả | Ưu tiên |
40+
| ------- | ------------------------------------- | ----------- |
41+
| **CLI** | Command line interface cơ bản | P0 (MVP) |
42+
| **TUI** | Terminal UI với interactive selection | P1 |
43+
| **GUI** | Desktop app (nếu cần) | P2 (Future) |
44+
45+
---
46+
47+
## 🌍 Platform Support
48+
49+
| Platform | Hỗ trợ | Ghi chú |
50+
| ----------- | --------- | ----------------- |
51+
| **macOS** | ✅ Primary | Target chính |
52+
| **Windows** | ❓ TBD | Cần đánh giá thêm |
53+
| **Linux** | ❓ TBD | Cần đánh giá thêm |
54+
55+
### Câu hỏi cần quyết định:
56+
- [ ] Chỉ hỗ trợ macOS hay cross-platform?
57+
- [ ] Nếu cross-platform, paths sẽ khác nhau cho mỗi OS
58+
59+
---
60+
61+
## 📦 Đóng Gói & Phân Phối
62+
63+
### Yêu cầu:
64+
- User không cần cài đặt runtime (Node.js, Go, Rust...)
65+
- Dễ dàng cài đặt qua Homebrew (cho macOS)
66+
- Có thể download binary trực tiếp
67+
68+
### Options đã research:
69+
70+
| Stack | Pros | Cons |
71+
| --------------------- | ---------------------------- | ------------------------------- |
72+
| **Go + GoReleaser** | Fast, simple, cross-platform | Learning curve nếu chưa biết Go |
73+
| **Rust + cargo-dist** | Best performance | Steeper learning curve |
74+
| **Bun + compile** | TypeScript familiar | Larger binary size |
75+
76+
> 📄 Chi tiết: Xem [RESEARCH-CLI-DISTRIBUTION.md](./RESEARCH-CLI-DISTRIBUTION.md)
77+
78+
---
79+
80+
## ✅ Acceptance Criteria (MVP)
81+
82+
### Must Have (P0):
83+
- [ ] Scan và liệt kê các thư mục có thể clean
84+
- [ ] Hiển thị size của mỗi thư mục (human-readable)
85+
- [ ] Cho phép chọn thư mục cần xóa
86+
- [ ] Xác nhận trước khi xóa
87+
- [ ] Dry-run mode (preview không xóa thật)
88+
89+
### Should Have (P1):
90+
- [ ] Interactive TUI với arrow key navigation
91+
- [ ] Progress bar khi scanning/deleting
92+
- [ ] Config file để customize paths
93+
- [ ] Presets: `--ios`, `--android`, `--node`, `--all`
94+
95+
### Nice to Have (P2):
96+
- [ ] Auto-detect project types
97+
- [ ] Exclude patterns (whitelist)
98+
- [ ] Report/Summary export
99+
- [ ] Scheduled cleaning
100+
101+
---
102+
103+
## 📁 Thư Mục Target (macOS)
104+
105+
### iOS/Xcode
106+
```
107+
~/Library/Developer/Xcode/DerivedData/
108+
~/Library/Developer/Xcode/Archives/
109+
~/Library/Caches/com.apple.dt.Xcode/
110+
```
111+
112+
### Android
113+
```
114+
~/.gradle/caches/
115+
~/.gradle/wrapper/
116+
~/.android/cache/
117+
*/build/ (trong Android projects)
118+
*/.gradle/ (trong Android projects)
119+
```
120+
121+
### Node.js
122+
```
123+
*/node_modules/
124+
~/.npm/
125+
~/.pnpm-store/
126+
~/.yarn/cache/
127+
```
128+
129+
### General Caches
130+
```
131+
~/Library/Caches/
132+
~/.cache/
133+
```
134+
135+
---
136+
137+
## 🔒 Constraints & Risks
138+
139+
### Safety Requirements:
140+
- ⚠️ **KHÔNG được xóa** nếu user chưa confirm
141+
- ⚠️ **KHÔNG được** xóa system directories
142+
- ⚠️ Phải có **dry-run** mode mặc định
143+
- ⚠️ Log tất cả actions để recover nếu cần
144+
145+
### Technical Constraints:
146+
- Binary size < 20MB (lý tưởng < 10MB)
147+
- Scan performance: < 5s cho ~100 projects
148+
- Memory usage: < 100MB
149+
150+
---
151+
152+
## 📊 Đánh Giá & Phản Hồi
153+
154+
### Các câu hỏi cần feedback:
155+
156+
1. **Platform scope:** Chỉ macOS hay cần Windows/Linux?
157+
2. **UI preference:** TUI đủ hay cần Desktop GUI?
158+
3. **Tech stack:** Go vs Rust vs TypeScript?
159+
4. **Additional folders:** Còn thư mục nào cần clean?
160+
5. **Distribution:** Homebrew đủ hay cần kênh khác?
161+
162+
---
163+
164+
### Phần dành cho reviewer:
165+
166+
**Reviewer:** _______________
167+
**Ngày review:** _______________
168+
169+
| Mục | Approve | Cần sửa | Ghi chú |
170+
| ------------------- | ------- | ------- | ------- |
171+
| Mục tiêu chính ||| |
172+
| Platform support ||| |
173+
| MVP features ||| |
174+
| Tech stack ||| |
175+
| Safety requirements ||| |
176+
177+
**Nhận xét chung:**
178+
179+
```
180+
[Ghi nhận xét tại đây]
181+
```
182+
183+
---
184+
185+
## 📎 Tài Liệu Liên Quan
186+
187+
- [RESEARCH-CLI-DISTRIBUTION.md](./RESEARCH-CLI-DISTRIBUTION.md) - Research về đóng gói & phân phối

0 commit comments

Comments
 (0)