How nelson820125/jordium-gantt-vue3 works
Project Type & Purpose
• This is a Vue 3 + TypeScript component library (“jordium-gantt-vue3”) that exposes a Gantt chart UI component.
• It ships as an npm package and is demonstrated via two demo apps (demo/ and packageDemo/).
• There’s no backend—this is purely a UI library with build/config pipelines, documentation, and CI/CD for publishing to npm and GitHub Pages.
High-Level File Structure Analysis
• src/: Core library source
• components/ (GanttChart.vue, TaskList.vue, Timeline.vue, TaskBar.vue, MilestonePoint.vue, …)
• models/ (data classes and config interfaces)
• composables/ (useI18n, useMessage)
• utils/ (predecessorUtils)
• styles/ (CSS, theme variables)
• index.ts (export entry)
• demo/ & packageDemo/: Two demo applications that consume the built library locally
• docs/ & design/: Documentation and UI mockups
• .github/workflows/: CI/CD pipeline (build, test, deploy to GitHub Pages)
• vite.config.lib.ts & vite.config.ts: Build configurations for library and demos
• package.json: Scripts for dev, build:lib, test, deploy
README Insights
• Exposes a single <GanttChart> component with many props/events for tasks, milestones, toolbar, i18n, theming.
• Core abstractions: Task and Milestone (both TypeScript interfaces), TimelineConfig, ToolbarConfig, composables for i18n and messaging.
a. Main Components
1. Developer Machine / IDE
2. Source Code Layers
• UI Components
• Models (data types & configs)
• Composables (i18n, message)
• Utils (predecessor logic)
• Styles & Themes
3. Build System (Vite + TypeScript)
4. Distribution Artifacts
• ESM/CJS bundles (dist/)
• Type declarations
5. Demo Applications
• Demo A (demo/)
• Demo B (packageDemo/)
6. CI/CD Pipeline
• GitHub Actions (build/test/publish)
• Deployment to npm and GitHub Pages
7. End User Applications
• Any external Vue 3 app importing jordium-gantt-vue3
b. Relationships & Data Flows
• Developer updates src/ → Vite build → dist/ packages
• Demo apps import built library (or local src alias) → render <GanttChart>
• CI pipeline triggers on push → runs tests → publishes npm package → deploys demo on GH Pages
• End users install from npm → import <GanttChart> → provide tasks, milestones, handle events
c. Architectural Patterns & Principles
• Modular Component Design: Each UI feature (task bar, timeline, toolbar) is a standalone Vue component.
• Composition API: Shared logic in composables (i18n, messaging).
• Type-Safe Model Layer: Task/Milestone classes and config interfaces decouple data from presentation.
• Theming & Styles: CSS variables and theme files allow easy customization.
• Demo Driven: Two parallel demo projects validate API and build outputs.
• CI/CD Automation: Ensures consistency between source, built artifacts, documentation, and live demo.
d. Key Technologies
• Vue 3 Composition API
• TypeScript 5.x
• Vite (library + app modes)
• GitHub Actions for CI/CD
• GitHub Pages for demo hosting
• npm for package distribution
Critical Details to Capture
• Separation between library core and demos/clients
• Build steps and targets (lib vs. demo)
• Data flow: props/events lifecycle inside <GanttChart>
• CI/CD triggers and outputs
• Integration points: where users hook into events and theme/i18n composables