Files
hamview/ui/AGENTS.md
maze 247c827291
Some checks failed
Test and build / Test and lint (push) Failing after 35s
Test and build / Build collector (push) Failing after 37s
Test and build / Build receiver (push) Failing after 37s
Added SNR and refactored types
2026-03-06 09:06:08 +01:00

2.5 KiB

AGENTS

This document provides context for AI agents working on this codebase.

Project Overview

HAMView is an online Amateur Radio digital protocol live viewer. It features:

  • Displaying online radio receivers in near real-time
  • Streaming of popular Amateur Radio protocols such as APRS, MeshCore, etc.
  • A live packet stream for each of the protocols
  • Packet inspection

Tech Stack

Used technologies:

  • Framework: React 19 with TypeScript
  • Build Tool: Vite 7
  • User Interface: React-Bootstrap with Bootstrap version 5
  • Code Editor: Visual Studio Code
  • Backend: Go with labstack echo router
  • Libraries used: Axios for API requests, mqtt.js for streaming
  • Testing: use npm run build

Relevant documents:

  • API documentation is in ../server

Testing Requirements

Always run tests before completing a task.

Run npm run build and run pre-commit run --files changed files...

Coding Guidelines

General

  • Prefer ESM imports (import/export)
  • Use builtins from React, React-Boostrap where possible
  • Follow existing code patterns in the code base
  • Look for opportunities to create reusable styles in src/styles or reusable components in src/components
  • Never make changes outside of the project directory, if you think this is necessary prompt me for approval
  • Only add things related to the prompted instructions, unless it is required to make the requested changes
  • When adding imports, apply the import styling rules from the next section.

Styling

  • Use React-Bootstrap components where appropriate
  • Follow existing CSS patterns
  • Add reusable style elements to the src/App.scss
  • Explicit imports are better than implicit exports, be as specific as possible to minimize code size
  • Order imports:
    • React import first; then any react plugin
    • Third-party libraries;
    • Services;
    • Local types imports;
    • Local imports;
    • Stylesheets
  • Long import statements (> 3 imports) should use multiline import
  • Sort import imports alphabetically

Protected files

Never modify files inside the data/ directory. This directory contains game data that should remain unchanged.

Never add secrets to code.

Modifying code

Prefer the patching strategy over running shell commands where possible. Prevent using temporary files and shell commands where possible.

Addressing

Don't call me "the user", refer to me as "the developer". Refrain from using hyperbolic expressions like "excellent" and "perfect", "ok" or "good" is good enough.