Skip to content

feat(cc-metrics): send monthly revenue and active project count to cc - #55

Merged
brekarta-stack merged 1 commit into
mainfrom
feat/cc-metrics
Dec 2, 2026
Merged

brekarta-stack merged 1 commit into
mainfrom
feat/cc-metrics

Conversation

@brekarta-stack

Copy link
Copy Markdown
Owner

무엇

cc(업무 관제) 「방향」 화면의 페이퍼크래프트 칸에 매출과 진행 중인 프로젝트 수가 보이도록, 하루 한 번 합계를 cc 의 지표 연결로 보낸다(2026-12-02 대표님 요청).

  • GET|POST /api/cron/cc-metrics — Vercel 크론 매일 03:10 KST. CRON_SECRET 또는 맥 작업자 토큰으로만 열린다. cc 스위치 cc-metrics 로 끌 수 있다.
  • 보내는 값: 지난해 1월 ~ 이번 달의 달마다 매출(summarizeMonth().revenue — 공급가액, 납기 달, 취소 제외. 관리자 화면과 같은 숫자), 이번 달 칸의 진행 수(/admin/quotes 의 「진행 중 N건」).
  • 고객 이름·주문 같은 낱건 자료는 보내지 않는다. 연결 열쇠는 환경변수 CC_METRICS_KEY 에만 둔다.

확인

  • node --test tests/cc-metrics.test.mjs tests/cron-switch.test.mjs 통과, npx tsc --noEmit 통과.
  • 전체 npm test 의 실패 2건(formatKstDateTime, fmtDateKo)은 main 과 같은 파일에서 나는 날짜 형식 차이로 이 변경과 무관하다.

문서: docs/cc-metrics.md

🤖 Generated with Claude Code

… once a day

A daily cron (03:10 KST) posts last year's and this year's monthly revenue
(same numbers as the admin settlement: supply amount, by due month, cancelled
excluded) and the current number of active quotes to the cc metrics
connection. Totals only; the connection key lives in CC_METRICS_KEY.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
actioncraft-web Ready Ready Preview Dec 2, 2026 6:46am UTC

Request Review

@brekarta-stack
brekarta-stack merged commit 4592966 into main Dec 2, 2026
2 of 3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 1a4ec3c1 Deployed Dec 2, 2026 by vercel[bot]
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