Project Structure - Incomplete-Infinity/eve-companion GitHub Wiki
๐ 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
.jseven if later converted to.ts - Folder names use kebab-case
- Class names follow PascalCase
- All imports are relative to
/srcusing 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