2.3 KiB
2.3 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/stylesor reusable components insrc/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.
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.