Skip to content

feat(inquiry): backend foundation for sirsoft-inquiry module (Plan 1/4)#42

Open
RYANHEO86 wants to merge 81 commits into
gnuboard:mainfrom
RYANHEO86:feature/sirsoft-inquiry-foundation
Open

feat(inquiry): backend foundation for sirsoft-inquiry module (Plan 1/4)#42
RYANHEO86 wants to merge 81 commits into
gnuboard:mainfrom
RYANHEO86:feature/sirsoft-inquiry-foundation

Conversation

@RYANHEO86
Copy link
Copy Markdown

Summary

  • 신규 모듈 sirsoft-inquiry (제작의뢰)의 백엔드 도메인 기반(Plan 1/4) 구현. API 컨트롤러·프론트 화면·결제 브리지·알림은 Plan 2-4 범위.
  • 도메인 자산 — 5 테이블(inquiries/inquiry_quotes/inquiry_quote_items/inquiry_messages/inquiry_attachments) + 4 enum + 3 exception + 2 event + 5 Eloquent model + 4 repository pair + 시스템 메시지 lang(ko/en).
  • 핵심 서비스 — InquiryStateMachine (7 합법 전이 + 2 불법 거부, 트랜잭션 안에서 시스템 메시지 자동 삽입 + InquiryStatusTransitioned 이벤트 dispatch), InquiryAttachmentStorage (mime/사이즈 정책 검증), InquiryPolicy (권한 매트릭스).
  • 모듈 패턴 — BaseModuleServiceProvider 상속, module:install/module:activate 흐름. php artisan migrate 와 분리되어 ModuleManager::runMigrations() 가 처리.

Documentation

  • Spec: docs/superpowers/specs/2026-05-20-제작의뢰-design.md
  • Plan: docs/superpowers/plans/2026-05-21-제작의뢰-backend-foundation.md

Test Plan

  • php artisan test --filter="Modules\\\\Inquiry"31 tests, 78 assertions all pass
    • ModuleBootstrapTest × 3 — ServiceProvider 해석·config 머지·module identifier
    • EnumsTest × 3 — 4 enum 값 검증 + InvalidStateTransitionException 메시지
    • ModelRelationshipTest × 8 — Eloquent 관계 + 4 Repository CRUD/issue/expire/append/appendSystem
    • StateMachineTest × 8 — issue_quote/revoke/reject/accept_and_pay/mark_paid_offline/mark_completed/cancel + 2 불법 전이 거부
    • AttachmentStorageTest × 3 — mime 화이트리스트·사이즈 상한·저장
    • PolicyTest × 5 — owner/operator/non-owner 권한 매트릭스 (프로젝트의 자체 Role/Permission 시스템과 호환)
  • 운영 DB에서 php artisan module:install sirsoft-inquiry 동작 확인
  • Plan 2 (API + 사용자 프론트) 진입 전 회귀 검증

Follow-ups (this PR 범위 밖)

  • Plan 2 — Public API 컨트롤러 + 의뢰 CRUD + 메시지/첨부 엔드포인트 + /inquiry/* 사용자 화면
  • Plan 3 — 견적 발행·수락·InquiryPaymentBridge (sirsoft-ecommerce 연동) + 어드민 화면
  • Plan 4 — 알림 클래스 + 이메일 템플릿 + orphan attachment cleanup + E2E

🤖 Generated with Claude Code

RYANHEO86 and others added 30 commits May 20, 2026 09:55
별도 모듈 sirsoft-inquiry v1 설계 — 1:N 운영자 수주형 제작의뢰의
접수·견적·진행·완료 전체 라이프사이클을 한 도메인 모듈에 담는다.
표준 4단계 상태머신, 구조화된 견적(version immutable), sirsoft-ecommerce
결제 선택적 의존, 채팅형 메시지 스레드, 인앱+이메일 알림 포함.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Plan 1/4 of the sirsoft-inquiry rollout — 26 TDD tasks covering
module scaffold, migrations, models, enums, repositories, state
machine, attachment storage, and policy. API controllers, frontend,
quote/payment bridge, and notifications are scheduled for Plans 2-4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eview

Pre-execution sanity check revealed that this project's module system
differs from the assumptions baked into Plan 1:

- BaseModuleServiceProvider::register/boot already handle migrations,
  translations, and repository binding. Subclasses only declare arrays.
- Module migrations run via ModuleManager (php artisan module:install /
  module:activate), NOT via `php artisan migrate`.
- Translations auto-load from src/lang.

Updated Pre-check, Task 2 (ServiceProvider skeleton), Task 3 (config
merge in register), and added Appendix A/B so implementer and reviewers
share a single source of truth on these patterns.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t/offline/complete/cancel)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lan 2/4)

Plan 2/4 — 21 TDD tasks covering Public REST API (9 routes), 3 frontend
composites (StatusBar / Card / MessageThread), and 3 user-facing
layouts (index / new / show + cancel modal partial). Quote accept/pay,
admin screens, and notifications are scheduled for Plans 3-4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
RYANHEO86 and others added 30 commits May 22, 2026 01:11
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cel)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ommerce tables

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…4 — final)

Plan 4/4 — 10 TDD tasks covering 7 Notification classes (extending
App\Notifications\BaseNotification with HookManager filter channels),
2 event-subscribing Listeners (status transitions + new messages),
channel filter registration, orphan attachment cleanup command with
hourly schedule, and Notification::fake() E2E verification tests.
v1 lifecycle becomes complete with this plan.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a navigation link to /inquiry in both the desktop Header user
dropdown (after Wishlist) and the mobile drawer's user menu, so logged-in
users can reach their inquiry list from any page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The plan-generated routes used "auth: true" and layouts declared
"permissions: [auth]", but the actual route schema uses "auth_required"
and "permissions" should remain empty for auth-only pages — auth is
enforced at the route level. Without this fix, all /inquiry pages
returned 403 "필요 권한: auth".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- _overlay_header.json (home), _subpage_header.json (theme): set
  "제작의뢰" menu item href to "/inquiry"
- _hero.json: set "세팅 제작의뢰" CTA card href to "/inquiry/new"
  (also reconnects "테마 둘러보기" to "/board/theme")
- inquiry/{index,new,show}.json: hide default header/footer, wrap content
  in .aict-home with subpage_header + aict_footer partials — same pattern
  as themes_show, so /inquiry/* now shares the same chrome as theme pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… /inquiry pages

Matches the board/themes page-hero pattern from ThemeListSection. Each
inquiry page gets contextual copy:
- index: "My Inquiries" / "내 제작의뢰" + summary lead
- new: "New Inquiry" / "새 제작의뢰" + guidance lead, breadcrumb back to list
- show: "Inquiry Detail" / dynamic title from inquiry.data.title, breadcrumb
  back to list, lead shows category/budget/due-date when present

Removes the redundant H1 from index/new bodies since the hero now carries
the page title. The "새 의뢰 작성" CTA on index moves to right-aligned.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant