Skip to content

rwharpernc/ED-Rare-Router

Repository files navigation

ED Rare Router

A standalone web application for Elite Dangerous players to plan rare goods trading routes with PowerPlay integration.

Version

Current Version: Alpha 1.06 (March 1, 2026)

This version includes a comprehensive dataset of 140–142 rare commodities (still being verified), enhanced legality system with detailed restrictions, manual curation interface for development, first-run setup via web or CLI, and improved documentation. All rare commodity data is static; route planning is done manually by the user based on scan results.

⚠️ Important Disclaimers

THIS IS A DEVELOPMENT/HOBBY PROJECT - USE AT YOUR OWN RISK

NO WARRANTIES OR GUARANTEES ARE PROVIDED

This project is:

  • A personal hobby project - Not a commercial product
  • In active development - Still in design and prototyping phase
  • Not ready for production use - Not ready for Alpha or Beta testing
  • Subject to frequent changes - Refactors and breaking changes may occur

By using this software, you acknowledge that:

  • The software is provided "AS IS" without warranty of any kind
  • No guarantees are made regarding accuracy, reliability, or fitness for any purpose
  • You assume all risks associated with using this software
  • The authors and contributors are not liable for any damages arising from use of this software

Important Notes:

  • Refactors are going to happen frequently
  • Documentation will be kept updated
  • Code is commented
  • Features may be incomplete, unstable, or subject to significant changes

This software is licensed under the GNU General Public License v3.0, which includes warranty disclaimers. See the LICENSE file for full terms.

Overview

ED Rare Router helps commanders:

  • Quickly scan for rare goods near their current location
  • Find rare goods origins and calculate distances from current system
  • Evaluate legality of rare goods in different systems with detailed restrictions
  • View comprehensive legality information (which governments allow/disallow each item)
  • Build routes manually from scan results (all data is static - no updates needed)

Features

Core Functionality

  • Quick Scan - Single button to scan for all rare goods near your current system
  • 140-142 Rare Commodities - Complete dataset including all major rare goods from Elite Dangerous (count still being verified)
  • System Autocomplete - Search for systems using EDSM API with intelligent caching
  • Distance Calculations - Compute lightyear distances between systems
  • Smart Sorting - Results sorted closest first, with unknown systems at the end

Legality System

  • Enhanced Legality Evaluation - Comprehensive legality checking with detailed restrictions
  • Three-State Legality Display - Always Legal, Always Illegal, or Conditional
  • Detailed Restrictions - Shows which governments and superpowers allow/disallow each item
  • Combined Restrictions - Support for combined superpower + government restrictions (e.g., "Federal Democracy")
  • Expandable Details - Click to see full legality information for each rare good

PowerPlay Integration

  • Power Autocomplete - Fuzzy search for PowerPlay powers with faction badges
  • Finance Ethos Auto-Detection - Automatically determines Finance Ethos from selected power
  • CP Divisor Calculation - Shows effective CP divisors with Finance Ethos applied

User Interface

  • Vertical Layout - Selector panel above results on all screen sizes
  • Distance-Based Pagination - Optional pagination with 9 page size options (25-1000 ly)
  • Comprehensive Display - Shows pad size, cost, permit requirements, and legality
  • Back to Top Navigation - Button at end of results for easy navigation
  • Real-Time Market Data - Live buy/sell prices and stock information from EDDN (when worker is running)
  • Price Display with Fallbacks - Shows prices with source indicators:
    • "(Live)" for real-time EDDN market data
    • "(Est.)" for curated baseline prices or static costs
    • Stock and sell price information when available

Data & Performance

  • Static Data - All rare commodity data is static (locations never change - no updates needed)
  • Intelligent Caching - System coordinates and market data cached locally
  • Manual Route Planning - Users build routes manually from scan results
  • EDDN Integration - Optional real-time market data via EDDN worker service

