Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
53698fb
feat: AI 답안 인식 시스템 초기 구현
Downy-newlearner Aug 31, 2025
a82c5d2
refactor: AI 서비스 FastAPI 구조 재설계 및 문서화
Downy-newlearner Aug 31, 2025
3e77a6c
feat: section_crop.py 경로 수정 및 사용 설명서 추가
Downy-newlearner Sep 4, 2025
ec8ec99
feat: Flutter 앱 초기 구조 및 로그인 관련 페이지 구현
Downy-newlearner Sep 27, 2025
3da036e
feat: AI 모델 및 Flutter 빌드 파일 추가
Downy-newlearner Sep 27, 2025
bf0a8e9
fix: 모든 스크린 오버플로우 및 텍스트 잘림 문제 해결
Downy-newlearner Sep 27, 2025
5eb23f2
feat: section_crop.py 수정 및 이미지 파일 추가, 불필요한 파일 제거
Sep 27, 2025
c7e872a
feat: AI detection model 및 Cursor 규칙 추가
Downy-newlearner Sep 30, 2025
b5989f6
feat: YOLOv8 추론 파라미터 명시적 설정 (imgsz=2048, conf=0.25, iou=0.7, max_det=…
Downy-newlearner Sep 30, 2025
d9dd29a
Add files via upload
minyujin03 Sep 30, 2025
9889690
feat: 라우팅 기반 YOLOv8 추론 시스템 구현 및 실험 결과 추가
Downy-newlearner Sep 30, 2025
edcf7cf
chore(gitignore): ignore .cursor/ to keep cursor rules local
Downy-newlearner Oct 3, 2025
70bfea6
feat: Flutter 프론트엔드 로그인/회원가입 기능 개선 및 AI 모델 추가
Downy-newlearner Oct 4, 2025
dba8b59
feat: Detection Model Routing 구현 및 모델 성능 개선
Downy-newlearner Oct 4, 2025
8acd963
chore: .cursor/ 디렉터리 gitignore 설정 추가
Downy-newlearner Oct 4, 2025
e3bcfea
feat: section_crop.py 응용(추론 코드와 연결 & 추론 코드도 수정)
Oct 9, 2025
5a5c13c
feat: section_crop.py 응용(추론 코드와 연결 & 추론 코드도 수정)
Oct 9, 2025
2f8637c
[test] OCR/CNN 테스트용 Annotation 폴더 추가
yrc00 Oct 11, 2025
bb8cb42
Feat: page_number.txt 수정
Oct 11, 2025
d125c58
[test] problem_number annotation
yrc00 Oct 11, 2025
bcebba6
Feat: 계층적 크롭 파이프라인(추후 OCR 적용 가능)
Oct 11, 2025
22b6fc9
[test] ocr 테스트
yrc00 Oct 12, 2025
934a65f
feat: 회원가입, 비밀번호/아이디 찾기, 문제집 페이지 구현 및 UI/UX 개선
Downy-newlearner Oct 12, 2025
fdcd2f2
[test] 답지 오류 수정 후 다시 테스트
yrc00 Oct 12, 2025
9c8fe0c
[refactor] 폴더 정리
yrc00 Oct 12, 2025
58ecd7a
[feat] hierarchical_crop에 ocr 코드 추가 후 테스트
yrc00 Oct 12, 2025
eea0d79
[test] answer_1, answer_2 ocr 테스트 결과
yrc00 Oct 15, 2025
03e9c57
Add files via upload
minyujin03 Oct 18, 2025
536ca2c
Delete ai-service/test/answer_1.zip
minyujin03 Oct 18, 2025
cb269d3
CNN
minyujin03 Oct 18, 2025
11652f8
Delete ai-service/test/CNN
minyujin03 Oct 18, 2025
4179e52
Add files via upload
minyujin03 Oct 20, 2025
613c436
[test] kaggle json 인식 코드 추가
yrc00 Oct 20, 2025
a9c381b
[test] 폴더명 변경
yrc00 Oct 20, 2025
dc0ed9b
test. delete kaggle.json
yrc00 Oct 20, 2025
760fe08
refactor: screens 디렉토리 구조 개선 및 폴더별 카테고라이징
Downy-newlearner Oct 25, 2025
3d2f9f0
fix: 폴더 이동 후 상대 경로 import 수정
Downy-newlearner Oct 25, 2025
f53733e
Merge pull request #6 from Downy-newlearner/feature/frontend-login-page
Downy-newlearner Oct 25, 2025
a6aed5f
feat: 마이페이지 및 설정 페이지 7개 추가
Downy-newlearner Oct 25, 2025
c24c0bd
feat: 홈 화면 v2 및 연속학습 기능 구현
Downy-newlearner Nov 4, 2025
62e9e1b
feat: Detection 모델 라우팅 Model_routing_1104 추가
Downy-newlearner Nov 4, 2025
cb6cb81
Merge branch 'feature/recognition' of https://github.com/Downy-newlea…
Downy-newlearner Nov 4, 2025
9feff4a
계층적 크롭 수정
Nov 4, 2025
a663507
추론 파일 추가 및 계층적 크롭 코드 수정
Nov 4, 2025
0a6fa03
__init__.py 추가
Nov 4, 2025
8779af3
test. yolo 테스트 코드 업데이트
yrc00 Nov 5, 2025
312dda4
[test] yolo 채점 성능 평가
yrc00 Nov 8, 2025
f332435
chore(frontend): Firebase config updates, Android/iOS build settings,…
Downy-newlearner Nov 11, 2025
e7a2d4c
refactor(ai-service): reorganize detection models structure
Downy-newlearner Nov 11, 2025
bfa0094
[test] yolo test 파이프라인 수정
yrc00 Nov 12, 2025
33773c8
feat: 사용자 정보 관리 시스템 및 API 중앙화 구현
Downy-newlearner Nov 14, 2025
3c472dd
[test] yolo_resnet 채점 성능 테스트
yrc00 Nov 14, 2025
c636792
feat: 토큰 갱신 로직 개선 및 자동 로그인 기능 구현
Downy-newlearner Nov 15, 2025
fd8257c
Add solution with llms
Nov 21, 2025
b230a91
Resolve merge conflict in .gitignore
yrc00 Nov 23, 2025
a9060ad
upstage ver solution with llm
Nov 24, 2025
50c3925
Merge branch 'feature/recognition' of https://github.com/Downy-newlea…
yrc00 Nov 24, 2025
ee06611
feat: Assessment 데이터 파싱 및 className 매칭 로직 개선
Downy-newlearner Nov 24, 2025
93feded
feat. ai server base
yrc00 Nov 24, 2025
e4b10b9
feat. update requirements.txt
yrc00 Nov 24, 2025
0ff5aa7
fea. update requirements.txt and README.md
yrc00 Nov 24, 2025
179bd8d
feat. update llm api schemas
yrc00 Nov 24, 2025
89d4749
refactor: 아키텍처 개선 및 assessment 서비스 리팩토링
Downy-newlearner Nov 29, 2025
639c795
feat: Clean Architecture 적용 및 문제집/채점 기능 구현
Downy-newlearner Dec 1, 2025
9f32f3c
feat. fastapi 수정
yrc00 Dec 2, 2025
9877962
feat. chatper.txt 수정
yrc00 Dec 2, 2025
701ada9
feat. fastapi 누락 정보 추가
yrc00 Dec 3, 2025
e5b7c73
feat: 연속학습/오늘의 학습 개선 및 문제집 새로고침 추가
Downy-newlearner Dec 3, 2025
35d5d5f
feat: 학습 완료 판단 로직 개선 및 데이터 동기화 기능 추가
Downy-newlearner Dec 6, 2025
deec46c
Merge pull request #7 from Downy-newlearner/feature/frontend-home
Downy-newlearner Dec 6, 2025
9be3dec
Merge branch 'develop' into feature/recognition
Downy-newlearner Dec 8, 2025
064a6c2
Merge pull request #8 from Downy-newlearner/feature/recognition
Downy-newlearner Dec 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
300 changes: 300 additions & 0 deletions .cursor/rules/error-collector.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
---
alwaysApply: true
description: Flutter UI Error Prevention and Layout Best Practices Guide
---

# Error Collector - Flutter UI Error Prevention Guide

## 🚨 Overflow Error Analysis (2025.09.27)

### Root Cause Analysis

#### 1. **Fixed Size Container Misuse**

```dart
// ❌ Wrong - Forcing fixed dimensions
Container(
width: 402, // Ignores device screen size
height: 874, // Ignores device screen size
child: Column(...) // Content can overflow
)
```

**Problems:**

- Ignores different device screen sizes
- Doesn't consider SafeArea, keyboard, and other dynamic elements
- Fails to calculate total height of Column children

#### 2. **Unnecessary StatusBar Widget Implementation**

```dart
// ❌ Wrong - Duplicating native functionality
const StatusBar(), // iOS/Android already provides this
```

**Problems:**

- Conflicts with platform-specific status bar styles
- Takes up unnecessary layout space
- Duplicates native SafeArea functionality

#### 3. **Layout Constraint Ignorance**

```dart
// ❌ Wrong - Non-scrollable fixed layout
Column(
children: [
// Widgets whose total height can exceed screen
Widget1(), Widget2(), Widget3()...
]
)
```

## 🛡️ Error Prevention Rules

### 1. **Layout Design Principles**

#### ✅ DO: Use Responsive Layouts

```dart
// Correct example
SingleChildScrollView(
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: MediaQuery.of(context).size.height -
MediaQuery.of(context).padding.top -
MediaQuery.of(context).padding.bottom,
),
child: Column(...)
)
)
```

#### ❌ DON'T: Fixed Size Containers

```dart
// Forbidden pattern
Container(
width: 402, // Absolute size forbidden
height: 874, // Absolute size forbidden
child: Column(...)
)
```

### 2. **SafeArea and Platform Considerations**

#### ✅ DO: Utilize Native Features

```dart
Scaffold(
body: SafeArea( // Automatically handles iOS notch, Android status bar
child: YourContent()
)
)
```

#### ❌ DON'T: Duplicate Platform Features

```dart
// Forbidden pattern - Creating StatusBar widget
const StatusBar() // iOS/Android already provides this
```

### 3. **Container Size Rules**

#### ✅ DO: Dynamic Size Calculation

```dart
Container(
width: MediaQuery.of(context).size.width * 0.85, // Screen ratio based
child: Column(
mainAxisSize: MainAxisSize.min, // Adjust size to content
children: [...]
)
)
```

#### ❌ DON'T: Arbitrary Fixed Values

```dart
Container(
width: 342, // Ignores device differences
height: 120, // Ignores content changes
)
```

### 4. **Scroll Handling Rules**

#### ✅ DO: Prevent Overflow

```dart
// When content might exceed screen
SingleChildScrollView(
child: Column(children: [...])
)

// Or use ListView
ListView(children: [...])
```

#### ❌ DON'T: Long Column Without Scroll

```dart
Column( // Overflow risk
children: [
// Many widgets...
]
)
```

### 5. **Button Structure Design Principles**

#### ✅ DO: Simple Button Structure

```dart
// Correct - Direct button implementation
SizedBox(
width: 50,
height: 50,
child: ElevatedButton(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: color,
padding: EdgeInsets.zero, // Important!
shape: RoundedRectangleBorder(...),
),
child: Icon(...),
),
)
```

#### ❌ DON'T: Double Container Structure

```dart
// Forbidden pattern - Causes button distortion
Container( // Outer container
decoration: BoxDecoration(...),
child: ElevatedButton( // Inner button - gets distorted!
child: content,
),
)
```

### 6. **Alignment and Layout Principles**

#### ✅ DO: Explicit Alignment Settings

```dart
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, // Essential!
children: [...]
)
```

#### ❌ DON'T: Missing Alignment Properties

```dart
Column( // Missing alignment causes left bias
children: [...]
)
```

### 7. **Development Workflow Principles**

#### ✅ DO: Utilize Hot Reload

```dart
// After code changes:
// 1. Save file (Cmd+S)
// 2. Press 'r' in terminal
// 3. Instantly see changes
```

#### ❌ DON'T: Unnecessary App Restarts

```dart
// Forbidden patterns:
// - Complete app shutdown and restart
// - Emulator reboot
// - flutter clean (only when necessary)
```

## 🔍 Development Checklists

### Pre-Layout Development Checklist

- [ ] Works on various screen sizes?
- [ ] Considers SafeArea?
- [ ] No possibility of content exceeding screen?
- [ ] Doesn't duplicate native features?

### Widget Implementation Prohibitions

- [ ] No fixed width/height values (without special reason)
- [ ] No platform feature reimplementation
- [ ] No screen size assumptions without MediaQuery
- [ ] No missing overflow handling in Column/Row

### Button Distortion Prevention Checklist

- [ ] No Container + ElevatedButton double structure
- [ ] Set ElevatedButton padding: EdgeInsets.zero
- [ ] Handle background/border directly in ElevatedButton.styleFrom
- [ ] Use SizedBox for size constraints, handle decoration in style

### Alignment Issue Prevention Checklist

- [ ] Specify mainAxisAlignment in Column/Row
- [ ] Always set crossAxisAlignment
- [ ] Use CrossAxisAlignment.center for center alignment
- [ ] Clearly define layout alignment intent

### Development Efficiency Checklist

- [ ] Prioritize Hot Reload (r key)
- [ ] Use Hot Restart only when state reset needed (R key)
- [ ] App restart only as last resort
- [ ] Emulator reboot only for system issues

### Testing Requirements

- [ ] Test on various device sizes
- [ ] Check layout when keyboard appears
- [ ] Test portrait/landscape mode switching
- [ ] Test long text/large data scenarios

## 📚 References

### Flutter Layout Widget Priority

1. **SingleChildScrollView** - Overflow prevention
2. **MediaQuery** - Screen size information
3. **SafeArea** - Platform-specific safe areas
4. **ConstrainedBox/Flexible/Expanded** - Dynamic size adjustment
5. **LayoutBuilder** - Parent constraint-based layout

### Debugging Tools

```dart
// Display layout boundaries during development
import 'package:flutter/rendering.dart';
debugPaintSizeEnabled = true; // Set in main()
```

## 🎯 Core Lessons

**"All UI elements must be designed responsively, considering device sizes and platform characteristics. Buttons should have simple structures, alignment should be explicit, and development should utilize Hot Reload efficiently."**

### Key Principles:

1. **No Absolute Sizes** - All sizes must be relative
2. **Respect Platforms** - Don't duplicate native functionality
3. **Prepare for Overflow** - Always consider scroll possibilities
4. **Simple Button Structure** - Avoid double container structures
5. **Explicit Alignment** - Always set crossAxisAlignment
6. **Utilize Hot Reload** - Maximize development efficiency
7. **Test First** - Verify in various environments

Follow these rules to prevent future layout errors and provide consistent user experience.
Loading
Loading