cleanup
This commit is contained in:
parent
0864af565d
commit
00b79b58d2
4 changed files with 0 additions and 250 deletions
|
|
@ -1,18 +0,0 @@
|
||||||
# Product Overview
|
|
||||||
|
|
||||||
Aprsme is an APRS (Automatic Packet Reporting System) web application that provides real-time tracking and visualization of amateur radio packets. The application connects to APRS-IS servers to receive and process amateur radio position reports, weather data, and other telemetry.
|
|
||||||
|
|
||||||
## Core Features
|
|
||||||
|
|
||||||
- **Real-time Map Visualization**: Interactive map showing APRS stations and their positions
|
|
||||||
- **Packet Processing**: Ingests and processes APRS packets from APRS-IS network
|
|
||||||
- **Station Information**: Detailed views of individual callsigns and their activity
|
|
||||||
- **Weather Data**: Weather station reporting and visualization
|
|
||||||
- **Bad Packet Analysis**: Monitoring and analysis of malformed packets
|
|
||||||
- **Multi-language Support**: Internationalization with English, Spanish, German, and French
|
|
||||||
- **User Authentication**: User accounts and session management
|
|
||||||
- **API Access**: RESTful API for programmatic access to data
|
|
||||||
|
|
||||||
## Technical Architecture
|
|
||||||
|
|
||||||
The application uses a GenStage-based packet processing pipeline to handle high-volume APRS data streams, with PostgreSQL for persistence and Phoenix LiveView for real-time web interfaces. Background job processing is handled by Oban for maintenance tasks like packet cleanup.
|
|
||||||
|
|
@ -1,115 +0,0 @@
|
||||||
# Project Structure
|
|
||||||
|
|
||||||
## Root Directory Layout
|
|
||||||
|
|
||||||
```
|
|
||||||
├── lib/ # Application source code
|
|
||||||
├── test/ # Test files
|
|
||||||
├── config/ # Configuration files
|
|
||||||
├── priv/ # Private application files (migrations, static assets)
|
|
||||||
├── assets/ # Frontend assets (CSS, JS, images)
|
|
||||||
├── deps/ # Dependencies (managed by Mix)
|
|
||||||
├── _build/ # Compiled artifacts
|
|
||||||
├── k8s/ # Kubernetes deployment manifests
|
|
||||||
├── rel/ # Release configuration
|
|
||||||
└── vendor/ # Vendored dependencies (custom APRS library)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Application Code Structure (`lib/`)
|
|
||||||
|
|
||||||
### Core Application (`lib/aprsme/`)
|
|
||||||
|
|
||||||
- **Business Logic**: Core domain modules for APRS packet processing
|
|
||||||
- **Data Layer**: Ecto schemas, repos, and database interactions
|
|
||||||
- **Background Jobs**: Oban workers for maintenance tasks
|
|
||||||
- **External Integrations**: APRS-IS connection and packet processing pipeline
|
|
||||||
|
|
||||||
#### Key Subdirectories:
|
|
||||||
|
|
||||||
- `accounts/` - User authentication and management
|
|
||||||
- `is/` - APRS-IS server connection and supervision
|
|
||||||
- `packets/` - Packet processing, clustering, and queries
|
|
||||||
- `workers/` - Background job workers
|
|
||||||
|
|
||||||
### Web Layer (`lib/aprsme_web/`)
|
|
||||||
|
|
||||||
- **Controllers**: HTTP request handlers and API endpoints
|
|
||||||
- **LiveViews**: Real-time interactive pages
|
|
||||||
- **Components**: Reusable UI components
|
|
||||||
- **Plugs**: Custom middleware for authentication, rate limiting, etc.
|
|
||||||
|
|
||||||
#### Key Subdirectories:
|
|
||||||
|
|
||||||
- `controllers/` - Traditional Phoenix controllers and API endpoints
|
|
||||||
- `live/` - Phoenix LiveView modules organized by feature
|
|
||||||
- `components/` - Shared UI components and layouts
|
|
||||||
- `plugs/` - Custom Plug modules
|
|
||||||
|
|
||||||
## Configuration Structure (`config/`)
|
|
||||||
|
|
||||||
- `config.exs` - Base configuration
|
|
||||||
- `dev.exs` - Development environment
|
|
||||||
- `prod.exs` - Production environment
|
|
||||||
- `runtime.exs` - Runtime configuration (environment variables)
|
|
||||||
- `test.exs` - Test environment
|
|
||||||
|
|
||||||
## Test Structure (`test/`)
|
|
||||||
|
|
||||||
- Mirrors `lib/` structure with `_test.exs` suffix
|
|
||||||
- `test/support/` - Test helpers and fixtures
|
|
||||||
- `test/fixtures/` - Test data fixtures
|
|
||||||
- `test/integration/` - Integration tests
|
|
||||||
|
|
||||||
## Asset Structure (`assets/`)
|
|
||||||
|
|
||||||
- `css/` - Tailwind CSS files
|
|
||||||
- `js/` - JavaScript/TypeScript files
|
|
||||||
- `features/` - Feature-specific JS modules
|
|
||||||
- `hooks/` - Phoenix LiveView hooks
|
|
||||||
- `types/` - TypeScript type definitions
|
|
||||||
|
|
||||||
## Database Structure (`priv/repo/`)
|
|
||||||
|
|
||||||
- `migrations/` - Ecto database migrations
|
|
||||||
- `seeds.exs` - Database seeding script
|
|
||||||
|
|
||||||
## Naming Conventions
|
|
||||||
|
|
||||||
### Modules
|
|
||||||
|
|
||||||
- **Contexts**: `Aprsme.ContextName` (e.g., `Aprsme.Accounts`, `Aprsme.Packets`)
|
|
||||||
- **Schemas**: `Aprsme.Context.SchemaName` (e.g., `Aprsme.Accounts.User`)
|
|
||||||
- **Web Modules**: `AprsmeWeb.ModuleName` (e.g., `AprsmeWeb.UserController`)
|
|
||||||
- **LiveViews**: `AprsmeWeb.FeatureLive.Action` (e.g., `AprsmeWeb.MapLive.Index`)
|
|
||||||
|
|
||||||
### Files
|
|
||||||
|
|
||||||
- **Contexts**: `snake_case.ex` (e.g., `packet_consumer.ex`)
|
|
||||||
- **Tests**: `module_name_test.exs`
|
|
||||||
- **Templates**: `action_name.html.heex` for LiveView templates
|
|
||||||
|
|
||||||
## Architecture Patterns
|
|
||||||
|
|
||||||
### Phoenix Contexts
|
|
||||||
|
|
||||||
- Business logic organized into bounded contexts
|
|
||||||
- Each context has a main module that serves as the public API
|
|
||||||
- Internal modules handle specific responsibilities
|
|
||||||
|
|
||||||
### GenStage Pipeline
|
|
||||||
|
|
||||||
- `PacketProducer` → `PacketConsumer` pipeline for APRS data processing
|
|
||||||
- Supervised by `PacketPipelineSupervisor`
|
|
||||||
- Configurable batch processing parameters
|
|
||||||
|
|
||||||
### LiveView Organization
|
|
||||||
|
|
||||||
- Feature-based organization (e.g., `map_live/`, `packets_live/`)
|
|
||||||
- Shared components in `components/`
|
|
||||||
- Shared utilities in `shared/`
|
|
||||||
|
|
||||||
### Error Handling
|
|
||||||
|
|
||||||
- `ErrorTracker` for application error monitoring
|
|
||||||
- Custom error handlers and circuit breakers for external services
|
|
||||||
- Structured logging with sanitization for sensitive data
|
|
||||||
|
|
@ -1,100 +0,0 @@
|
||||||
# Technology Stack
|
|
||||||
|
|
||||||
## Core Technologies
|
|
||||||
|
|
||||||
- **Elixir**: ~> 1.17 - Primary programming language
|
|
||||||
- **Phoenix Framework**: ~> 1.8 - Web framework
|
|
||||||
- **Phoenix LiveView**: ~> 1.0.17 - Real-time web interfaces
|
|
||||||
- **PostgreSQL**: Database with PostGIS extension for geospatial data
|
|
||||||
- **Ecto**: Database wrapper and query generator
|
|
||||||
|
|
||||||
## Key Dependencies
|
|
||||||
|
|
||||||
### Web & UI
|
|
||||||
|
|
||||||
- **Bandit**: HTTP server (replaces Cowboy)
|
|
||||||
- **Phoenix LiveDashboard**: Development and monitoring dashboard
|
|
||||||
- **Tailwind CSS**: Utility-first CSS framework
|
|
||||||
- **Heroicons**: Icon library
|
|
||||||
- **ESBuild**: JavaScript bundler
|
|
||||||
|
|
||||||
### Data Processing
|
|
||||||
|
|
||||||
- **GenStage**: Stream processing for APRS packet pipeline
|
|
||||||
- **Oban**: Background job processing
|
|
||||||
- **Cachex**: In-memory caching
|
|
||||||
- **Geo/PostGIS**: Geospatial data handling
|
|
||||||
|
|
||||||
### External Integrations
|
|
||||||
|
|
||||||
- **HTTPoison/Req**: HTTP clients
|
|
||||||
- **Jason**: JSON encoding/decoding
|
|
||||||
- **Swoosh**: Email delivery
|
|
||||||
|
|
||||||
### Development Tools
|
|
||||||
|
|
||||||
- **Credo**: Static code analysis
|
|
||||||
- **Dialyxir**: Static type analysis
|
|
||||||
- **Styler**: Code formatting
|
|
||||||
- **ExVCR**: HTTP interaction recording for tests
|
|
||||||
- **Sobelow**: Security-focused static analysis
|
|
||||||
|
|
||||||
## Common Commands
|
|
||||||
|
|
||||||
### Development Setup
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mix deps.get # Install dependencies
|
|
||||||
mix ecto.setup # Create and migrate database
|
|
||||||
mix phx.server # Start development server
|
|
||||||
iex -S mix phx.server # Start with interactive shell
|
|
||||||
```
|
|
||||||
|
|
||||||
### Database Operations
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mix ecto.create # Create database
|
|
||||||
mix ecto.migrate # Run migrations
|
|
||||||
mix ecto.reset # Drop, create, and migrate database
|
|
||||||
mix ecto.gen.migration # Generate new migration
|
|
||||||
```
|
|
||||||
|
|
||||||
### Code Quality
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mix credo # Run static analysis
|
|
||||||
mix dialyzer # Run type analysis
|
|
||||||
mix format # Format code
|
|
||||||
mix test # Run test suite
|
|
||||||
mix test.watch # Run tests in watch mode
|
|
||||||
```
|
|
||||||
|
|
||||||
### Asset Management
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mix assets.deploy # Build and optimize assets for production
|
|
||||||
mix tailwind default # Compile Tailwind CSS
|
|
||||||
mix esbuild default # Compile JavaScript
|
|
||||||
```
|
|
||||||
|
|
||||||
### Production
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mix release # Build production release
|
|
||||||
mix phx.digest # Generate asset digests
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
- **Development**: `config/dev.exs`
|
|
||||||
- **Production**: `config/prod.exs`
|
|
||||||
- **Runtime**: `config/runtime.exs`
|
|
||||||
- **Test**: `config/test.exs`
|
|
||||||
- **Base**: `config/config.exs`
|
|
||||||
|
|
||||||
## Code Style
|
|
||||||
|
|
||||||
- Uses **Styler** plugin for consistent formatting
|
|
||||||
- **Credo** enforces code quality with 120 character line limit
|
|
||||||
- **Dialyzer** for static type analysis
|
|
||||||
- Import dependencies: `:ecto`, `:ecto_sql`, `:phoenix`, `:stream_data`
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
"output": "stdio",
|
|
||||||
"version": "1.0",
|
|
||||||
"project": {
|
|
||||||
"name": "aprsme",
|
|
||||||
"type": "beam",
|
|
||||||
"apps": [
|
|
||||||
{
|
|
||||||
"name": "aprsme",
|
|
||||||
"additional_includes": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"paths": [
|
|
||||||
"_build/prod/lib"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Reference in a new issue