Skip to content

Project Structure

PhobiaCide edited this page Apr 15, 2025 · 1 revision

🗂 Project Structure

This page explains the folder layout and architectural conventions used in the EVE Companion App. The structure is optimized for clarity, modularity, and long-term scalability.


📁 Root-Level Layout

/
├── docs/             # Auto-generated documentation (JSDoc)
├── img/              # Images and visual references
├── src/              # All application source code
├── style-guide/      # Design assets, theme drafts, and references
├── package.json      # Scripts and dependencies
├── jsdoc.json        # Configuration for documentation
├── esi.json          # (Optional) local ESI Swagger schema

📦 Source Code (/src)

src/
├── api/              # Generated Swagger client (ESI)
│   └── esi/
├── components/       # (Planned) Reusable UI templates
├── js/
│   └── main/         # App logic classes (1 per file)
├── index.js          # Electron main process entry
├── renderer.js       # Renderer process entry (browser UI)

🧠 Class-per-File Pattern

All core classes reside in src/js/main/ and follow this convention:

File Class Responsibility
InventoryType.js InventoryType Manages item type data from ESI
Character.js Character Encapsulates character data & actions
Corporation.js Corporation Handles corp-specific ESI endpoints
System.js System Represents solar systems from universe

Each file:

  • Exports a single class as default
  • Includes a load() method to fetch from ESI
  • Uses class properties to expose enriched data
  • May cache results locally using Dexie or memory

🧾 Naming Conventions

  • Files are camelCase or PascalCase matching class names
  • All class files are suffixed with .js even if later converted to .ts
  • Folder names use kebab-case
  • Class names follow PascalCase
  • All imports are relative to /src using alias support in Webpack (e.g. @/js/main/Character)

🧰 Project Evolution Notes

  • components/ will grow into reusable, isolated UI modules (e.g. window frames, tool panels)
  • Preload scripts (e.g. preload.js) will bridge renderer/main securely (coming soon)
  • Style guide is temporary but useful for empire theme development

📌 Summary

  • Source files are organized by purpose and domain
  • Classes are structured around ESI models
  • Clear, readable folder layout keeps the project maintainable

Clone this wiki locally