website-and-documentation/content/en/docs/documentation/local-development.md

227 lines
4.5 KiB
Markdown
Raw Normal View History

feat(docs): add comprehensive documentation platform architecture and guides Created a complete documentation system for new documentors, including interactive architecture diagrams and step-by-step guides for all documentation workflows. New LikeC4 architecture project (resources/doc-likec4/): - Created documentation-platform.c4 model with 252 lines covering: * Actors: documentor, reviewer, CI system, edge platform * Tools: Hugo, LikeC4, Git, VS Code, markdownlint, htmltest * Processes: local development, testing, CI/CD pipeline * Repositories: git repo, cloudlet registry - Defined 6 comprehensive views: * overview: Complete documentation platform ecosystem * localDevelopment: Local writing and preview workflow * cicdPipeline: Automated testing and validation * deploymentFlow: From commit to production * fullWorkflow: End-to-end documentation lifecycle * testingCapabilities: Quality assurance toolchain New documentation pages (content/en/docs/documentation/): - _index.md: Overview and introduction for new documentors - local-development.md: Setting up local environment, live preview - testing.md: Running markdown, HTML, and link validation - cicd.md: Understanding automated CI/CD pipeline - publishing.md: Deployment to Edge Connect Munich cloudlet - quick-reference.md: Command reference and common tasks Hugo shortcode for embedding LikeC4 diagrams: - Created layouts/shortcodes/likec4-view.html - Supports loading state with animated indicator - Graceful error handling for missing views - Automatic shadow DOM checking to ensure webcomponent loaded - Usage: {{< likec4-view view="viewId" project="projectName" >}} Supporting documentation: - resources/LIKEC4-REGENERATION.md: Guide for regenerating webcomponents - All diagrams are interactive and explorable in the browser - Views include zoom, pan, and element inspection This implementation provides: 1. Self-documenting documentation platform ("meta-documentation") 2. Visual learning for complex workflows via interactive diagrams 3. Clear separation of concerns (6 focused views vs 1 overwhelming diagram) 4. Onboarding path for new team members 5. Living architecture documentation that evolves with the platform All new documentation passes markdown linting and builds successfully.
2025-11-07 11:50:58 +01:00
---
title: "Local Development"
linkTitle: "Local Development"
weight: 20
description: >
Set up your local environment and learn the documentor workflow.
---
## Prerequisites
Before you start, ensure you have:
- **Devbox** or the following tools installed:
- Hugo Extended (latest version)
- Node.js (v24+)
- Go (for htmltest)
- Git
## Installation
1. Clone the repository:
```bash
git clone <repository-url>
cd ipceicis-developerframework
```
2. Install dependencies:
```bash
task deps:install
```
## Local Development Workflow
{{< likec4-view view="localDevelopment" project="documentation-platform" >}}
### Starting the Development Server
The easiest way to work locally is to start the Hugo development server:
```bash
task serve
```
This will:
- Generate build information (git commit, version)
- Start Hugo server on `http://localhost:1313`
- Enable hot reload - changes appear instantly in the browser
### Content Structure
```text
content/
└── en/ # English content
├── _index.md # Homepage
├── blog/ # Blog posts
└── docs/ # Documentation
├── architecture/ # Architecture docs
├── decisions/ # ADRs
└── v1/ # Version-specific docs
```
### Creating Content
1. **Add a new documentation page:**
```bash
# Create a new markdown file
vim content/en/docs/your-topic/_index.md
```
2. **Add frontmatter:**
```yaml
---
title: "Your Topic"
linkTitle: "Your Topic"
weight: 10
description: >
Brief description of your topic.
---
```
3. **Write your content** in Markdown
4. **Preview changes** - they appear immediately if `task serve` is running
### Creating Architecture Diagrams
Architecture diagrams are created with LikeC4:
1. **Navigate to the appropriate LikeC4 project:**
- `resources/edp-likec4/` - Platform architecture
- `resources/doc-likec4/` - Documentation platform architecture
2. **Edit or create `.c4` files** with your model
Example: Create a simple view in `resources/edp-likec4/views/my-view.c4`:
```likec4
specification {
element myperson
element mysystem
}
model {
customer = myperson 'Customer' {
description 'End user of the platform'
}
mySystem = mysystem 'My System' {
description 'Example system component'
}
customer -> mySystem 'uses'
}
views {
view myCustomView {
title "My Custom Architecture View"
include customer
include mySystem
autoLayout TopBottom
}
}
```
feat(docs): add comprehensive documentation platform architecture and guides Created a complete documentation system for new documentors, including interactive architecture diagrams and step-by-step guides for all documentation workflows. New LikeC4 architecture project (resources/doc-likec4/): - Created documentation-platform.c4 model with 252 lines covering: * Actors: documentor, reviewer, CI system, edge platform * Tools: Hugo, LikeC4, Git, VS Code, markdownlint, htmltest * Processes: local development, testing, CI/CD pipeline * Repositories: git repo, cloudlet registry - Defined 6 comprehensive views: * overview: Complete documentation platform ecosystem * localDevelopment: Local writing and preview workflow * cicdPipeline: Automated testing and validation * deploymentFlow: From commit to production * fullWorkflow: End-to-end documentation lifecycle * testingCapabilities: Quality assurance toolchain New documentation pages (content/en/docs/documentation/): - _index.md: Overview and introduction for new documentors - local-development.md: Setting up local environment, live preview - testing.md: Running markdown, HTML, and link validation - cicd.md: Understanding automated CI/CD pipeline - publishing.md: Deployment to Edge Connect Munich cloudlet - quick-reference.md: Command reference and common tasks Hugo shortcode for embedding LikeC4 diagrams: - Created layouts/shortcodes/likec4-view.html - Supports loading state with animated indicator - Graceful error handling for missing views - Automatic shadow DOM checking to ensure webcomponent loaded - Usage: {{< likec4-view view="viewId" project="projectName" >}} Supporting documentation: - resources/LIKEC4-REGENERATION.md: Guide for regenerating webcomponents - All diagrams are interactive and explorable in the browser - Views include zoom, pan, and element inspection This implementation provides: 1. Self-documenting documentation platform ("meta-documentation") 2. Visual learning for complex workflows via interactive diagrams 3. Clear separation of concerns (6 focused views vs 1 overwhelming diagram) 4. Onboarding path for new team members 5. Living architecture documentation that evolves with the platform All new documentation passes markdown linting and builds successfully.
2025-11-07 11:50:58 +01:00
3. **Regenerate webcomponents:**
```bash
task likec4:generate
```
4. **Embed diagrams in Markdown:**
```markdown
{{</* likec4-view view="myCustomView" project="architecture" title="My Custom Architecture View" */>}}
feat(docs): add comprehensive documentation platform architecture and guides Created a complete documentation system for new documentors, including interactive architecture diagrams and step-by-step guides for all documentation workflows. New LikeC4 architecture project (resources/doc-likec4/): - Created documentation-platform.c4 model with 252 lines covering: * Actors: documentor, reviewer, CI system, edge platform * Tools: Hugo, LikeC4, Git, VS Code, markdownlint, htmltest * Processes: local development, testing, CI/CD pipeline * Repositories: git repo, cloudlet registry - Defined 6 comprehensive views: * overview: Complete documentation platform ecosystem * localDevelopment: Local writing and preview workflow * cicdPipeline: Automated testing and validation * deploymentFlow: From commit to production * fullWorkflow: End-to-end documentation lifecycle * testingCapabilities: Quality assurance toolchain New documentation pages (content/en/docs/documentation/): - _index.md: Overview and introduction for new documentors - local-development.md: Setting up local environment, live preview - testing.md: Running markdown, HTML, and link validation - cicd.md: Understanding automated CI/CD pipeline - publishing.md: Deployment to Edge Connect Munich cloudlet - quick-reference.md: Command reference and common tasks Hugo shortcode for embedding LikeC4 diagrams: - Created layouts/shortcodes/likec4-view.html - Supports loading state with animated indicator - Graceful error handling for missing views - Automatic shadow DOM checking to ensure webcomponent loaded - Usage: {{< likec4-view view="viewId" project="projectName" >}} Supporting documentation: - resources/LIKEC4-REGENERATION.md: Guide for regenerating webcomponents - All diagrams are interactive and explorable in the browser - Views include zoom, pan, and element inspection This implementation provides: 1. Self-documenting documentation platform ("meta-documentation") 2. Visual learning for complex workflows via interactive diagrams 3. Clear separation of concerns (6 focused views vs 1 overwhelming diagram) 4. Onboarding path for new team members 5. Living architecture documentation that evolves with the platform All new documentation passes markdown linting and builds successfully.
2025-11-07 11:50:58 +01:00
```
**Finding available view IDs:**
- Open the `.c4` files in your project directory
- Look for `view <viewId> {` declarations
- The `<viewId>` is what you use in the `view` parameter
- Or use: `grep -r "^view " resources/edp-likec4/ --include="*.c4"`
feat(docs): add comprehensive documentation platform architecture and guides Created a complete documentation system for new documentors, including interactive architecture diagrams and step-by-step guides for all documentation workflows. New LikeC4 architecture project (resources/doc-likec4/): - Created documentation-platform.c4 model with 252 lines covering: * Actors: documentor, reviewer, CI system, edge platform * Tools: Hugo, LikeC4, Git, VS Code, markdownlint, htmltest * Processes: local development, testing, CI/CD pipeline * Repositories: git repo, cloudlet registry - Defined 6 comprehensive views: * overview: Complete documentation platform ecosystem * localDevelopment: Local writing and preview workflow * cicdPipeline: Automated testing and validation * deploymentFlow: From commit to production * fullWorkflow: End-to-end documentation lifecycle * testingCapabilities: Quality assurance toolchain New documentation pages (content/en/docs/documentation/): - _index.md: Overview and introduction for new documentors - local-development.md: Setting up local environment, live preview - testing.md: Running markdown, HTML, and link validation - cicd.md: Understanding automated CI/CD pipeline - publishing.md: Deployment to Edge Connect Munich cloudlet - quick-reference.md: Command reference and common tasks Hugo shortcode for embedding LikeC4 diagrams: - Created layouts/shortcodes/likec4-view.html - Supports loading state with animated indicator - Graceful error handling for missing views - Automatic shadow DOM checking to ensure webcomponent loaded - Usage: {{< likec4-view view="viewId" project="projectName" >}} Supporting documentation: - resources/LIKEC4-REGENERATION.md: Guide for regenerating webcomponents - All diagrams are interactive and explorable in the browser - Views include zoom, pan, and element inspection This implementation provides: 1. Self-documenting documentation platform ("meta-documentation") 2. Visual learning for complex workflows via interactive diagrams 3. Clear separation of concerns (6 focused views vs 1 overwhelming diagram) 4. Onboarding path for new team members 5. Living architecture documentation that evolves with the platform All new documentation passes markdown linting and builds successfully.
2025-11-07 11:50:58 +01:00
## Available Tasks
View all available tasks:
```bash
task --list
```
### Common Development Tasks
| Task | Description |
|------|-------------|
| `task serve` | Start development server with hot reload |
| `task build` | Build production-ready site |
| `task build:dev` | Build development version |
| `task clean` | Remove build artifacts |
| `task test` | Run all tests |
| `task test:quick` | Run tests without link checking |
## Quick Testing
Before committing, run quick tests:
```bash
task test:quick
```
This validates:
- Hugo build succeeds
- Markdown syntax is correct
For comprehensive testing, including link checking:
```bash
task test
```
## Tips for Documentors
1. **Write in present tense** - "The system processes..." not "The system will process..."
2. **Use code blocks** with syntax highlighting
3. **Include diagrams** for complex concepts
4. **Test locally** before pushing
5. **Keep it concise** - readers appreciate brevity
6. **Update regularly** - stale docs are worse than no docs
## Troubleshooting
### Port 1313 already in use
```bash
# Find and kill the process
lsof -ti:1313 | xargs kill -9
```
### Build errors
```bash
# Clean and rebuild
task clean
task build:dev
```
### Missing dependencies
```bash
# Reinstall all dependencies
task deps:install
```
## Next Steps
Now that you can develop locally, learn about:
- [Testing processes](../testing/)
- [CI/CD pipeline](../cicd/)