42 lines
1.9 KiB
Markdown
42 lines
1.9 KiB
Markdown
# Expiranner Project Rules
|
|
|
|
## 1. Project Environment
|
|
- Project Name: Expiranner
|
|
- Root Folder: Expiranner (All operations must run from this root)
|
|
- Subfolder: `IOS` (The main iOS project folder; do NOT recreate `Expiranner` subfolder)
|
|
- Framework: SwiftUI
|
|
- Local Storage: SwiftData (Do NOT use Core Data)
|
|
- Language: Korean (All UI and logs must be in Korean)
|
|
- Target: iOS 17+ (Required for SwiftData and VisionKit Revision 3)
|
|
- Purpose: Personal use (Do NOT implement complex UI/UX designs, animations, or styling unless explicitly requested. Focus ONLY on functional logic)
|
|
|
|
## 2. Core Features & UX Flow
|
|
- Main View (Calendar):
|
|
- Must include a Year Picker at the top.
|
|
- Must show months (1-12) as a grid or list.
|
|
- Tapping a month opens a calendar for that month.
|
|
- Tapping a day shows a list of saved product items.
|
|
- Saved items must support swipe-to-delete.
|
|
- Saved items must support date modification (moving to another Year/Month/Day).
|
|
- Floating Action Button (FAB):
|
|
- Must exist on the calendar view to start recording.
|
|
- Opens full-screen Camera Scanner (`DataScannerViewController` or `VNDocumentCameraViewController`).
|
|
- OCR & Recording Flow:
|
|
1. Capture product label via camera.
|
|
2. Extract Korean text using `Vision` framework (`VNRecognizeTextRequest`).
|
|
3. Show a popup with thumbnail and extracted text.
|
|
4. Popup must have [재촬영] (Recapture - returns to camera) and [적용] (Apply - opens date picker).
|
|
5. Extracted text must be editable in the popup.
|
|
6. Date picker must restrict selection to the currently viewed month only.
|
|
7. Provide Haptic Feedback (vibration) upon saving data.
|
|
8. Automatically return to the Camera Scanner immediately after saving.
|
|
9. Provide an [X] button to exit scanner and return to Main View.
|
|
|
|
## 3. Data Model (SwiftData)
|
|
- Always use `@Model` for data structure.
|
|
- Never add unnecessary metadata fields unless specified.
|
|
|
|
```swift
|
|
import Foundation
|
|
import SwiftData
|