Storm (AquaGen) Documentation Plan
Project Overview
This is an Apache Storm-based real-time streaming data processing application for AquaGen (water management system). The project processes IoT sensor data from water management units, performs real-time analytics, and generates alerts based on configurable thresholds.
Technology Stack
- Language: Kotlin
- Framework: Apache Storm 2.7.0
- Database: Azure Cosmos DB
- Message Queue: Azure Event Hubs, Redis
- Build Tool: Gradle (Kotlin DSL)
- Error Tracking: Sentry
Documentation Structure
1. Getting Started (Beginner Level)
Sequential introduction to the project for new developers.
2. Architecture & Core Concepts (Intermediate Level)
Deep dive into system design and Apache Storm concepts.
3. Development Guide (Intermediate/Advanced Level)
Hands-on development instructions and best practices.
4. API Reference (Advanced Level)
Detailed API documentation for all components.
5. Deployment & Operations (Advanced Level)
Production deployment and operational procedures.
6. Advanced Topics (Expert Level)
Performance tuning, troubleshooting, and extensions.
Detailed File Structure
docs/
docs/
├── plan.md (this file)
│
├── 01-introduction/
│ ├── 01-overview.md
│ ├── 02-what-is-storm.md
│ ├── 03-project-structure.md
│ └── 04-quick-start.md
│
├── 02-setup/
│ ├── 01-prerequisites.md
│ ├── 02-local-development.md
│ ├── 03-environment-variables.md
│ └── 04-building-project.md
│
├── 03-architecture/
│ ├── 01-system-overview.md
│ ├── 02-topology-design.md
│ ├── 03-data-flow.md
│ ├── 04-database-schema.md
│ └── 05-alert-system.md
│
├── 04-core-concepts/
│ ├── 01-storm-basics.md
│ ├── 02-spouts.md
│ ├── 03-bolts.md
│ ├── 04-streams-tuples.md
│ └── 05-state-management.md
│
├── 05-components/
│ ├── 01-bolts/
│ │ ├── 01-overview.md
│ │ ├── 02-metrics-bolt.md
│ │ ├── 03-quality-bolt.md
│ │ ├── 04-energy-bolt.md
│ │ ├── 05-level-bolt.md
│ │ ├── 06-flow-bolt.md
│ │ ├── 07-notification-bolt.md
│ │ └── 08-instantaneous-bolt.md
│ │
│ ├── 02-alerts/
│ │ ├── 01-alert-processors.md
│ │ ├── 02-alert-configuration.md
│ │ ├── 03-quality-alerts.md
│ │ ├── 04-energy-alerts.md
│ │ ├── 05-level-alerts.md
│ │ └── 06-flow-alerts.md
│ │
│ └── 03-database/
│ ├── 01-cosmos-db-integration.md
│ ├── 02-data-models.md
│ └── 03-queries.md
│
├── 06-development/
│ ├── 01-code-organization.md
│ ├── 02-adding-new-bolt.md
│ ├── 03-adding-new-alert.md
│ ├── 04-state-management-patterns.md
│ ├── 05-testing.md
│ └── 06-debugging.md
│
├── 07-configuration/
│ ├── 01-storm-config.md
│ ├── 02-alerts-config-guide.md
│ ├── 03-unit-config.md
│ └── 04-permissions.md
│
├── 08-deployment/
│ ├── 01-overview.md
│ ├── 02-server-setup.md
│ ├── 03-vm-configuration.md
│ ├── 04-jar-deployment.md
│ ├── 05-monitoring.md
│ └── 06-troubleshooting.md
│
├── 09-api-reference/
│ ├── 01-topology-builder.md
│ ├── 02-data-models.md
│ ├── 03-utilities.md
│ └── 04-constants-enums.md
│
├── 10-guides/
│ ├── 01-migration/
│ │ ├── 01-alerts-config-migration.md
│ │ ├── 02-bolt-migration.md
│ │ └── 03-reference-object-usage.md
│ │
│ ├── 02-best-practices.md
│ ├── 03-performance-tuning.md
│ ├── 04-security.md
│ └── 05-error-handling.md
│
└── 11-reference/
├── 01-glossary.md
├── 02-faq.md
├── 03-resources.md
└── 04-changelog.md
Documentation Features to Include
1. Mermaid Diagrams
- System architecture diagrams
- Data flow diagrams
- Topology structure
- State machine diagrams for alerts
- Database entity relationships
- Deployment architecture
2. Live Code Blocks
- Kotlin code examples with syntax highlighting
- Configuration file examples (YAML, properties)
- Gradle build scripts
- Shell commands for deployment
3. Interactive Elements
- Tabs for different configuration options
- Collapsible sections for detailed explanations
- Admonitions (notes, warnings, tips, dangers)
- Code annotations
4. Code Examples
- Complete bolt implementations
- Alert processor examples
- Database query examples
- Topology configuration examples
- Unit test examples
Content Strategy
Progressive Learning Path
-
Beginner Path (Week 1)
- 01-introduction/01-overview.md
- 01-introduction/02-what-is-storm.md
- 01-introduction/03-project-structure.md
- 01-introduction/04-quick-start.md
- 02-setup/01-prerequisites.md
- 02-setup/02-local-development.md
- 02-setup/04-building-project.md
-
Intermediate Path (Week 2-3)
- 04-core-concepts/01-storm-basics.md
- 04-core-concepts/02-spouts.md
- 04-core-concepts/03-bolts.md
- 03-architecture/01-system-overview.md
- 03-architecture/02-topology-design.md
- 03-architecture/03-data-flow.md
- 05-components/01-bolts/01-overview.md
- [specific bolt documentation]
-
Advanced Path (Week 4+)
- 06-development/02-adding-new-bolt.md
- 06-development/03-adding-new-alert.md
- 08-deployment/01-overview.md
- 08-deployment/02-server-setup.md
- 08-deployment/04-jar-deployment.md
- 10-guides/03-performance-tuning.md
- 10-guides/02-best-practices.md
Documentation Standards
File Naming Convention
- Use
01-,02-,03-prefix for sequential ordering - Use kebab-case for file names after prefix
- Use descriptive names (e.g.,
02-adding-new-bolt.mdnot02-new-bolt.md) - Group related files in numbered subdirectories
Content Structure
Each markdown file should follow this structure:
---
sidebar_position: [auto-determined by number prefix]
title: [Human-readable title]
---
# Title
Brief description (1-2 sentences)
## Prerequisites
What reader should know before this document
## Main Content
[Content sections with H2, H3 headings]
## What You Learned
Summary of key takeaways
## Next Steps
Links to the next sequential documentation
## Related Documentation
- Link 1
- Link 2
Code Block Standards
- Always specify language for syntax highlighting
- Include comments for complex code
- Show both working examples and common mistakes
- Use line highlighting for important sections
Diagram Standards
- Use Mermaid for all diagrams
- Include alt text descriptions
- Keep diagrams simple and focused
- Use consistent color schemes and styles
Docusaurus-Specific Features
Admonitions
Use for important callouts:
:::note
General information
:::
:::tip
Helpful suggestions
:::
:::info
Important information
:::
:::caution
Warning about potential issues
:::
:::danger
Critical warnings
:::
Code Tabs
For showing different approaches/configurations:
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<Tabs>
<TabItem value="kotlin" label="Kotlin">
```kotlin
// code
```
</TabItem>
<TabItem value="config" label="Configuration">
```yaml
# config
```
</TabItem>
</Tabs>
Code Blocks with Line Highlighting
```kotlin {2,5-7}
fun example() {
val important = "highlighted"
val normal = "not highlighted"
// These lines
// are also
// highlighted
}
### Live Code Editor
For interactive Kotlin/Java examples where applicable.
---
## Key Topics to Cover
### Alert System (Priority: HIGH)
- Alert configuration structure
- Alert types (Quality, Energy, Level, Flow)
- Alert processors
- Notification system
- Permissions and access control
### Bolt Architecture (Priority: HIGH)
- Bolt lifecycle
- State management
- Data processing patterns
- Error handling
- Performance considerations
### Database Integration (Priority: MEDIUM)
- Cosmos DB setup
- Data models
- Query patterns
- Batch operations
- Connection management
### Deployment (Priority: HIGH)
- VM setup
- Storm cluster configuration
- JAR deployment
- Monitoring and health checks
- Troubleshooting
### Migration Guides (Priority: MEDIUM)
- Alerts config migration
- Bolt standardization
- Reference object usage
---
## Documentation Maintenance
### Version Control
- Document major version changes
- Keep changelog updated (11-reference/04-changelog.md)
- Archive deprecated documentation
### Review Schedule
- Monthly review of accuracy
- Quarterly updates for new features
- Annual comprehensive review
### Community Contributions
- Contribution guidelines
- Documentation style guide
- Review process
---
## Success Metrics
1. **Completeness**: All major components documented
2. **Clarity**: New developers can set up and run the project in < 1 hour
3. **Accuracy**: Code examples are tested and working
4. **Maintainability**: Documentation is easy to update
5. **Discoverability**: Users can find information easily through sequential navigation
---
## Implementation Timeline
### Phase 1: Foundation (Current)
- ✓ Create folder structure
- ✓ Write plan.md
- Set up Docusaurus configuration
### Phase 2: Core Documentation (Week 1-2)
- 01-introduction/
- 02-setup/
- 03-architecture/
- 04-core-concepts/
### Phase 3: Component Documentation (Week 3-4)
- 05-components/01-bolts/
- 05-components/02-alerts/
- 05-components/03-database/
### Phase 4: Advanced Topics (Week 5-6)
- 06-development/
- 07-configuration/
- 08-deployment/
### Phase 5: Polish (Week 7)
- 09-api-reference/
- 10-guides/
- 11-reference/
- Review and refine all docs
- Add diagrams and interactive elements
- Final testing and validation
---
## Sequential Navigation Flow
The documentation is designed to be read in order:
01-introduction → 02-setup → 03-architecture → 04-core-concepts → 05-components → 06-development → 07-configuration → 08-deployment → 09-api-reference → 10-guides → 11-reference
Within each section, files are numbered sequentially (01-, 02-, 03-, etc.) to guide readers through the learning path naturally.