Development Tools

  • Development Curation Tools - Manual data curation interfaces (development mode only)
    • Legality Curation - Manual legality data curation interface (/curate)
    • Price Curation - Manual baseline price curation interface (/curate-prices)
  • Cache Status Display - Shows when data was last updated
  • Comprehensive Logging - Detailed console output for debugging

For detailed feature documentation, see the API Documentation and Technical Design Document.

Tech Stack

  • Astro - Main framework for server-side rendering and API routes
  • TypeScript - Type-safe development throughout
  • React - Interactive UI components (islands)
  • TailwindCSS - Utility-first CSS framework for styling
  • EDSM API - External data source for system information

See the Technical Design Document for detailed architecture information.

Prerequisites

  • Node.js 18+Download
  • npm — Comes with Node.js

Optional (for EDDN Worker — real-time market data):

  • ZeroMQ — Required for EDDN worker service
    • Windows: zeromq.org or vcpkg install zeromq
    • macOS: brew install zeromq
    • Linux (Debian/Ubuntu): sudo apt-get install libzmq3-dev
    • Linux (Fedora): sudo dnf install zeromq-devel

See EDDN Worker Setup for details.

Installation and first-run setup

Detailed step-by-step instructions: See Setup Guide.

Quick start

  1. Clone the repository and go to the project root.

  2. Install dependencies:

    npm install
  3. Create local config (first run). Choose one:

    • Web (recommended): Run npm run dev, open http://localhost:4321 — you are redirected to /setup. Fill in at least EDSM User-Agent (e.g. ED-Rare-Router/1.0 (contact: your@email.com)), optionally data directory and API keys, then click Save config.
    • CLI: Run npm run setup and follow the prompts to create .config.json.
    • Manual: Copy config.sample.json to .config.json and edit (set edsmUserAgent and optionally dataDir, apiKeys).
  4. Optional — generate initial data:

    npm run export:rares
    npm run fetch:market   # optional

Running the Application

Basic Usage (Web Server Only)

Start the development server:

npm run dev

The application will be available at http://localhost:4321

With EDDN Worker (Real-time Market Data)

For real-time market data updates, run both services:

Terminal 1 - Web Server:

npm run dev

Terminal 2 - EDDN Worker:

npm run worker

The worker connects to EDDN via ZeroMQ and caches market data to data/eddnMarketCache.json.

Production Build

Build the production version:

npm run build

Preview the production build:

npm run preview

For production deployment, see the Local Deployment Guide for process management (PM2, systemd) and running as a service.

Deployment

Local Deployment (Recommended)

This application is designed to run locally on your own machine. This enables all features including:

  • EDDN worker service for real-time market data
  • Persistent file storage
  • Full control over the environment
  • No serverless limitations

Quick Start (Local):

  1. Install dependencies: npm install
  2. Generate initial data: npm run export:rares
  3. Start the application: npm run dev
  4. Access at: http://localhost:4321

Optional - Start EDDN Worker:

For detailed local deployment instructions, see the Local Deployment Guide.

Documentation

Last updated: March 1, 2026 · Version: 1.06.0-alpha

Root

Setup and deployment

Technical (/docs)

Note: Only README.md and CHANGELOG.md live in the repository root; all other docs are under /docs.

Configuration

Local settings are read from .config.json in the project root. This file is not committed to the repo.

  • Copy config.sample.json to .config.json and edit as needed.
  • edsmUserAgent – Used when calling the EDSM API (and in the market fetch script). Use a contact email or URL you are happy to share with EDSM; keep personal details only in your local .config.json.
  • dataDir – Optional. Set to an absolute path to store cache and data files elsewhere (e.g. to avoid committing paths or to share a data directory). Leave null to use the default data/ folder.
  • apiKeys – Single place for all API keys. Use lowercase names, e.g. "edsm": "your-key", "eddn": "...". The app reads them via getApiKey("edsm"), etc. Environment variables override: set EDSM_API_KEY, EDDN_API_KEY (uppercase name + _API_KEY) for CI or deployment.

