diff --git a/2git.ps1 b/2git.ps1 new file mode 100644 index 0000000..7f300fd --- /dev/null +++ b/2git.ps1 @@ -0,0 +1,14 @@ +param([string]$Message = "Backup") + +$Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" +$CommitMsg = "Backup: $Message | $Timestamp" + +Write-Host "Backup: $CommitMsg" -ForegroundColor Cyan + +git add . +git commit -m $CommitMsg +git push origin main +git push github main + +Write-Host "Done!" -ForegroundColor Green +pause diff --git a/README.md b/README.md index 4480997..634fc76 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ > > ระบบบริหารจัดการเอกสารโครงการแบบครบวงจร สำหรับโครงการก่อสร้างท่าเรือแหลมฉบังระยะที่ 3 -[![Version](https://img.shields.io/badge/version-1.4.5-blue.svg)](./CHANGELOG.md) +[![Version](https://img.shields.io/badge/version-1.5.1-blue.svg)](./CHANGELOG.md) [![License](https://img.shields.io/badge/license-Internal-red.svg)]() -[![Status](https://img.shields.io/badge/status-In%20Development-yellow.svg)]() +[![Status](https://img.shields.io/badge/status-Active%20Development-green.svg)]() --- @@ -216,14 +216,19 @@ lcbp3-dms/ │ ├── lib/ # Utilities │ └── package.json │ -├── docs/ # 📚 เอกสารโครงการ -│ ├── 0_Requirements_V1_4_5.md -│ ├── 1_FullStackJS_V1_4_5.md -│ ├── 2_Backend_Plan_V1_4_5.md -│ ├── 3_Frontend_Plan_V1_4_5.md -│ ├── 4_Data_Dictionary_V1_4_5.md -│ ├── 8_lcbp3_v1_4_5.sql -│ └── 8_lcbp3_v1_4_5_seed.sql +├── docs/ # 📚 Legacy documentation +│ └── ... +│ +├── specs/ # 📘 Project Specifications (v1.5.1) +│ ├── 00-overview/ # Project overview & glossary +│ ├── 01-requirements/ # Functional requirements +│ ├── 02-architecture/ # System architecture & ADRs +│ ├── 03-implementation/ # Implementation guidelines +│ ├── 04-operations/ # Deployment & operations +│ ├── 05-decisions/ # Architecture Decision Records +│ ├── 06-tasks/ # Active tasks +│ ├── 07-database/ # Database schema & seed data +│ └── 09-history/ # Implementation history │ ├── infrastructure/ # Docker & Deployment │ └── Markdown/ # Legacy docs @@ -235,22 +240,29 @@ lcbp3-dms/ ## 📚 เอกสารประกอบ -### เอกสารหลัก +### เอกสารหลัก (specs/ folder) -| เอกสาร | คำอธิบาย | ไฟล์ | -| ------------------------- | ------------------------------------------ | ----------------------------------------------------------------- | -| **Requirements** | ข้อกำหนดระบบและฟังก์ชันการทำงาน | [0_Requirements_V1_4_5.md](./docs/0_Requirements_V1_4_5.md) | -| **Full Stack Guidelines** | แนวทางการพัฒนา TypeScript/NestJS/Next.js | [1_FullStackJS_V1_4_5.md](./docs/1_FullStackJS_V1_4_5.md) | -| **Backend Plan** | แผนการพัฒนา Backend แบบ Phase-Based | [2_Backend_Plan_V1_4_5.md](./docs/2_Backend_Plan_V1_4_5.md) | -| **Frontend Plan** | แผนการพัฒนา Frontend | [3_Frontend_Plan_V1_4_5.md](./docs/3_Frontend_Plan_V1_4_5.md) | -| **Data Dictionary** | โครงสร้างฐานข้อมูลและ Entity Relationships | [4_Data_Dictionary_V1_4_5.md](./docs/4_Data_Dictionary_V1_4_5.md) | +| เอกสาร | คำอธิบาย | โฟลเดอร์ | +| ------------------ | ------------------------------ | -------------------------- | +| **Overview** | ภาพรวมโครงการ, Glossary | `specs/00-overview/` | +| **Requirements** | ข้อกำหนดระบบและฟังก์ชันการทำงาน | `specs/01-requirements/` | +| **Architecture** | สถาปัตยกรรมระบบ, ADRs | `specs/02-architecture/` | +| **Implementation** | แนวทางการพัฒนา Backend/Frontend | `specs/03-implementation/` | +| **Database** | Schema v1.5.1 + Seed Data | `specs/07-database/` | -### เอกสารเพิ่มเติม +### Schema & Seed Data -- **Database Schema**: [8_lcbp3_v1_4_5.sql](./docs/8_lcbp3_v1_4_5.sql) -- **Seed Data**: [8_lcbp3_v1_4_5_seed.sql](./docs/8_lcbp3_v1_4_5_seed.sql) -- **Changelog**: [CHANGELOG.md](./CHANGELOG.md) -- **Contributing**: [CONTRIBUTING.md](./CONTRIBUTING.md) +```bash +# Import schema +mysql -u root -p lcbp3_dev < specs/07-database/lcbp3-v1.5.1-schema.sql + +# Import seed data +mysql -u root -p lcbp3_dev < specs/07-database/lcbp3-v1.5.1-seed.sql +``` + +### Legacy Documentation + +เอกสารเก่าอยู่ใน `docs/` folder --- @@ -443,10 +455,10 @@ This project is **Internal Use Only** - ลิขสิทธิ์เป็น ## 👥 Team -- **Project Manager**: [ระบุชื่อ] -- **Tech Lead**: [ระบุชื่อ] -- **Backend Team**: [ระบุชื่อ] -- **Frontend Team**: [ระบุชื่อ] +- **Project Manager**: [์Nattanin Peancharoen] +- **Tech Lead**: [Nattanin Peancharoen] +- **Backend Team**: [Nattanin Peancharoen] +- **Frontend Team**: [Nattanin Peancharoen] --- @@ -462,20 +474,26 @@ This project is **Internal Use Only** - ลิขสิทธิ์เป็น ## 🗺️ Roadmap -### Version 1.4.5 (Current) +### Version 1.5.1 (Current - Dec 2025) - ✅ Core Infrastructure -- ✅ Authentication & Authorization -- 🔄 Correspondence Module +- ✅ Authentication & Authorization (JWT + CASL RBAC) +- ✅ **CASL RBAC 4-Level** - Global, Org, Project, Contract +- ✅ **Workflow DSL Parser** - Zod validation & state machine +- ✅ Correspondence Module (Master-Revision Pattern) +- ✅ **Document Number Audit** - Compliance tracking +- ✅ **All Token Types** - Including {RECIPIENT} - 🔄 RFA Module -- 🔄 Workflow Engine +- 🔄 Drawing Module +- ✅ Swagger API Documentation -### Version 1.5.0 (Planned) +### Version 1.6.0 (Planned) - 📋 Advanced Reporting - 📊 Dashboard Analytics -- 🔔 Enhanced Notifications -- 📱 Mobile App +- 🔔 Enhanced Notifications (LINE/Email) +- 🔄 E2E Tests for Critical APIs +- 📈 Prometheus Metrics --- diff --git a/bfg.jar b/bfg.jar new file mode 100644 index 0000000..688fe71 Binary files /dev/null and b/bfg.jar differ diff --git a/quick-backup.bat b/quick-backup.bat new file mode 100644 index 0000000..3dd8dea --- /dev/null +++ b/quick-backup.bat @@ -0,0 +1,65 @@ +@echo off +chcp 65001 >nul +echo. + +:: Check if in Git repository +git status >nul 2>&1 +if errorlevel 1 ( + echo ERROR: Not a Git repository! + exit /b 1 +) + +:: Get commit message from argument +set "MSG=%*" +if "%MSG%"=="" set "MSG=Auto backup" + +:: Get date and time +for /f "tokens=2 delims==" %%I in ('wmic OS Get localdatetime /value') do set "dt=%%I" +set "YYYY=!dt:~0,4!" +set "MM=!dt:~4,2!" +set "DD=!dt:~6,2!" +set "HH=!dt:~8,2!" +set "MIN=!dt:~10,2!" +set "SEC=!dt:~12,2!" + +set "TIMESTAMP=!YYYY!-!MM!-!DD! !HH!:!MIN!:!SEC!" +set "COMMIT_MSG=Backup: %MSG% | !TIMESTAMP!" + +echo [START] Git Backup +echo Message: !COMMIT_MSG! +echo. + +:: Stage changes +echo [1/4] Staging changes... +git add . +if errorlevel 1 ( + echo ERROR: Failed to stage + exit /b 1 +) + +:: Commit +echo [2/4] Committing... +git commit -m "!COMMIT_MSG!" +if errorlevel 1 echo [INFO] No changes to commit + +:: Push to Gitea +echo [3/4] Pushing to Gitea... +git push origin main +if errorlevel 1 ( + echo [WARN] Failed to push to Gitea +) else ( + echo [OK] Pushed to Gitea +) + +:: Push to GitHub +echo [4/4] Pushing to GitHub... +git push github main +if errorlevel 1 ( + echo [WARN] Failed to push to GitHub +) else ( + echo [OK] Pushed to GitHub +) + +echo. +echo [DONE] Backup completed! +timeout /t 3 >nul