feat: Add sovereignty service and feature documentation#105
feat: Add sovereignty service and feature documentation#105umutyerebakmaz wants to merge 6 commits intomainfrom
Conversation
- Add SovereigntyService with ESI endpoints for campaigns, map, and structures - Add comprehensive English feature documentation (SOVEREIGNTY_FEATURES.md) - Add comprehensive Turkish feature documentation (SOVEREIGNTY_FEATURES_TR.md) - Include data schema suggestions and implementation roadmap
|
There was a problem hiding this comment.
Pull request overview
Adds initial backend support and planning docs for Sovereignty (Sov) features, including a new ESI-backed service and detailed feature/roadmap documentation to guide future implementation.
Changes:
- Added
SovereigntyServicewith ESI fetch methods for campaigns, sovereignty map, and sovereignty structures. - Normalized the solar system info ESI URL (removed trailing slash).
- Added comprehensive sovereignty feature/roadmap docs in English and Turkish.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| backend/src/services/sovereignty/sovereignty.service.ts | Introduces a new service wrapper for sovereignty ESI endpoints (campaigns/map/structures). |
| backend/src/services/solar-system/solar-system.service.ts | Updates the ESI system info URL format to be consistent with other calls. |
| backend/docs/features/SOVEREIGNTY_FEATURES.md | Adds detailed English sovereignty feature proposals, schema ideas, and roadmap. |
| backend/docs/features/SOVEREIGNTY_FEATURES_TR.md | Adds Turkish version of the sovereignty feature proposals, schema ideas, and roadmap. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| -getWarZoneKillmails(campaignId, dateRange) - | ||
| getCampaignCombatStats(campaignId) - | ||
| getAllianceWarPerformance(allianceId, dateRange) - | ||
| predictCampaignOutcome(campaignId) - | ||
| getStructureKillHistory(allianceId, structureType) - | ||
| getCampaignParticipantStats(campaignId, participantId); |
| relatedKillmails Killmail[] @relation("CampaignKillmails") | ||
| solarSystem SolarSystem @relation(fields: [solar_system_id], references: [system_id]) | ||
|
|
||
| @@index([solar_system_id, start_time]) | ||
| @@index([campaign_id]) | ||
| @@index([end_time]) | ||
| } | ||
|
|
||
| // Kampanya Katılımcıları | ||
| model CampaignParticipant { | ||
| id Int @id @default(autoincrement()) | ||
| campaign_id Int | ||
| alliance_id Int | ||
| score Float | ||
| created_at DateTime @default(now()) | ||
|
|
||
| campaign SovereigntyCampaign @relation(fields: [campaign_id], references: [campaign_id]) | ||
| alliance Alliance @relation(fields: [alliance_id], references: [alliance_id]) | ||
|
|
||
| @@unique([campaign_id, alliance_id]) | ||
| @@index([alliance_id]) | ||
| } | ||
|
|
||
| // Sovereignty Harita Geçmişi (Günlük Anlık Görüntüler) | ||
| model SovereigntyMapSnapshot { | ||
| id Int @id @default(autoincrement()) | ||
| system_id Int | ||
| alliance_id Int? | ||
| corporation_id Int? | ||
| faction_id Int? | ||
| snapshot_date DateTime | ||
| created_at DateTime @default(now()) | ||
|
|
||
| solarSystem SolarSystem @relation(fields: [system_id], references: [system_id]) | ||
|
|
| /** | ||
| * Fetches sovereignty map showing which alliances/factions control which systems | ||
| * @returns Array of sovereignty map entries | ||
| */ | ||
| static async getSovereigntyMap(): Promise<SovereigntyMap[]> { | ||
| return esiRateLimiter.execute(async () => { | ||
| const response = await axios.get(`${ESI_BASE_URL}/sovereignty/map`); | ||
| return response.data; | ||
| }); | ||
| } | ||
|
|
||
|
|
||
| /** | ||
| * Fetches all sovereignty structures (TCUs, IHubs, etc.) | ||
| * @returns Array of sovereignty structures | ||
| */ | ||
| static async getSovereigntyStructures(): Promise<SovereigntyStructure[]> { |
| -getWarZoneKillmails(campaignId, dateRange) - | ||
| getCampaignCombatStats(campaignId) - | ||
| getAllianceWarPerformance(allianceId, dateRange) - | ||
| predictCampaignOutcome(campaignId) - | ||
| getStructureKillHistory(allianceId, structureType) - | ||
| getCampaignParticipantStats(campaignId, participantId); |
| relatedKillmails Killmail[] @relation("CampaignKillmails") | ||
| solarSystem SolarSystem @relation(fields: [solar_system_id], references: [system_id]) | ||
|
|
||
| @@index([solar_system_id, start_time]) | ||
| @@index([campaign_id]) | ||
| @@index([end_time]) | ||
| } | ||
|
|
||
| // Campaign Participants | ||
| model CampaignParticipant { | ||
| id Int @id @default(autoincrement()) | ||
| campaign_id Int | ||
| alliance_id Int | ||
| score Float | ||
| created_at DateTime @default(now()) | ||
|
|
||
| campaign SovereigntyCampaign @relation(fields: [campaign_id], references: [campaign_id]) | ||
| alliance Alliance @relation(fields: [alliance_id], references: [alliance_id]) | ||
|
|
||
| @@unique([campaign_id, alliance_id]) | ||
| @@index([alliance_id]) | ||
| } | ||
|
|
||
| // Sovereignty Map History (Daily Snapshots) | ||
| model SovereigntyMapSnapshot { | ||
| id Int @id @default(autoincrement()) | ||
| system_id Int | ||
| alliance_id Int? | ||
| corporation_id Int? | ||
| faction_id Int? | ||
| snapshot_date DateTime | ||
| created_at DateTime @default(now()) | ||
|
|
||
| solarSystem SolarSystem @relation(fields: [system_id], references: [system_id]) | ||
|
|
- Changed import statements in multiple worker files to use absolute paths for better readability and maintainability. - Updated logging and database service imports to reflect the new structure. - Ensured consistent formatting and error handling across workers.
Pull Request
📋 Description
🔗 Related Issue
Fixes #(issue number)
🎯 Type of Change
🧪 Testing
Test Configuration
Test Steps
📸 Screenshots / Videos
Before
After
✅ Checklist
Code Quality
Testing
Documentation
Database & API
yarn codegen)Dependencies
yarn auditand resolved any security issues🔍 Review Focus Areas
📝 Additional Notes
🚀 Deployment Notes
📊 Performance Impact
🔄 Migration Guide
📚 References