# LCBP3-DMS - Project Overview **Project Name:** Laem Chabang Port Phase 3 - Document Management System (LCBP3-DMS) **Version:** 1.5.0 **Status:** Planning & Specification Phase **Last Updated:** 2025-12-01 --- ## ๐Ÿ“‹ Table of Contents - [Project Introduction](#-project-introduction) - [Key Features](#-key-features) - [Technology Stack](#-technology-stack) - [Project Structure](#-project-structure) - [Quick Links](#-quick-links) - [Getting Started](#-getting-started) - [Team & Stakeholders](#-team--stakeholders) --- ## ๐ŸŽฏ Project Introduction LCBP3-DMS is a comprehensive Document Management System (DMS) designed specifically for the Laem Chabang Port Phase 3 construction project. The system manages construction documents, workflows, approvals, and communications between multiple organizations including port authority, consultants, contractors, and third parties. ### Project Objectives 1. **Centralize Document Management** - Single source of truth for all project documents 2. **Streamline Workflows** - Automated routing and approval processes 3. **Improve Collaboration** - Real-time access for all stakeholders 4. **Ensure Compliance** - Audit trails and document version control 5. **Enhance Efficiency** - Reduce paper-based processes and manual routing ### Project Scope **In Scope:** - Correspondence Management (Letters & Communications) - RFA (Request for Approval) Management - Drawing Management (Contract & Shop Drawings) - Workflow Engine (Approvals & Routing) - Document Numbering System - File Storage & Management - Search & Reporting - User & Access Management - Audit Logs & Notifications **Out of Scope:** - Financial Management & Billing - Procurement & Material Management - Project Scheduling (Gantt Charts) - HR & Payroll Systems - Mobile App (Phase 1 only) --- ## โœจ Key Features ### ๐Ÿ“จ Correspondence Management - Create, review, and track official letters - Master-Revision pattern for version control - Multi-level approval workflows - Attachment management - Automatic document numbering ### ๐Ÿ“‹ RFA Management - Submit requests for approval - Item-based RFA structure - Response tracking (Approved/Approved with Comments/Rejected) - Revision management - Integration with workflow engine ### ๐Ÿ“ Drawing Management - Contract Drawings (เนเธšเธšเธ„เธนเนˆเธชเธฑเธเธเธฒ) - Shop Drawings (เนเธšเธšเธเนˆเธญเธชเธฃเน‰เธฒเธ‡) with revisions - Version control & comparison - Drawing linking and references ### โš™๏ธ Workflow Engine - DSL-based workflow configuration - Dynamic routing based on rules - Parallel & sequential approvals - Escalation & timeout handling - Workflow history & audit trail ### ๐Ÿ—„๏ธ Document Numbering - Automatic number generation - Template-based formatting - Discipline-specific numbering - Concurrent request handling (Double-lock mechanism) - Annual reset support ### ๐Ÿ” Search & Discovery - Full-text search (Elasticsearch) - Advanced filtering - Document metadata search - Quick access to recent documents ### ๐Ÿ” Security & Access Control - 4-Level Hierarchical RBAC (Global/Organization/Project/Contract) - JWT-based authentication - Permission-based access control - Audit logging - Session management ### ๐Ÿ“ง Notifications - Multi-channel (Email, LINE Notify, In-app) - Workflow event notifications - Customizable user preferences - Async delivery (Queue-based) --- ## ๐Ÿ› ๏ธ Technology Stack ### Backend - **Framework:** NestJS (TypeScript) - **Database:** MariaDB 10.11 - **Cache & Queue:** Redis 7.2 - **Search:** Elasticsearch 8.11 - **ORM:** TypeORM - **Authentication:** JWT (JSON Web Tokens) - **Authorization:** CASL (4-Level RBAC) - **File Processing:** ClamAV (Virus Scanning) - **Queue:** BullMQ ### Frontend - **Framework:** Next.js 14+ (App Router) - **Language:** TypeScript - **Styling:** Tailwind CSS - **UI Components:** Shadcn/UI - **State Management:** React Context / Zustand - **Forms:** React Hook Form + Zod - **API Client:** Axios ### Infrastructure - **Deployment:** Docker & Docker Compose - **Platform:** QNAP Container Station - **Reverse Proxy:** NGINX - **Logging:** Winston - **Monitoring:** Health Checks + Log Aggregation --- ## ๐Ÿ“ Project Structure ``` lcbp3/ โ”œโ”€โ”€ backend/ # NestJS Backend Application โ”‚ โ”œโ”€โ”€ src/ โ”‚ โ”‚ โ”œโ”€โ”€ modules/ # Feature modules โ”‚ โ”‚ โ”œโ”€โ”€ common/ # Shared utilities โ”‚ โ”‚ โ”œโ”€โ”€ config/ # Configuration โ”‚ โ”‚ โ””โ”€โ”€ migrations/ # Database migrations โ”‚ โ”œโ”€โ”€ test/ # Tests โ”‚ โ””โ”€โ”€ package.json โ”‚ โ”œโ”€โ”€ frontend/ # Next.js Frontend Application โ”‚ โ”œโ”€โ”€ app/ # App router pages โ”‚ โ”œโ”€โ”€ components/ # React components โ”‚ โ”œโ”€โ”€ lib/ # Utilities โ”‚ โ””โ”€โ”€ package.json โ”‚ โ”œโ”€โ”€ docs/ # Source documentation โ”‚ โ”œโ”€โ”€ 0_Requirements_V1_4_5.md โ”‚ โ”œโ”€โ”€ 1_FullStackJS_V1_4_5.md โ”‚ โ”œโ”€โ”€ 2_Backend_Plan_V1_4_4.md โ”‚ โ”œโ”€โ”€ 3_Frontend_Plan_V1_4_4.md โ”‚ โ””โ”€โ”€ 4_Data_Dictionary_V1_4_5.md โ”‚ โ”œโ”€โ”€ specs/ # Technical Specifications โ”‚ โ”œโ”€โ”€ 00-overview/ # Project overview & glossary โ”‚ โ”œโ”€โ”€ 01-requirements/ # Functional requirements โ”‚ โ”œโ”€โ”€ 02-architecture/ # System architecture โ”‚ โ”œโ”€โ”€ 03-implementation/ # Implementation guidelines โ”‚ โ”œโ”€โ”€ 04-operations/ # Deployment & operations โ”‚ โ”œโ”€โ”€ 05-decisions/ # Architecture Decision Records (ADRs) โ”‚ โ””โ”€โ”€ 06-tasks/ # Development tasks โ”‚ โ”œโ”€โ”€ docker-compose.yml # Docker services configuration โ””โ”€โ”€ README.md # Project README ``` --- ## ๐Ÿ”— Quick Links ### Documentation | Category | Document | Description | | ------------------ | --------------------------------------------------------------------------- | ------------------------------------- | | **Overview** | [Glossary](./glossary.md) | Technical terminology & abbreviations | | **Overview** | [Quick Start](./quick-start.md) | 5-minute getting started guide | | **Requirements** | [Functional Requirements](../01-requirements/03-functional-requirements.md) | Feature specifications | | **Architecture** | [System Architecture](../02-architecture/system-architecture.md) | Overall system design | | **Architecture** | [Data Model](../02-architecture/data-model.md) | Database schema | | **Architecture** | [API Design](../02-architecture/api-design.md) | REST API specifications | | **Implementation** | [Backend Guidelines](../03-implementation/backend-guidelines.md) | Backend coding standards | | **Implementation** | [Frontend Guidelines](../03-implementation/frontend-guidelines.md) | Frontend coding standards | | **Implementation** | [Testing Strategy](../03-implementation/testing-strategy.md) | Testing approach | | **Operations** | [Deployment Guide](../04-operations/deployment-guide.md) | How to deploy | | **Operations** | [Monitoring](../04-operations/monitoring-alerting.md) | Monitoring & alerts | | **Decisions** | [ADR Index](../05-decisions/README.md) | Architecture decisions | | **Tasks** | [Backend Tasks](../06-tasks/README.md) | Development tasks | ### Key ADRs 1. [ADR-001: Unified Workflow Engine](../05-decisions/ADR-001-unified-workflow-engine.md) 2. [ADR-002: Document Numbering Strategy](../05-decisions/ADR-002-document-numbering-strategy.md) 3. [ADR-003: Two-Phase File Storage](../05-decisions/ADR-003-file-storage-approach.md) 4. [ADR-004: RBAC Implementation](../05-decisions/ADR-004-rbac-implementation.md) 5. [ADR-005: Technology Stack](../05-decisions/ADR-005-technology-stack.md) --- ## ๐Ÿš€ Getting Started ### For Developers 1. **Read Documentation** - Start with [Quick Start Guide](./quick-start.md) - Review [System Architecture](../02-architecture/system-architecture.md) - Study [Backend](../03-implementation/backend-guidelines.md) / [Frontend](../03-implementation/frontend-guidelines.md) guidelines 2. **Setup Development Environment** - Clone repository - Install Docker & Docker Compose - Run `docker-compose up` - Access backend: `http://localhost:3000` - Access frontend: `http://localhost:3001` 3. **Start Coding** - Pick a task from [Backend Tasks](../06-tasks/README.md) - Follow coding guidelines - Write tests - Submit PR for review ### For Operations Team 1. **Infrastructure Setup** - Review [Environment Setup](../04-operations/environment-setup.md) - Configure QNAP Container Station - Setup Docker Compose 2. **Deployment** - Follow [Deployment Guide](../04-operations/deployment-guide.md) - Configure [Backup & Recovery](../04-operations/backup-recovery.md) - Setup [Monitoring](../04-operations/monitoring-alerting.md) 3. **Maintenance** - Review [Maintenance Procedures](../04-operations/maintenance-procedures.md) - Setup [Incident Response](../04-operations/incident-response.md) - Configure [Security Operations](../04-operations/security-operations.md) --- ## ๐Ÿ‘ฅ Team & Stakeholders ### Project Team - **System Architect:** Nattanin Peancharoen - **Backend Team Lead:** [Name] - **Frontend Team Lead:** [Name] - **DevOps Engineer:** [Name] - **QA Lead:** [Name] - **Database Administrator:** [Name] ### Stakeholders - **Port Authority of Thailand (เธเธ—เธ—.)** - Owner - **Project Supervisors (เธชเธ„ยฉ.)** - Consultants - **Design Consultants (TEAM)** - Designers - **Construction Supervisors (เธ„เธ„เธ‡.)** - Supervision - **Contractors (เธœเธฃเธก.1-4)** - Construction --- ## ๐Ÿ“Š Project Timeline ### Phase 1: Foundation (Weeks 1-4) - Database setup & migrations - Authentication & RBAC - **Milestone:** User can login ### Phase 2: Core Infrastructure (Weeks 5-10) - User Management & Master Data - File Storage & Document Numbering - Workflow Engine - **Milestone:** Core services ready ### Phase 3: Business Modules (Weeks 11-17) - Correspondence Management - RFA Management - **Milestone:** Core documents manageable ### Phase 4: Supporting Modules (Weeks 18-21) - Drawing Management - Circulation & Transmittal - Search & Elasticsearch - **Milestone:** Document ecosystem complete ### Phase 5: Services (Week 22) - Notifications & Audit Logs - **Milestone:** MVP ready for UAT ### Phase 6: Testing & Deployment (Weeks 23-24) - User Acceptance Testing (UAT) - Production deployment - **Milestone:** Go-Live --- ## ๐Ÿ“ˆ Success Metrics ### Technical Metrics - **Uptime:** > 99.5% - **API Response Time (P95):** < 500ms - **Error Rate:** < 1% - **Database Query Time (P95):** < 100ms ### Business Metrics - **User Adoption:** > 90% of stakeholders using system - **Document Processing Time:** 50% reduction vs manual - **Search Success Rate:** > 95% - **User Satisfaction:** > 4.0/5.0 --- ## ๐Ÿ” Security & Compliance - **Data Encryption:** At rest & in transit - **Access Control:** 4-level RBAC - **Audit Logging:** All user actions logged - **Backup:** Daily automated backups - **Disaster Recovery:** RTO 4h, RPO 24h - **Security Scanning:** Automated vulnerability scans --- ## ๐Ÿ“ž Support & Contact ### Development Support - **Repository:** [Internal Git Repository] - **Issue Tracker:** [Internal Issue Tracker] - **Documentation:** This repository `/specs` ### Operations Support - **Email:** ops-team@example.com - **Phone:** [Phone Number] - **On-Call:** [On-Call Schedule] --- ## ๐Ÿ“ Document Control - **Version:** 1.5.0 - **Status:** Active - **Last Updated:** 2025-12-01 - **Next Review:** 2026-01-01 - **Owner:** System Architect - **Classification:** Internal Use Only --- ## ๐Ÿ”„ Version History | Version | Date | Description | | ------- | ---------- | ------------------------------------------ | | 1.5.0 | 2025-12-01 | Complete specification with ADRs and tasks | | 1.4.5 | 2025-11-30 | Updated architecture documents | | 1.4.4 | 2025-11-29 | Initial backend/frontend plans | | 1.0.0 | 2025-11-01 | Initial requirements | --- **Welcome to LCBP3-DMS Project! ๐Ÿš€**