Without .config.json, the app uses defaults (generic User-Agent and data/ under the project root).

First-run setup

When there is no .config.json, the app redirects to /setup so you can enter EDSM User-Agent, optional data directory, and API keys; the form creates .config.json for you. You can instead run npm run setup in the terminal or copy and edit config.sample.json. For full details, see the Setup Guide.

Keeping the repo clean

The repo is kept free of local machine data and logs. Do not commit:

  • Data and caches – Anything under data/ except data/.gitkeep (e.g. rares.json, edsmMarketData.json, *.json caches) is generated locally and ignored.
  • Config and secrets.config.json, .env, and any file with API keys or paths.
  • Logs*.log and logs/ are ignored.

Generate data after clone with npm run export:rares and optionally npm run fetch:market. See .gitignore for the full list.

Project Structure

/
  README.md
  CHANGELOG.md
  config.sample.json   (copy to .config.json — not committed)
  docs/
  src/
    pages/
      index.astro
      api/
        systems.ts
        rares-scan.ts
        system-lookup.ts
    components/
      Layout.astro
      RaresPlannerIsland.tsx
      SystemInput.tsx
      PowerInput.tsx
      ResultsList.tsx
      LegalityCurator.tsx
      CuratorApp.tsx
    data/
      rares.ts
      powers.ts
    lib/
      edsm.ts
      rareSystemsCache.ts
      distances.ts
      legality.ts
      powerplay.ts
      fuzzySearch.ts
      curatedLegality.ts
    pages/
      curate.astro (development only)
    types/
      rares.ts
      edsm.ts
      api.ts
  scripts/
  data/
    rareSystemsCache.json (generated)
    systemCache.json (generated)
    curatedLegality.json (generated, development only)
  styles/
    global.css

How to Use

Basic Usage

  1. Enter Your Current System: Type the name of the system you're currently in. The system autocomplete will help you find the correct name.

  2. Select Your Pledged Power (Optional):

    • Enter the name of the PowerPlay power you're pledged to
    • Finance Ethos is automatically detected from your power selection
    • If your power has Finance Ethos, a green message will appear showing the CP divisor reduction
    • Powers with Finance Ethos: Denton Patreus, Jerome Archer, Li Yong-Rui, Zemina Torval
  3. Click "Scan Nearby Rares": The app will calculate distances and legality for all rare commodities (140-142, count still being verified).

Understanding Results

  • Results are sorted by distance (closest first)
  • Each rare shows:
    • Distance from your current system to the rare's origin
    • Legality status at your current system:
      • Green "Legal" = Legal in all systems
      • Red "Illegal" = Illegal in all systems
      • Yellow "Conditional" = Legal in some systems, illegal in others (see details)
    • Expandable Legality Details showing which governments/superpowers restrict the item
    • Pad size, cost, permit requirements, and other details
  • Back to Top button appears at the end of results for easy navigation

Pagination

  • By default, all results are shown
  • Enable "Paginate by Distance" to view results in distance ranges
  • Choose from 9 page size options: 25, 50, 75, 100, 150, 200, 250, 500, or 1000 light years
  • Useful for large result sets or focusing on specific distance ranges

Finance Ethos

Finance Ethos is automatically determined from your selected power - no checkbox needed! When you select a power with Finance Ethos, a green message appears confirming it's active. Powers with Finance Ethos:

  • Denton Patreus (Empire)
  • Jerome Archer (Federation)
  • Li Yong-Rui (Independent)
  • Zemina Torval (Empire)

Author

R.W. Harper

License

This project is licensed under the GNU General Public License v3.0.

Important: This license includes warranty disclaimers. The software is provided "AS IS" without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement.

See the LICENSE file for the full license text.

For more information about GPL v3.0, visit: https://www.gnu.org/licenses/gpl-3.0.html

About

ED Rare Router is a standalone web application built with Astro, TypeScript, React, and TailwindCSS. It helps Elite Dangerous players plan rare goods trading routes with PowerPlay 2.0 integration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors