From 7ddf77c5a65512525d3d582ce609862bf2232db9 Mon Sep 17 00:00:00 2001 From: Remote55 Date: Sun, 23 Aug 2026 19:41:02 +0700 Subject: [PATCH 1/3] docs: CLAUDE.md still had a three-person team and nine days to a deadline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CLAUDE.md is loaded into every session in this repository, so its contents are not documentation - they are standing instructions. It described a project that stopped existing in August: a three-person team with a Person A and a Person B, NSC 2026 with proposal and final-report deadlines, nine days remaining, a PostgreSQL and PostGIS backend that has since been removed, RunPod GPU that was never used, and a stated preference to optimise for "ทำให้กรรมการ NSC ว้าว". That last line is the one that mattered. A standing instruction to impress competition judges, in a repository whose entire discipline is that published numbers must be re-derivable, was pulling in the opposite direction every session. It now says accuracy comes before impressiveness, and that figures come from running something rather than from memory. Rewritten to what is true: solo, no institution, no scanner, no GPU, open data only. The evidence rules that actually govern work here - sync_truth, the fail-closed gate, commit the result whatever it says, never recalibrate on the cohort you measure with. The two validation cohorts and what they do not cover. And the machine constraint, because a full test suite on this laptop costs 29 minutes and once left 93 GB of scratch behind. REBRAND, WHERE IT IS HONEST TO REBRAND CONTRIBUTING, LICENSE, the brand README and BRAND.md now say TreeQ. The logo needed nothing: both PNGs are wordless illustrations, byte-identical to what shipped under the old name, so nothing on the deployed site ever displayed "CarbonScan" and the rename cost the mark nothing. The brand README said otherwise and now says this. Deliberately NOT renamed: docs/decisions/, proposal/, docs/proposal/, AI_AGENT_CONTEXT, SESSION_HANDOFF, DEVELOPMENT_PLAN, and everything under docs/superpowers/. DOCUMENT_STATUS classifies those as historical, and an ADR whose text is edited after the fact is no longer a record of a decision. TASKS.md gets a banner instead of a rewrite. Its five phases are built around the NSC timeline, a three-person team, and a Flutter app deleted under ADR 0007; at the repository root with no banner it read as a current task list. It is now labelled historical and listed as such in DOCUMENT_STATUS. ONE THING FOUND WHILE READING AI_AGENT_CONTEXT's caution banner tells the reader to trust the manifest and then quotes Demol DBH MAE as 1.1673846154 cm, which is not what the manifest says. The body of that file is historical and stays as written; the banner is current guidance and is now correct at 0.898318. sync_truth --check ok scripts/tests 148 passed Co-Authored-By: Claude Opus 5 --- CLAUDE.md | 122 +++++++++++++++++++++++---------------- CONTRIBUTING.md | 2 +- LICENSE | 2 +- TASKS.md | 10 ++++ assets/brand/README.md | 22 ++++--- docs/AI_AGENT_CONTEXT.md | 2 +- docs/DOCUMENT_STATUS.md | 1 + docs/design/BRAND.md | 6 +- 8 files changed, 104 insertions(+), 63 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 31b2a87..1db718c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,67 +1,91 @@ -# CarbonScan AI — Working Memory +# TreeQ Carbon Platform — Working Memory > โหลดเข้า context อัตโนมัติทุกครั้งที่เปิด project นี้ +> เดิมชื่อ **CarbonScan AI** — ชื่อเก่ายังอยู่ในเอกสาร historical และใน GitHub repo slug ## Project -**CarbonScan AI** — แพลตฟอร์มประเมินคาร์บอนชีวมวลต้นไม้ด้วย LiDAR Point Cloud + AI Wood-Leaf Segmentation + B2B Carbon Offset Matchmaking -### Competition -- **NSC 2026** (National Software Contest ครั้งที่ 28) -- **หมวด 14** โปรแกรมเพื่องานการพัฒนาด้านวิทยาศาสตร์และเทคโนโลยี -- **ระดับ:** อุดมศึกษา (ปริญญาตรี) -- **Deadline ใกล้สุด:** 29 พ.ค. 2569 (Proposal) | 17 ก.ค. 2569 (Final Report) +ประเมินชีวมวล คาร์บอน และ CO₂e ของต้นไม้จาก 3D point cloud (`.ply` / `.las` / `.laz`) +พร้อม provenance ที่ตรวจสอบย้อนกลับได้ทุกตัวเลข -## Team -| Role | Person | Focus | -|---|---|---| -| **Lead / Core** | User | AI/ML, Backend (FastAPI), Team Lead | -| **Frontend** | Person A | Next.js Web Dashboard, 3D Viewer, GIS Map | -| **Design** | Person B | UI/UX (Figma), Branding, Video, Slides | +**ผลลัพธ์ไม่ใช่คาร์บอนเครดิตที่ผ่านการรับรอง** — เป็นค่าประมาณที่บอกที่มาได้ -> ⚠️ ยังไม่ได้ใส่ชื่อจริง — รอข้อมูลจาก User +## สถานะจริง (23 ส.ค. 2569) -## Tech Stack -- **Web:** Next.js 14 + TypeScript + Tailwind + shadcn/ui + Three.js + React Three Fiber + Leaflet -- **Backend:** FastAPI (Python) + PostgreSQL + PostGIS + Supabase -- **AI/ML:** numpy + scipy + scikit-image + Open3D + laspy (production path is tlsep — no GPU, no torch) -- **Cloud:** Vercel (Web) + Railway (API) + RunPod Serverless GPU + Supabase +- **NSC 2026 ไม่ผ่าน** — ไม่ใช่กรอบการทำงานอีกต่อไป +- **ทำคนเดียว** ไม่มีอาจารย์ ไม่มีสถาบัน ไม่มี TLS scanner ไม่มี GPU +- ใช้ได้แต่ **open data** เท่านั้น +- เป้าหมายใหม่: **ถูกวิทยาศาสตร์ + ตีพิมพ์ได้ + ใช้งานได้จริง** + +## Tech Stack (เฉพาะที่ใช้จริง) + +- **Web:** Next.js 14 + TypeScript + Tailwind + Three.js — deploy บน Vercel +- **API:** FastAPI synchronous · **ไม่มี database layer** (ถอดออกแล้ว ดู `docs/DATABASE_TEARDOWN.md`) +- **ML:** numpy + scipy + scikit-image + laspy · **ไม่มี GPU ไม่มี torch ในเส้นทาง production** +- **Auth/Storage:** Supabase ## Key Architecture Decisions -1. **รับ point cloud จากเครื่องสแกนอย่างเดียว** (.ply / .las / .laz) — เส้นทางถ่ายด้วยโทรศัพท์ - (COLMAP/OpenMVS) ถูกตัดออกเมื่อ 9 ส.ค. 2569 พร้อมแอป Flutter: gate ยังตอบ BLOCKED - และไม่เคยพิสูจน์ว่าภาพถ่ายลำต้นจริงให้จุดพอ fit วงกลมที่ 1.3 ม. ได้ไหม - ทิศทางคือทำเส้นทางที่ใช้ได้จริงให้แม่น แทนที่จะขยายไปเส้นทางที่ยังไม่รู้ว่าเป็นไปได้ -2. **ไม่ต้องใช้ GPU** — wood/leaf backend ที่ใช้จริงคือ tlsep (PCA บน KD-tree) -3. **Cloud GPU On-demand** — RunPod Serverless แทนซื้อ Workstation -4. **Open-Source First** — ทุก component ใช้ open-source ได้ -5. **Lock Scope** — Prototype รองรับต้นไม้ 3-5 ชนิด (สัก, ยางนา, ไผ่, ยางพารา, มะค่าโมง) - -## Reference Files -- `C:\Users\Acer\Downloads\Carbo.txt` — บันทึกสนทนาเดิม + 5 คำถามอาจารย์ -- `D:\Research_Project\CarbontreeNsc\Segment individual trees and compute metrics · r-lidar_lidR Wiki.pdf` — เอกสาร lidR -- `C:\Users\Acer\.claude\plans\c-users-acer-downloads-carbo-txt-d-rese-tingly-moon.md` — Strategic Plan ฉบับเต็ม - -## Critical Constraints -- **9 วัน** ถึง Deadline Proposal -- **ต้องเดินลายเซ็น** ที่ปรึกษา + คณบดี/ผอ. (ใช้เวลา 2-3 วัน ในระบบ) -- **ทีมเป็นนักศึกษา** — ไม่มีงบซื้อ Hardware แพง -- **NSC 2026 ระบบปิดอัตโนมัติ** 17:00 น. — ห้ามเลท - -## Glossary (ศัพท์ที่ใช้บ่อย) + +1. **รับ point cloud จากเครื่องสแกนเท่านั้น** — เส้นทางถ่ายภาพด้วยมือถือและแอป Flutter + ถูกลบทิ้ง 9 ส.ค. 2569 ([ADR 0007](docs/decisions/0007-drop-the-photo-path.md)) + gate ไม่เคยผ่านเพราะไม่เคยรัน และเรื่อง scale ไม่เคยถูกแก้ +2. **`tlsep` เป็น wood/leaf backend ที่ใช้จริง** — PointNet++ เป็น Experimental และถูก + evidence gate บล็อกอยู่ (verdict `FAIL_METRICS`) +3. **Chave 2014 เป็นสมการหลัก** — T-VER เป็น opt-in และยังไม่เปลี่ยนค่า default +4. **Open-source ทั้งหมด** และข้อมูล validation ต้องเป็น open data + +## กติกาที่สำคัญที่สุดของโปรเจกต์นี้ + +> **ตัวเลขทุกตัวที่เผยแพร่ ต้อง re-derive ได้จาก artefact ที่ commit ไว้** + +- `sync_truth.py --check` ผูกเอกสารเข้ากับ manifest — เอกสาร drift จากหลักฐานไม่ได้ +- `judge_demo_manifest.py check` ตรวจว่า artefact ที่เผยแพร่ยังตรงกับ pipeline ปัจจุบัน +- evidence gate ใน `provenance.py` เป็น fail-closed +- **ผลลัพธ์ที่ออกมาแย่ก็ commit** — `pointnet_independent_eval/result.json` commit ไว้ทั้งที่เป็น `FAIL_METRICS` +- **ห้าม recalibrate บน cohort ที่ใช้วัดผล** — เป็น defect เดียวกับที่ PointNet++ ถูกบล็อก + +## Validation ที่มีอยู่ + +| cohort | n | ครอบคลุม | +|---|---:|---| +| Demol 2021 (เบลเยียม เขตอบอุ่น) | 65 | geometry เท่านั้น | +| Momo Takoudjou 2018 (แคเมอรูน เขตร้อน) | 61 | geometry + **allometric กับมวลที่ชั่งจริง** | + +ตัวเลขที่ผู้ใช้ได้รับ: **DBH MAE 1.37 ซม.** (27 ต้นที่ผ่าน gate) · รายละเอียดใน +[`docs/ml/CAMEROON_EVIDENCE_CHAIN.md`](docs/ml/CAMEROON_EVIDENCE_CHAIN.md) + +**ยังไม่ validate:** ขั้น 1–4 (ยังไม่เคยทดสอบบน plot จริง) · ขั้น 5 บนต้นไม้เขตร้อน · +ขั้น 7 species classifier ยังเป็น Stub · และยังไม่เคยทดสอบกับต้นไม้ในไทย + +## ⚠️ ข้อจำกัดของเครื่องผู้ใช้ + +**โน้ตบุ๊ก Acer Predator PHN16-71 ค้างตายสนิท 12 ครั้ง** (7 ครั้งใน 24 ชม. เมื่อ 22-23 ส.ค.) +ไม่มี bugcheck ไม่มี dump ไม่มี WHEA — สงสัยฮาร์ดแวร์ ยังไม่ได้ข้อสรุป + +- **ห้ามรัน full test suite บนเครื่องนี้** (`pytest tests/` ชุดเต็มใช้ ~29 นาที และเคยทิ้ง + scratch ไว้ 93 GB จนเครื่องอืด) — ให้ GitHub Actions รับไป +- รันเฉพาะไฟล์ที่เกี่ยวข้องได้ (1–2 นาที) และบอกล่วงหน้าเสมอถ้าจะรันอะไรหนัก +- คู่มือแก้ปัญหา: artifact "Predator Freeze Triage" + +## Glossary + | Term | Meaning | |---|---| -| **DBH** | Diameter at Breast Height — เส้นผ่านศูนย์กลางลำต้นที่ระดับอก (1.3 ม.) | +| **DBH** | Diameter at Breast Height — เส้นผ่านศูนย์กลางลำต้นที่ 1.3 ม. | | **QSM** | Quantitative Structure Model — โมเดลทรงกระบอกคำนวณปริมาตรไม้ | | **CHM** | Canopy Height Model | | **TLS** | Terrestrial Laser Scanning | -| **TGO** | องค์การบริหารจัดการก๊าซเรือนกระจก (Thailand Greenhouse Gas Management Organization) | -| **Allometric** | สมการแอลโลเมตริก แปลง dimension ของต้นไม้ → biomass | -| **CBAM** | Carbon Border Adjustment Mechanism (EU Carbon Tax) | +| **TGO / อบก.** | องค์การบริหารจัดการก๊าซเรือนกระจก | +| **T-VER** | โครงการลดก๊าซเรือนกระจกภาคสมัครใจของไทย · `T-VER-S-TOOL-01-01` คือคู่มือคำนวณคาร์บอนต้นไม้ | +| **Allometric** | สมการแปลง dimension ของต้นไม้ → biomass | +| **Chave 2014** | สมการ pantropical ที่ใช้เป็นเส้นทางหลัก | | **ITD** | Individual Tree Detection | -| **NEON** | National Ecological Observatory Network (USA — มี LiDAR Open Data) | ## Preferences -- ตอบเป็นภาษาไทย (แต่ technical terms ใช้ EN ได้) -- โฟกัสที่ "ทำให้กรรมการ NSC ว้าว" — Deep Tech + Visual storytelling -- หลีกเลี่ยง Over-engineer — Prototype ที่ทำเสร็จดีกว่า Vision ที่สมบูรณ์แต่ไม่เสร็จ -- ทุก decision ที่มีค่าใช้จ่าย ให้พิจารณาว่า "นักศึกษาจ่ายไหวไหม" + +- **ตอบเป็นภาษาไทย** (technical terms ใช้ EN ได้) +- **ความถูกต้องมาก่อนความน่าประทับใจ** — กรอบ "ทำให้กรรมการว้าว" เลิกใช้แล้ว +- ตัวเลขที่พูดต้องมาจากการวัด ไม่ใช่ความจำ — **รันแล้วดู อย่าอ่านแล้วเดา** +- commit message บอกว่า *อะไรผิด* ไม่ใช่ *เพิ่มอะไร* +- **ไม่มี non-ASCII ใน Python source** (console เป็น cp874 — UnicodeEncodeError ทำให้ process ตาย) + เอกสาร markdown เป็นภาษาไทยได้ตามปกติ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4512074..31b6e04 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to CarbonScan AI +# Contributing to TreeQ Carbon Platform > ขอบคุณที่สนใจร่วมพัฒนาโปรเจกต์ NSC 2026 กับเรา! เอกสารนี้สรุปวิธีการ contribute, code conventions และ workflow ของทีม diff --git a/LICENSE b/LICENSE index b722cdf..a5d486c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 CarbonScan AI Team +Copyright (c) 2026 TreeQ Carbon Platform Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/TASKS.md b/TASKS.md index 255bdd8..f9305b6 100644 --- a/TASKS.md +++ b/TASKS.md @@ -1,5 +1,15 @@ # CarbonScan AI — Task List +> [!CAUTION] +> **Historical — the plan this tracked ended on 23 August 2026.** ทุก phase ในไฟล์นี้ +> สร้างรอบไทม์ไลน์ NSC 2026 ซึ่ง**ไม่ผ่าน** และทีมสามคนที่ตอนนี้เหลือคนเดียว +> Phase 3 เป็นงาน Flutter ที่ถูกลบทิ้งไปแล้วตาม [ADR 0007](docs/decisions/0007-drop-the-photo-path.md) +> +> เก็บไว้เพื่อ trace ว่าอะไรถูกวางแผนและอะไรทำจริง — **ห้ามใช้เป็นรายการงานปัจจุบัน** +> งานที่ทำอยู่จริงดูที่หัวข้อ "งานถัดไป" ใน [`README.md`](README.md) + +**บริบทเดิม ณ เวลาที่เขียน:** + > **Project:** CarbonScan AI — NSC 2026 (หมวด 14 อุดมศึกษา) > **Deadline ใกล้สุด:** 29 พ.ค. 2569 17:00 น. — **เหลือ 7 วัน** > **ทีม:** User (Core/Lead), Person A (Web), Person B (Design) diff --git a/assets/brand/README.md b/assets/brand/README.md index aaa2367..dbfc606 100644 --- a/assets/brand/README.md +++ b/assets/brand/README.md @@ -1,8 +1,13 @@ -# Brand Assets — CarbonScan AI +# Brand Assets — TreeQ Carbon Platform -> Official brand assets for the CarbonScan AI project (NSC 2026 หมวด 14) +> Brand assets for TreeQ Carbon Platform, formerly CarbonScan AI. > -> **Owner:** Person B (Designer) — primary author of the logo + brand identity +> **The mark carries no wordmark**, so the rename cost it nothing — `logo.png` is +> byte-identical to what shipped under the old name, and nothing on the deployed +> site displays the old one. What follows is the description catching up. +> +> **Owner:** was Person B (Designer) on the three-person NSC team. The project is +> now one person, and no designer is producing the variants listed below. --- @@ -21,7 +26,7 @@ Web-deployed copy: ## Logo Concept -The logo represents the **complete CarbonScan AI value proposition** in a single illustration: +The logo represents what the project set out to be, in a single illustration: | Visual Element | Meaning | |---|---| @@ -58,9 +63,10 @@ These align with the brand tokens defined in [`packages/design-tokens/`](../../p - **Footer logo** (size: 28×28 px) — `src/app/page.tsx` footer - **Social share preview** (OG image) — via `metadata.openGraph.images` and `metadata.twitter.images` -### Mobile App (`apps/mobile/`) -- TODO Phase 1: copy to `apps/mobile/assets/icons/app_icon.png` -- Used for Android launcher icon + iOS app icon + splash screen +### ~~Mobile App~~ +`apps/mobile/` was deleted on 9 August 2026 under +[ADR 0007](../../docs/decisions/0007-drop-the-photo-path.md). No launcher icon, +no splash screen, nothing to copy. ### Proposal Document (`proposal/`) - Cover page (full size) @@ -81,7 +87,7 @@ The single PNG works for Web/Mobile but Phase 1 will need: | **SVG** version | Scalable for any size (favicons, print) | SVG | | **Monochrome** (single color, Forest Green) | For watermarks, low-color print, letterheads | PNG + SVG | | **Reversed** (white on dark) | For dark mode UI, dark slide backgrounds | PNG + SVG | -| **Wordmark** (logo + "CarbonScan AI" text) | For wide layouts, headers | PNG + SVG | +| **Wordmark** (logo + "TreeQ" text) | For wide layouts, headers | PNG + SVG | | **Mark only** (no background) | For tight contexts where the circle frame is too much | PNG + SVG | | **Favicon ICO** (multi-res 16/32/48 px) | Legacy browser tabs | ICO | | **App icon PNG** (1024×1024 + 512×512 + 180×180) | iOS App Store, Android Play | PNG | diff --git a/docs/AI_AGENT_CONTEXT.md b/docs/AI_AGENT_CONTEXT.md index 4b4e41d..dd0b9a0 100644 --- a/docs/AI_AGENT_CONTEXT.md +++ b/docs/AI_AGENT_CONTEXT.md @@ -4,7 +4,7 @@ > **Historical context — superseded 2026-07-16.** ห้ามใช้ไฟล์นี้เป็นสถานะปัจจุบันหรือแหล่งตัวเลขสำหรับรายงาน > ให้ยึด `docs/evidence/core_demo_manifest.json`, `docs/PROJECT_SPEC.md` และ > `docs/CAPABILITY_MATRIX.md`: `tlsep` = Implemented default, PointNet++ = Experimental/not promoted, -> Wan Wood/Leaf/Mean IoU = `0.418/0.808/0.613`, Demol DBH MAE = `1.1673846154 cm`, +> Wan Wood/Leaf/Mean IoU = `0.418/0.808/0.613`, Demol DBH MAE = `0.898318 cm`, > Species Classification = Stub, งาน WebSocket/GIS/Marketplace/production RunPod = Planned. > **จุดประสงค์:** ให้ AI agent (context ใหม่) เข้าใจโปรเจค + สถานะล่าสุด + งานที่เหลือ ได้ทันทีจากไฟล์เดียว diff --git a/docs/DOCUMENT_STATUS.md b/docs/DOCUMENT_STATUS.md index 2b59a07..0fcdf3a 100644 --- a/docs/DOCUMENT_STATUS.md +++ b/docs/DOCUMENT_STATUS.md @@ -32,6 +32,7 @@ requires a separate reviewed default-switch decision. - `docs/AI_AGENT_CONTEXT.md`, `docs/SESSION_HANDOFF.md`, `docs/DEVELOPMENT_PLAN.md`, `docs/P1_SPRINT_PLAN.md` - `docs/DATASET_REQUEST.md`, `proposal/outline.md`, `docs/proposal/`, `proposal/5-questions-answers.md` +- `TASKS.md` — ทุก phase สร้างรอบไทม์ไลน์ NSC 2026 ที่ไม่ผ่าน และทีมสามคนที่เหลือคนเดียว - `docs/superpowers/plans/`, `docs/superpowers/specs/`, `docs/decisions/`, `docs/learning/` คำว่า WebSocket, RunPod, GIS, Marketplace, full TreeQSM, ResNet หรือ metric ที่ปัดเศษในเอกสารกลุ่มนี้อาจเป็น historical target ไม่ใช่ current capability diff --git a/docs/design/BRAND.md b/docs/design/BRAND.md index b539ea7..bc6ca26 100644 --- a/docs/design/BRAND.md +++ b/docs/design/BRAND.md @@ -6,7 +6,7 @@ ## Brand Essence -**CarbonScan AI = "Forest meets Code"** +**TreeQ Carbon Platform = "Forest meets Code"** (เดิมชื่อ CarbonScan AI) เราคือ Climate FinTech ที่: - เคารพธรรมชาติ (Forest) @@ -32,8 +32,8 @@ | 🟢 Gradient เขียว→ฟ้า (วงนอก) | Nature → Technology | ### Wordmark -- Font: **Space Grotesk Bold** สำหรับ "CarbonScan" -- "AI" ใช้สีเขียว forest-500 เพื่อสะดุดตา +- Font: **Space Grotesk Bold** สำหรับ "TreeQ" +- "Q" ใช้สีเขียว forest-500 เพื่อสะดุดตา - ใช้คู่กับ mark เมื่อพื้นที่กว้าง ### Variants (ที่จะทำใน Phase 1) From 9121e90962fff4e58253ea5d496cdf97dba5cadf Mon Sep 17 00:00:00 2001 From: Remote55 Date: Sun, 23 Aug 2026 19:51:02 +0700 Subject: [PATCH 2/3] fix(web): the site still offered a backend that was removed two commits ago MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing NEXT_PUBLIC_API_URL from production was the right call - it stopped the site pointing at a Cloudflare tunnel that no longer resolved. What it did not do was tell the copy. Three places went on describing a flow that cannot happen. The landing hero invited a visitor to upload a point cloud and get carbon. The viewer's card header described the round trip - send this file to the backend, run the pipeline, get an estimate with provenance. And the panel that appears when no backend is configured said the carbon calculation runs "live through the API in the presentation", a sentence written when a presenter had a local backend open during NSC and meaningless now. This is the defect the evidence gates exist to catch, arriving as prose instead of as a number. A visitor clicking through would have found out by getting nothing. The viewer's two descriptions now switch on apiReady, which the component already had. With no backend it says plainly that the separation runs in the browser, the carbon step needs a pipeline that is not deployed, and the reviewed result is on /demo. The core demo figures stay but are labelled as what they are - a fixed-seed synthetic fixture proving the pipeline reruns to the same answer - rather than sitting unqualified next to the words "carbon estimate", where they read as a measurement. The landing CTA changes from "ทดลองอัปโหลดไฟล์" to "อัปโหลดดูการแยก 3 มิติ". Uploading still works and still does real work; it is the carbon half that is gone, and the button now promises only the half that is there. page.test.tsx binds each landing label to its route, so it failed on the rename. The label is the thing under test and it changed on purpose; the expectation is updated with a note saying why. apps/web 31 files, 210 tests, type-check clean, build clean Co-Authored-By: Claude Opus 5 --- .../app/(dashboard)/dashboard/viewer/page.tsx | 36 ++++++++++++++----- apps/web/src/app/page.test.tsx | 6 +++- apps/web/src/app/page.tsx | 18 +++++++--- 3 files changed, 46 insertions(+), 14 deletions(-) diff --git a/apps/web/src/app/(dashboard)/dashboard/viewer/page.tsx b/apps/web/src/app/(dashboard)/dashboard/viewer/page.tsx index 423821b..269b6c9 100644 --- a/apps/web/src/app/(dashboard)/dashboard/viewer/page.tsx +++ b/apps/web/src/app/(dashboard)/dashboard/viewer/page.tsx @@ -357,9 +357,14 @@ export default function ViewerPage() { ผลประมาณการคาร์บอน (ML pipeline) + {/* Two states, two descriptions. Describing the upload flow when + no backend is configured tells the visitor the page can do + something it cannot, which is the same defect the evidence + gates exist to catch — just in copy instead of a number. */} - ส่งไฟล์นี้เข้า backend → รัน pipeline (ground → tree → wood/leaf → QSM → - allometric) → คืนค่าประมาณการคาร์บอนพร้อม provenance + {apiReady + ? 'ส่งไฟล์นี้เข้า backend → รัน pipeline (ground → tree → wood/leaf → QSM → allometric) → คืนค่าประมาณการคาร์บอนพร้อม provenance' + : 'หน้านี้แยกกลุ่มจุดเป็นลำต้น / ใบ / พื้นดิน ในเบราว์เซอร์ได้เอง แต่การคำนวณคาร์บอนต้องรัน pipeline บน backend ซึ่งตอนนี้ยังไม่มี deployment สาธารณะ'} @@ -414,15 +419,28 @@ export default function ViewerPage() { ) : (

