Skip to content

feat: Add sovereignty service and feature documentation#105

Open
umutyerebakmaz wants to merge 6 commits intomainfrom
feature/sov
Open

feat: Add sovereignty service and feature documentation#105
umutyerebakmaz wants to merge 6 commits intomainfrom
feature/sov

Conversation

@umutyerebakmaz
Copy link
Owner

@umutyerebakmaz umutyerebakmaz commented Mar 14, 2026

  • 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

Pull Request

📋 Description

🔗 Related Issue

Fixes #(issue number)

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Configuration change
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • ✅ Test update
  • 🎨 Style/UI update

🧪 Testing

Test Configuration

  • Browser/Environment:
  • Node version:
  • Database:

Test Steps

📸 Screenshots / Videos

Before

After

✅ Checklist

Code Quality

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have removed any console.logs or debugging code

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested the changes in a development environment
  • I have tested edge cases and error scenarios

Documentation

  • I have updated the documentation accordingly
  • I have updated the README if needed
  • I have added/updated JSDoc comments for new functions/classes
  • I have updated the CHANGELOG (if applicable)

Database & API

  • I have created/updated Prisma migrations (if needed)
  • I have updated the GraphQL schema (if needed)
  • I have regenerated TypeScript types (yarn codegen)
  • Database migrations have been tested

Dependencies

  • I have checked that new dependencies are necessary
  • I have verified licenses of new dependencies
  • I have run yarn audit and resolved any security issues

🔍 Review Focus Areas

📝 Additional Notes

🚀 Deployment Notes

  • Requires database migration
  • Requires environment variable updates
  • Requires service restart
  • Requires cache clearing
  • Other:

📊 Performance Impact

  • Database queries:
  • API response time:
  • Frontend bundle size:
  • Memory usage:

🔄 Migration Guide

📚 References


- 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
Copilot AI review requested due to automatic review settings March 14, 2026 23:15
@changeset-bot
Copy link

changeset-bot bot commented Mar 14, 2026

⚠️ No Changeset found

Latest commit: 000df12

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SovereigntyService with 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.

Comment on lines +162 to +167
-getWarZoneKillmails(campaignId, dateRange) -
getCampaignCombatStats(campaignId) -
getAllianceWarPerformance(allianceId, dateRange) -
predictCampaignOutcome(campaignId) -
getStructureKillHistory(allianceId, structureType) -
getCampaignParticipantStats(campaignId, participantId);
Comment on lines +582 to +616
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])

Comment on lines +54 to +70
/**
* 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[]> {
Comment on lines +162 to +167
-getWarZoneKillmails(campaignId, dateRange) -
getCampaignCombatStats(campaignId) -
getAllianceWarPerformance(allianceId, dateRange) -
predictCampaignOutcome(campaignId) -
getStructureKillHistory(allianceId, structureType) -
getCampaignParticipantStats(campaignId, participantId);
Comment on lines +582 to +616
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])

@umutyerebakmaz umutyerebakmaz self-assigned this Mar 16, 2026
@umutyerebakmaz umutyerebakmaz added the enhancement New feature or request label Mar 16, 2026
@umutyerebakmaz umutyerebakmaz added this to the phase-one milestone Mar 16, 2026
@github-project-automation github-project-automation bot moved this to 🆕 New in killreport Mar 16, 2026
@umutyerebakmaz umutyerebakmaz linked an issue Mar 16, 2026 that may be closed by this pull request
10 tasks
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

[Feature]: sovereignty

2 participants