Hyungi Ahn 3c41a4cab1 fix(study): Notability 수준 필기감 + 연속 stroke race 방어
필기감:
- perfect-freehand 재도입 (effect race 제거됐으니 안전)
  - thinning 0.6, smoothing 0.65, streamline 0.5
  - simulatePressure false → 실제 e.pressure 반영
- outline polygon 을 quadratic bezier 로 연결 → 부드러운 곡선 (직선 segment )
- ctx.fill() anti-aliased

UI:
- 굵기 토글 (가늘게/보통/굵게) — baseSize × {0.6, 1, 1.6}
- Pencil only (touch 차단)

연속 stroke race fix:
- setPointerCapture/release 제거 → 빠른 pointerup→pointerdown race 차단
- onPointerDown 시 이전 inflight 강제 보존 (드물지만 stale 한 경우)
- pointerleave 핸들러는 inflight 가 살아있을 때만 endStroke
- endStroke: inflight 없으면 즉시 return, activePointerId 만 정리

이전 보고: "ㄱ 쓰고 ㅏ 바로 쓰면 ㅏ 가 입력 안됨" 핵심 원인은 stale
pointerleave 가 두번째 stroke 를 강제 종료시킨 것. 위 race fix 로 해결.
2026-04-27 10:12:18 +09:00

hyungi_Document_Server

Self-hosted 개인 지식관리(PKM) 웹 애플리케이션

기술 스택

  • 백엔드: FastAPI + SQLAlchemy (async)
  • 데이터베이스: PostgreSQL 16 + pgvector + pg_trgm
  • 프론트엔드: SvelteKit
  • 문서 파싱: kordoc (HWP/HWPX/PDF → Markdown)
  • AI: Qwen3.5-35B-A3B (MLX), nomic-embed-text, Claude API (폴백)
  • 인프라: Docker Compose, Caddy, Synology NAS

주요 기능

  • 문서 자동 분류/태그/요약 (AI 기반)
  • 전문검색 + 벡터 유사도 검색
  • HWP/PDF/Markdown 문서 뷰어
  • 법령 변경 모니터링 (산업안전보건법 등)
  • 이메일 자동 수집 (MailPlus IMAP)
  • 일일 다이제스트
  • CalDAV 태스크 연동 (Synology Calendar)

Quick Start

git clone https://git.hyungi.net/hyungi/hyungi_document_server.git hyungi_Document_Server
cd hyungi_Document_Server

# 인증 정보 설정
cp credentials.env.example credentials.env
nano credentials.env  # 실제 값 입력

# 실행
docker compose up -d

http://localhost:8000/docs 에서 API 문서 확인

디렉토리 구조

├── app/              FastAPI 백엔드 (API, 워커, AI 클라이언트)
├── frontend/         SvelteKit 프론트엔드
├── services/kordoc/  문서 파싱 마이크로서비스 (Node.js)
├── gpu-server/       GPU 서버 배포 (AI Gateway)
├── migrations/       PostgreSQL 스키마
├── docs/             설계 문서, 배포 가이드
└── tests/            테스트 코드

인프라 구성

서버 역할
Mac mini M4 Pro Docker Compose (FastAPI, PostgreSQL, kordoc, Caddy) + MLX AI
Synology NAS 파일 원본 저장, Synology Office/Drive/Calendar/MailPlus
GPU 서버 AI Gateway, 벡터 임베딩, OCR, 리랭킹

문서

S
Description
No description provided
Readme 14 MiB
Languages
Python 67.5%
Svelte 22.7%
Swift 5.2%
TypeScript 3.2%
Shell 0.5%
Other 0.9%