- การวิเคราะห์คาร์บอนทำงานผ่าน backend (ML pipeline จริง) + ยังไม่มี backend เชื่อมต่ออยู่ — วิเคราะห์คาร์บอนจากไฟล์นี้ไม่ได้

- เวอร์ชันสาธิตออนไลน์นี้แสดงเฉพาะการแยก 3 มิติ (ลำต้น / ใบ / พื้นดิน) — - การคำนวณคาร์บอนสาธิตสดผ่าน API ในการนำเสนอ Reviewed core demo แบบ synthetic - ที่ใช้ตรวจ reproducibility พบ {CORE_DEMO_EVIDENCE.coreDemo.totalTrees} ต้น · - คาร์บอน {CORE_DEMO_EVIDENCE.coreDemo.totalCarbonKg} กก. · CO₂e{' '} - {CORE_DEMO_EVIDENCE.coreDemo.totalCo2eqKg} กก. ตัวเลขนี้ไม่ใช่ accuracy - benchmark หรือ carbon-credit certification + การแยกลำต้น / ใบ / พื้นดิน ที่เห็นด้านบนทำในเบราว์เซอร์ ส่วนการคำนวณคาร์บอน + ต้องรัน pipeline ทั้งเส้น (ground → tree → wood/leaf → QSM → allometric) + ซึ่งยังไม่มี deployment สาธารณะ +

