You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(web): Phase 1.5.3 로그인 UX 개선 및 core 브라우저 엔트리 분리
- LoginView: 로그인 실패/잠금/세션 만료 UX 구현
- 실패 메시지를 Sign in 버튼 아래 인라인 텍스트로 표시
- 세션 만료 알림도 버튼 아래로 이동
- 5회 실패 시 30분 잠금 (Alert 유지), 3회부터 임박 경고
- 잠금 시 폼 전체 disabled 처리
- ForgotPasswordView: 경로 선택 → 이메일 / 관리자 토큰 두 갈래로 전면 재구성
- 관리자 토큰 경로: 이메일 + 토큰 쌍 검증 구조 추가
- 이메일 경로: 전송 완료 화면 유지
- 복구 완료 시 onRecovered 콜백으로 로그인 화면 복귀
- main.tsx: Mock 계정 시스템 도입
- 이메일+비밀번호 세트로 계정 정의 (admin@/user@)
- 로그인 시 계정에 따라 관리자 역할 자동 적용
- packages/core: 브라우저 전용 엔트리포인트 분리
- @fieldstack/core/browser — types/utils만 export (Node.js 의존성 없음)
- Vite 번들링 시 jsonwebtoken 등 포함으로 인한 오류 해결
- ChangePasswordView import를 /browser 경로로 변경
- 문서: CLAUDE.md, AGENTS.md, roadmap 01 업데이트
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
This file provides high-signal, repo-specific guidance for AI agents working in the Fieldstack repository. Read this before taking action to avoid architectural mistakes.
4
4
5
5
## Project Status & Environment
6
-
-**Current Phase**: Phase 1.5 in progress. Core UI Shell is running but mostly mocked. Backend API endpoints are largely unimplemented.
6
+
-**Current Phase**: Phase 1.5 in progress (2026-04-14). Phase 1.9 complete (API server, DB layer, auth backend, shared link core). Phase 1.5.3 login UX complete.
7
7
-**Workspace**: `pnpm` workspace with `node-linker=hoisted`.
8
8
-**References**: Check `CLAUDE.md` and `docs/v2_FINANCIAL-LEDGER/` for phase-specific checklists and design tokens.
9
9
@@ -28,14 +28,19 @@ This file provides high-signal, repo-specific guidance for AI agents working in
28
28
### Frontend (`apps/web`)
29
29
-**Hash Routing**: Uses Hash-based routing (`#login`, `#home`, `#admin`) managed by a custom state machine in `apps/web/src/main.tsx` (`effectiveRoute`).
30
30
-**Auth State**: Authentication and session state are persisted in `sessionStorage` using the `fs_` prefix (e.g., `fs_auth`, `fs_admin`).
31
-
-**Dev Mocks**: When testing auth UI locally, use `otp1234` for the OTP flow and `temp1234` for the force-password-change flow.
31
+
-**Dev Mock Accounts**: `admin@fieldstack.dev` / `Admin1234!` (admin role), `user@fieldstack.dev` / `User1234!` (regular user). Special passwords work for any email: `otp1234` → OTP flow, `temp1234` → force password change flow.
32
+
-**`@fieldstack/core` import rule**: Web app must always import from `@fieldstack/core/browser`, never from `@fieldstack/core` directly. The default entry pulls in Node.js-only packages (jsonwebtoken, bcryptjs, otplib) which break Vite bundling. The `/browser` entry exports only browser-safe modules (types, utils).
32
33
33
34
### Backend (`apps/api`)
34
35
-**Dynamic Module Loading**: Backend modules are dynamically scanned and loaded via `apps/api/src/loader/index.ts`.
35
36
-**Module Requirements**: A backend module will only be loaded if it has a valid `module.json` manifest with `"enabled": true`.
-**CJS/ESM interop**: `apps/api` is CJS (`module: Node16`). Import types from `@fieldstack/core` using `import type ... with { "resolution-mode": "import" }`. Value imports use dynamic `import('@fieldstack/core')`.
36
40
37
41
### Shared & UI Packages
38
42
-**`packages/controls`**: All P0/P0.5 components are fully implemented (`ready: true`). Styled with `fs-` prefixed CSS classes and design tokens. Use `@fieldstack/controls` in `apps/web` — do not write inline component styles in views.
43
+
-**`packages/core`**: Has two entry points — `@fieldstack/core` (full, server-only) and `@fieldstack/core/browser` (browser-safe subset). Always use the correct entry for the target environment.
39
44
-**Inter-module Communication**: Direct module-to-module imports are strictly forbidden. All cross-module communication must use the Event Bus.
-**개발 mock 특수 비밀번호**: `otp1234` → OTP 플로우, `temp1234` → 강제 비밀번호 변경 플로우 (어떤 이메일이든 동작)
65
+
-**`@fieldstack/core` import 규칙**: 웹 앱(`apps/web`)에서는 반드시 `@fieldstack/core/browser`로 import. `@fieldstack/core` 직접 import는 Node.js 전용 패키지(jsonwebtoken 등)를 끌어들여 Vite 번들링 오류 발생.
0 commit comments