System Requirements
Before setting up the local development environment, ensure you have the following software installed and added to your system PATH.Required Software
Docker
Docker
Docker is required for building and running containers.Installation: Docker Installation GuideVerify installation:
Go
Go
Go is required for building the backend modules.Required Version: 1.24.0 or higherInstallation: Download GoVersion Reference: Check modules/go.work for the exact required versionVerify installation:
Node.js
Node.js
Node.js is required for the web frontend development.Required Version: 18.14.0 or higherInstallation: Node.js DownloadsVersion Reference: Check modules/web/package.json for the exact required versionVerify installation:
Yarn
Yarn
Yarn is the package manager used for JavaScript dependencies.Required Version: 3.3.0Installation: Yarn Installation GuideVersion Reference: Check modules/web/.yarnrc.yml for the exact required versionVerify installation:
Initial Setup
After cloning the repository, follow these steps to set up your development environment:1. Install Web Dependencies
Navigate to the web module and install JavaScript dependencies:2. Install Development Tools
Install required development tools:Development Workflows
Starting Development Server
The primary way to run the dashboard during development is using theserve target:
- Ensure all required tools are installed
- Clean up temporary directories
- Create a local kind cluster (if not already created)
- Install metrics-server in the cluster
- Build and start all modules using Docker Compose
- Make the dashboard available at http://localhost:8080
The development server uses hot-reloading for the frontend, so changes to the code will be automatically reflected.
Port Requirements
Make sure the following ports are free on your localhost:| Port | Service | Used By |
|---|---|---|
| 8080 | Web HTTP | Development server (make serve) |
| 8443 | Gateway HTTPS | Production server (make run) |
| 443 | HTTPS | Helm installation (make helm) |
Running Production Mode
To test the production build locally:- Build production-ready Docker images
- Start the dashboard with production configuration
- Make the dashboard available at:
- HTTPS: https://localhost:8443
- HTTP: http://localhost:8080
Dependency Management
Go Dependencies
The project uses go mod to manage Go dependencies. Best Practices:- Use only official releases
- Avoid using specific or latest commits
- Run
go mod tidybefore committing changes to remove unused dependencies
JavaScript Dependencies
The project uses Yarn to manage JavaScript dependencies. Best Practices:- All dependencies are tracked in
modules/web/package.json - Lock file (
yarn.lock) ensures consistent installations - The project uses Yarn 3.3.0 with node-modules linker
Automated Updates
The project uses Dependabot to automate dependency updates, ensuring security patches and updates are applied regularly.Development Tools
The project includes several tools to ensure code quality:Linters
- golangci-lint - Go code linting
- eslint - TypeScript/JavaScript linting
- stylelint - CSS/SCSS linting
- prettier - Code formatting
Running Checks
Run all checks before submitting a pull request:Auto-fixing Issues
Many linting issues can be automatically fixed:Next Steps
Building
Learn how to build Docker images and production artifacts
Testing
Run tests and ensure code quality