@@ -62,11 +62,78 @@ This will:
6262 - Ubuntu/Debian: ` sudo apt install ffmpeg `
6363 - Windows: [ Download from ffmpeg.org] ( https://ffmpeg.org/download.html )
6464
65+ ## Development
66+
67+ This is a monorepo using Yarn workspaces. To set up the development environment:
68+
69+ 1 . ** Clone the repository**
70+
71+ ``` bash
72+ git clone https://github.com/SimplePhotoGallery/core.git
73+ cd spg-core
74+ ```
75+
76+ 2 . ** Install dependencies**
77+
78+ ``` bash
79+ yarn install
80+ ```
81+
82+ 3 . ** Build the ` common ` package** (required for TypeScript/ESLint to resolve ` @simple-photo-gallery/common ` )
83+
84+ ``` bash
85+ yarn workspace @simple-photo-gallery/common build
86+ ```
87+
88+ 4 . ** Build the gallery package** (optional, for testing CLI changes)
89+
90+ ``` bash
91+ yarn workspace simple-photo-gallery build
92+ ```
93+
94+ 5 . ** Run the CLI in development mode**
95+ ``` bash
96+ yarn workspace simple-photo-gallery gallery
97+ ```
98+
99+ ### Workspace Packages
100+
101+ - ** ` common/ ` ** - Shared types, schemas, and utilities used by both the CLI and themes
102+ - Gallery types and Zod validation schemas
103+ - Theme utilities (data loading, path resolution, markdown parsing)
104+ - Client-side utilities (PhotoSwipe, blurhash, CSS helpers)
105+ - See [ common/README.md] ( common/README.md ) for full API documentation
106+ - ** ` gallery/ ` ** - CLI tool (` simple-photo-gallery ` )
107+ - Includes base theme template bundled at ` gallery/src/modules/create-theme/templates/base/ `
108+ - ** ` themes/modern/ ` ** - Default theme package (reference implementation)
109+
110+ ### Building Packages
111+
112+ Each workspace package can be built individually:
113+
114+ - ` yarn workspace @simple-photo-gallery/common build `
115+ - ` yarn workspace simple-photo-gallery build `
116+ - ` yarn workspace @simple-photo-gallery/theme-modern build `
117+
65118## Supported Formats
66119
67120** Images:** JPEG, PNG, WebP, GIF, TIFF
68121** Videos:** MP4, MOV, AVI, WebM, MKV
69122
123+ ## Architecture
124+
125+ This project uses a multi-theme architecture:
126+ - ** Common package** provides shared utilities for all themes
127+ - ** Themes** focus only on layout and presentation
128+ - ** CLI** handles gallery generation and theme orchestration
129+
130+ See the [ Architecture Documentation] ( ./docs/architecture.md ) for details on how the system works, including:
131+ - Package structure and dependencies
132+ - Data flow from photos to static HTML
133+ - Theme system design and resolution
134+ - Multi-theme support implementation
135+ - Guidelines for adding new features
136+
70137## Detailed Documentation
71138
72139For advanced usage, customization, and deployment options, see the comprehensive [ documentation] ( ./docs/README.md ) :
@@ -76,7 +143,11 @@ For advanced usage, customization, and deployment options, see the comprehensive
76143 - [ ` build ` ] ( ./docs/commands/build.md ) - Generate static HTML galleries
77144 - [ ` thumbnails ` ] ( ./docs/commands/thumbnails.md ) - Generate optimized thumbnails
78145 - [ ` clean ` ] ( ./docs/commands/clean.md ) - Remove gallery files
146+ - [ ` create-theme ` ] ( ./docs/commands/create-theme.md ) - Scaffold a new theme package
147+ - [ ` telemetry ` ] ( ./docs/commands/telemetry.md ) - Manage anonymous telemetry preferences
79148- ** [ Gallery Configuration] ( ./docs/configuration.md ) ** - Manual editing of ` gallery.json ` and advanced features like sections
149+ - ** [ Custom Themes] ( ./docs/themes.md ) ** - Create and use custom themes
150+ - ** [ Common Package API] ( ./common/README.md ) ** - Utilities and types for theme development
80151- ** [ Deployment Guide] ( ./docs/deployment.md ) ** - Guidelines for hosting your gallery
81152
82153## Python Version
0 commit comments