Introduction to AquaGen Web Application
Welcome to the AquaGen Web Application documentation. This section covers everything you need to know to get started with the platform.
📚 Documentation Contents
1. Architecture Diagrams
What you'll learn:
- High-level system architecture diagram
- Application bootstrap flow (5-level provider chain)
- Nx monorepo structure with all 27 libraries
- Dependency flow and import rules
- Feature library internal architecture pattern
- Complete data flow (Component → Store → Controller → DataSource → API)
- Authentication flow (Azure AD + Google OAuth)
- Routing architecture (all routes mapped)
- Shared library internals
- Build and deployment pipeline
- Component library overview (39 categories)
- API architecture (interceptors, endpoints, environments)
- State management overview (Global + Feature stores)
- Security layers (5 layers)
- Mobile architecture (Capacitor)
- Key files quick reference
Start here if: You want a visual overview of the entire system before diving into details.
2. Overview
What you'll learn:
- What is AquaGen and its purpose
- Key features and capabilities
- Complete technology stack
- All application modules (25+ features)
- Architecture highlights
- Browser and mobile support
- Performance and security features
Start here if: You're new to the project and want to understand what AquaGen does.
3. Installation
What you'll learn:
- Prerequisites (Node.js, npm, Git)
- Step-by-step installation guide
- Environment configuration
- Firebase setup
- Azure AD authentication
- API endpoints
- Verification steps
- Common installation issues and solutions
Start here if: You need to set up your development environment.
4. Micro-Frontend Architecture
What you'll learn:
- Micro-frontend architecture concepts
- Nx monorepo structure
- Module Federation setup (ready to enable)
- Rspack bundler configuration
- Apps vs Libraries organization
- Dependency rules and constraints
- Design patterns (Controller, DataSource, Store)
- Routing architecture
- Build process details
Start here if: You want to understand the technical architecture and design decisions.
5. Commands Reference
What you'll learn:
- All npm scripts explained
- Development (
npm start,npm run start:app) - Build (
npm run build,npm run build:app) - Project management (
npm run create:lib,npm run integrate:lib) - Deployment (
npm run deploy:app)
- Development (
- Nx commands (build, serve, test, lint, generate)
- Git workflow commands
- Firebase commands
- Environment variables
- Quick reference cheat sheet
Start here if: You need to know what commands are available and how to use them.
6. Deployment
What you'll learn:
- Firebase Hosting setup
- Complete deployment process
- All 14 hosting targets (uat, test1-9, demo, pre-prod, dev, aquagen)
- Security headers and CSP configuration
- Rollback strategies
- CI/CD with GitHub Actions
- Custom domain setup
- Performance optimization
- Troubleshooting deployment issues
- Deployment checklist
Start here if: You need to deploy the application to Firebase hosting.
🚀 Quick Start Path
For New Developers
- Read Overview - Understand what AquaGen is
- Follow Installation - Set up your environment
- Review Commands Reference - Learn the essential commands
- Start coding!
For Architects
- Read Overview - Understand the platform
- Study Micro-Frontend Architecture - Deep dive into design
- Review Commands Reference - Understand build tooling
- Plan your implementation
For DevOps Engineers
- Read Installation - Understand setup requirements
- Study Deployment - Learn deployment process
- Review Commands Reference - Understand build commands
- Set up CI/CD pipelines
📁 Project Structure Overview
aquagen_web_appp/
├── apps/ # Applications
│ ├── production/ # Main production app
│ ├── demo/ # Demo app
│ └── *-e2e/ # E2E test apps
├── libs/ # Feature libraries
│ ├── dashboard/ # Dashboard module
│ ├── monitoring/ # Monitoring module
│ ├── energy/ # Energy module
│ ├── aquagpt/ # AI-powered insights
│ ├── shared/ # Shared utilities
│ ├── components/ # Reusable UI components
│ └── ... (20+ more)
├── docs/ # Documentation (you are here!)
│ └── Introduction/ # Getting started docs
├── package.json # Dependencies and scripts
├── nx.json # Nx workspace configuration
└── firebase.json # Firebase hosting config
🔑 Key Concepts
Nx Monorepo
A single repository containing multiple applications and libraries, managed by Nx for efficient builds and dependency management.
Micro-Frontend Architecture
The application is split into independent feature modules that can be developed, tested, and potentially deployed separately.
Module Federation
Advanced build configuration (ready to enable) that allows dynamic loading of feature modules at runtime.
Feature Libraries
Self-contained modules with business logic, organized with:
- Components - UI components
- Controller - Business logic
- DataSource - API integration
- Store - State management
- Helpers - Utility functions
- Enums - Constants
🛠️ Technology Stack
| Category | Technologies |
|---|---|
| Frontend | React 19, Material-UI 7, TypeScript 5.7 |
| Build Tools | Nx 21, Rspack 1.3, Module Federation |
| State Management | React Context, Custom Hooks |
| Data Visualization | Chart.js, Recharts, Plotly.js, Leaflet |
| Authentication | Azure MSAL, Google OAuth |
| Testing | Jest, Cypress, Playwright |
| Deployment | Firebase Hosting, Capacitor (Mobile) |
| Monitoring | Sentry, Mixpanel, Google Analytics 4 |
📖 Additional Documentation
Beyond this Introduction section, additional documentation covers:
- Libraries & Components - Detailed docs for each feature library
- APIs & Data Flow - How data flows through the application
- Development Workflow - Daily development tasks and best practices
- Testing Strategy - Unit, integration, and E2E testing
- Troubleshooting - Common issues and solutions
- FAQ - Frequently asked questions
🎯 Learning Path
Week 1: Getting Started
- Complete Installation
- Read Overview
- Run the app locally (
npm start) - Explore the codebase
- Review Micro-Frontend Architecture
Week 2: Development
- Study Commands Reference
- Create a test library (
npm run create:lib) - Make a small code change
- Build the application (
npm run build) - Understand the feature architecture pattern
Week 3: Deployment
- Read Deployment
- Deploy to test environment
- Learn Firebase hosting configuration
- Understand security headers and CSP
Week 4+: Advanced Topics
- Deep dive into specific libraries
- Learn testing strategies
- Explore API integration patterns
- Contribute to the project
💡 Tips for Success
- Start with the basics - Don't skip Installation
- Use the commands reference - Keep Commands Reference handy
- Understand the architecture - Read Micro-Frontend Architecture before coding
- Follow the patterns - All features use Controller/DataSource/Store pattern
- Test locally before deploying - Always test builds with
npm run serve:build - Ask questions - If something is unclear, refer back to this documentation
🔗 Quick Links
- Main Documentation Index
- Overview
- Installation
- Micro-Frontend Architecture
- Commands Reference
- Deployment
📝 Documentation Format
Each document follows this structure:
- Clear headings - Easy navigation
- Code examples - Practical demonstrations
- Step-by-step instructions - For complex tasks
- Troubleshooting sections - Common issues and solutions
- Cross-references - Links to related documentation
Ready to get started? Begin with Overview or jump straight to Installation!
Last Updated: February 2026 Maintained By: AquaGen Development Team