1.9 KiB
1.9 KiB
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 recreateExpirannersubfolder) - 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 (
DataScannerViewControllerorVNDocumentCameraViewController).
- OCR & Recording Flow:
- Capture product label via camera.
- Extract Korean text using
Visionframework (VNRecognizeTextRequest). - Show a popup with thumbnail and extracted text.
- Popup must have [재촬영] (Recapture - returns to camera) and [적용] (Apply - opens date picker).
- Extracted text must be editable in the popup.
- Date picker must restrict selection to the currently viewed month only.
- Provide Haptic Feedback (vibration) upon saving data.
- Automatically return to the Camera Scanner immediately after saving.
- Provide an [X] button to exit scanner and return to Main View.
3. Data Model (SwiftData)
- Always use
@Modelfor data structure. - Never add unnecessary metadata fields unless specified.
import Foundation
import SwiftData