+

+ ผลที่ตรวจสอบแล้วดูได้ที่{' '} + + หน้าสาธิต + {' '} + ซึ่งเสิร์ฟ artefact ที่ตรวจ checksum ทุกครั้ง +

+

+ อ้างอิงคนละชุด: core demo เป็น fixture สังเคราะห์ seed คงที่ + ที่ใช้พิสูจน์ว่า pipeline รันซ้ำได้ผลเดิม —{' '} + {CORE_DEMO_EVIDENCE.coreDemo.totalTrees} ต้น · คาร์บอน{' '} + {CORE_DEMO_EVIDENCE.coreDemo.totalCarbonKg} กก. · CO₂e{' '} + {CORE_DEMO_EVIDENCE.coreDemo.totalCo2eqKg} กก. + ไม่ใช่ การวัดความแม่นยำ + และไม่ใช่คาร์บอนเครดิตที่ผ่านการรับรอง

)} diff --git a/apps/web/src/app/page.test.tsx b/apps/web/src/app/page.test.tsx index 5077004..3582cad 100644 --- a/apps/web/src/app/page.test.tsx +++ b/apps/web/src/app/page.test.tsx @@ -18,7 +18,11 @@ describe('Landing evidence contract', () => { expect(getAnchorHrefByLabel(markup, 'ดูผลการประเมิน')).toBe('/demo'); - expect(getAnchorHrefByLabel(markup, 'ทดลองอัปโหลดไฟล์')).toBe( + // Label changed from 'ทดลองอัปโหลดไฟล์' when the API URL was removed from + // production. Uploading still works and still runs the separation in the + // browser; what it no longer does is produce a carbon figure, and the old + // label promised the whole flow. + expect(getAnchorHrefByLabel(markup, 'อัปโหลดดูการแยก 3 มิติ')).toBe( '/dashboard/viewer', ); diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index 36180b9..7f3278b 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -204,9 +204,19 @@ useEffect(() => {

- อัปโหลดข้อมูล Point Cloud เพื่อวิเคราะห์ขนาดลำต้น - โครงสร้างต้นไม้ และประเมินปริมาณคาร์บอนสะสม - พร้อมหลักฐานที่สามารถตรวจสอบย้อนกลับได้ + วัดขนาดลำต้นและโครงสร้างต้นไม้จาก Point Cloud + แล้วประเมินปริมาณคาร์บอนสะสม พร้อมหลักฐานที่ตรวจสอบย้อนกลับได้ทุกตัวเลข +

+ + {/* The upload page runs the 3D separation in the browser, but the + carbon step needs the pipeline on a backend and there is no + public deployment. Saying "upload to get carbon" here would be + a claim the site cannot honour — the same defect the evidence + gates catch in numbers, arriving instead as copy. */} +

+ เวอร์ชันออนไลน์นี้แยกลำต้น / ใบ / พื้นดิน ให้ดูในเบราว์เซอร์ + ส่วนการคำนวณคาร์บอนต้องรัน pipeline บน backend ซึ่งยังไม่มี deployment สาธารณะ — + ผลที่ตรวจสอบแล้วดูได้ที่หน้าสาธิต

@@ -216,7 +226,7 @@ useEffect(() => { size="xl" className="justify-center sm:min-w-48" > - ทดลองอัปโหลดไฟล์ + อัปโหลดดูการแยก 3 มิติ {/* /demo is the hash-verified evidence page: the reconciled From 275ddaeaf5e561746687f24c732a965a4c0dd5a0 Mon Sep 17 00:00:00 2001 From: Remote55 Date: Sun, 23 Aug 2026 19:57:09 +0700 Subject: [PATCH 3/3] docs: three deployment documents pointed at hosts that do not exist Chasing the old brand name through the docs turned up something worse than a stale name. DEPLOYMENT.md's targets table listed the web app at carbonscan-ai.vercel.app, which 404s, and the API at api.carbonscan-ai.up.railway.app, which was never provisioned. API.md gave a production base URL of api.carbonscan-ai.com, a domain nobody registered. Three addresses, none reachable, all stated as fact. The table is kept with the intended shape visible, because a plan is worth recording, but every row now says what is actually there: the web app live at its real URL, the API not deployed and NEXT_PUBLIC_API_URL unset, the database removed outright. DEVELOPMENT.md is the same failure aimed at a person rather than a service. Its Database Setup section walks a new developer through starting a PostGIS container and running Alembic migrations for a layer deleted in 927ae78 - no table backed it, no endpoint read from it. Following that section sets up infrastructure the code will never connect to. It now says so, and is kept because the migration files are still in the tree and someone will ask. ARCHITECTURE.md still described heterogeneous input as point clouds or multiple RGB photos. ADR 0007 removed the photo path a year ago. The brand renames themselves are the small part: ONBOARDING, ARCHITECTURE, DATASETS and DEPLOYMENT now say TreeQ in prose. PROJECT_SPEC's outstanding-rebrand note is corrected to list what actually remains - the GitHub repo slug and the package identifiers - and to state plainly that historical documents and ADRs are excluded on purpose, because editing a record after the fact is not a rebrand. STILL NOT DONE, AND DELIBERATELY carbonscan-api, carbonscan-ml, @carbonscan/types, @carbonscan/design-tokens, the carbonscan-uploads Supabase bucket, and APP_NAME with the test that asserts it. Renaming those breaks an editable install until pip runs again, and the bucket name is live infrastructure. Separate job, separate blast radius. sync_truth --check ok scripts/tests 148 passed Co-Authored-By: Claude Opus 5 --- docs/API.md | 3 ++- docs/ARCHITECTURE.md | 7 ++++--- docs/DEPLOYMENT.md | 18 ++++++++++++------ docs/DEVELOPMENT.md | 10 ++++++++++ docs/ONBOARDING.md | 8 ++++---- docs/PROJECT_SPEC.md | 5 ++++- docs/ml/DATASETS.md | 2 +- 7 files changed, 37 insertions(+), 16 deletions(-) diff --git a/docs/API.md b/docs/API.md index aa2f476..2dc64fe 100644 --- a/docs/API.md +++ b/docs/API.md @@ -15,7 +15,8 @@ > Backend REST API + WebSocket endpoints > > **Base URL (dev):** `http://localhost:8000/api/v1` -> **Base URL (prod):** `https://api.carbonscan-ai.com/api/v1` +> **Base URL (prod):** none. There is no production API deployment, and +> `api.carbonscan-ai.com` — which this line used to name — was never registered. > **Auto-generated docs:** `/docs` (Swagger) and `/redoc` (ReDoc) --- diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index d892b07..267299f 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -7,7 +7,7 @@ > สถานะปัจจุบันให้ยึด `docs/evidence/core_demo_manifest.json`, `docs/PROJECT_SPEC.md` และ > `docs/CAPABILITY_MATRIX.md`. -> System architecture, design patterns, and rationale for CarbonScan AI +> System architecture, design patterns, and rationale for TreeQ Carbon Platform --- @@ -24,8 +24,9 @@ ## System Overview -CarbonScan AI เป็น **distributed system** ที่ใช้ event-driven architecture เพื่อรองรับ: -- **Heterogeneous input** (.las/.laz files หรือ multiple RGB photos) +TreeQ Carbon Platform เป็น **distributed system** ที่ใช้ event-driven architecture เพื่อรองรับ: +- **Heterogeneous input** (.las/.laz files หรือ multiple RGB photos) — ⚠️ เส้นทาง RGB photos + ถูกลบทิ้งแล้วตาม [ADR 0007](decisions/0007-drop-the-photo-path.md) รับเฉพาะ point cloud จากเครื่องสแกน - **Long-running ML jobs** (5-30 นาที/ไฟล์) - **Real-time visualization** (3D Viewer in browser) - **Cost-controlled GPU** (serverless, scale-to-zero) diff --git a/docs/DEPLOYMENT.md b/docs/DEPLOYMENT.md index 94014a4..67926f3 100644 --- a/docs/DEPLOYMENT.md +++ b/docs/DEPLOYMENT.md @@ -6,18 +6,24 @@ > และ object-storage handoff ยัง Planned. ค่าใช้จ่ายและขั้นตอนด้านล่างเป็นประมาณการ/target > และต้องตรวจราคาปัจจุบันก่อนตัดสินใจ. ดู `docs/PROJECT_SPEC.md`. -> Production deployment for CarbonScan AI +> Production deployment for TreeQ Carbon Platform --- ## Deployment Targets -| Component | Platform | URL Pattern | Cost (Monthly) | +> [!IMPORTANT] +> **Only the first row exists.** The rest of this table has always been a plan, +> and three of its URLs resolve to nothing. It is kept as the intended shape +> rather than deleted, but nothing below the web row should be read as +> describing something you can visit today. + +| Component | Platform | URL | Status | |---|---|---|---| -| **Web (Next.js)** | Vercel | `https://carbonscan-ai.vercel.app` | $0 (Hobby) | -| **API (FastAPI)** | Railway | `https://api.carbonscan-ai.up.railway.app` | $5 | -| **Database** | Supabase | `*.supabase.co` | $0 (Free) | -| **Storage** | Supabase | `*.supabase.co/storage` | $0 (Free, 1GB) | +| **Web (Next.js)** | Vercel | `https://treeqcarbon.vercel.app` | **Live** | +| **API (FastAPI)** | — | — | **Not deployed.** `NEXT_PUBLIC_API_URL` is unset in production, so the site runs its browser-side work and says the carbon step is unavailable. The Railway URL this table used to name never existed. | +| **Database** | — | — | **Removed.** The database layer was deleted; no table backs the API. See `docs/DATABASE_TEARDOWN.md`. | +| **Auth / Storage** | Supabase | `*.supabase.co` | Live, $0 | | **ML GPU Worker** | RunPod Serverless | Endpoint URL | ~$6-15 (usage) | | **Mobile APK** | GitHub Releases | Artifact | $0 | | **Mobile IPA** | (Optional) Codemagic | TestFlight | $0 (Free tier) | diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 25527da..d6b2157 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -268,6 +268,16 @@ NEON_API_TOKEN=xxx ## Database Setup +> [!CAUTION] +> **There is no database.** The API's database layer was deleted in `927ae78` — +> no table backed it, no endpoint read from it. Nothing in this section is +> needed to run or develop anything in this repository, and following it sets up +> a PostGIS container the code will never connect to. See +> [`docs/DATABASE_TEARDOWN.md`](DATABASE_TEARDOWN.md). +> +> Kept because Alembic's migration files are still in the tree and someone will +> eventually wonder what they were for. + ### Local PostgreSQL with PostGIS ```bash diff --git a/docs/ONBOARDING.md b/docs/ONBOARDING.md index 6a94845..ee4ff95 100644 --- a/docs/ONBOARDING.md +++ b/docs/ONBOARDING.md @@ -2,7 +2,7 @@ > **เป้าหมาย:** อ่านเอกสารนี้ภายใน 30 นาที แล้วเริ่มลงมือทำงานได้ > -> **สำหรับ:** Developer ใหม่ที่เพิ่งเข้าร่วมทีม CarbonScan AI +> **สำหรับ:** Developer ใหม่ที่เพิ่งเข้าร่วม TreeQ Carbon Platform --- @@ -10,7 +10,7 @@ | เวลา | กิจกรรม | |---|---| -| **0-5 min** | อ่าน Section 1 "What is CarbonScan AI?" | +| **0-5 min** | อ่าน Section 1 "What is TreeQ Carbon Platform?" | | **5-10 min** | อ่าน Section 2 "Architecture Quick Tour" | | **10-15 min** | อ่าน Section 3 "Your Role & First Tasks" | | **15-25 min** | ทำตาม Section 4 "Local Setup" | @@ -18,7 +18,7 @@ --- -## 1. What is CarbonScan AI? +## 1. What is TreeQ Carbon Platform? ### One-liner ระบบประเมิน Carbon Credit จากต้นไม้แบบโปร่งใส โดยใช้ LiDAR 3D Point Cloud + AI @@ -288,4 +288,4 @@ A: ใช้ Free tier ของ Colab/Kaggle เป็นหลัก. RunPod - [ ] Clone repo + create branch แรกได้ - [ ] อ่าน [TASKS.md](../TASKS.md) แล้วเห็นงานของตัวเอง -**ยินดีต้อนรับสู่ทีม CarbonScan AI! 🌲** +**ยินดีต้อนรับสู่ TreeQ Carbon Platform! 🌲** diff --git a/docs/PROJECT_SPEC.md b/docs/PROJECT_SPEC.md index 79bb6f7..c69d9e4 100644 --- a/docs/PROJECT_SPEC.md +++ b/docs/PROJECT_SPEC.md @@ -89,7 +89,10 @@ Pipeline ที่รันได้ตอนนี้รับ point cloud (`.l - **ชื่อปัจจุบัน: `TreeQ Carbon Platform`** (ทีมตัดสินใจ 2026-07-16) - **ชื่อเดิม `CarbonScan AI` = historical name** — ยังหลงเหลือใน legacy docs/code metadata บางส่วน - rebrand core surface แล้วใน **apps/web**, README, master spec และ ML docs -- **ยังไม่ rebrand ครบ:** legacy docs/proposal, brand assets และ GitHub repo name (`carbonscan-ai`) +- **ยังไม่ rebrand ครบ:** GitHub repo name (`carbonscan-ai`) และ package identifier ในโค้ด + (`carbonscan-api`, `carbonscan-ml`, `@carbonscan/*`, bucket `carbonscan-uploads`) + · เอกสาร historical และ ADR **ตั้งใจไม่แก้** เพราะการแก้บันทึกย้อนหลังคือการปลอมบันทึก + · brand assets แก้แล้ว — โลโก้ไม่มี wordmark จึงย้ายมาใช้ได้ทั้งดุ้น - Logo bug: `apps/web/public/logo.png` เป็นโลโก้เดิม — ยังไม่เปลี่ยน --- diff --git a/docs/ml/DATASETS.md b/docs/ml/DATASETS.md index cb58fec..8078c37 100644 --- a/docs/ml/DATASETS.md +++ b/docs/ml/DATASETS.md @@ -1,6 +1,6 @@ # 📊 Datasets -> Sources of training and validation data for CarbonScan AI +> Sources of training and validation data for TreeQ Carbon Platform ---