SkillAgentSearch skills...

API

The star-citizen.wiki API. Automatically scrapes Comm-Links, Stats and In-Game Data.

Install / Use

/learn @StarCitizenWiki/API
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Star Citizen API

A Laravel-based API providing comprehensive access to Star Citizen game data, including vehicles, items, manufacturers, star systems, comm-links, and galactapedia entries. Features multi-language support (English, German, Chinese Simplified) with automated translation capabilities.

Key Features

  • Complete Game Data: Items, vehicles, manufacturers, tags, and specifications from unpacked game files
  • Starmap Integration: Full star system, celestial object, and jump point data
  • Comm-Link Archive: Automated downloading, importing, and translating of official RSI Comm-Links
  • Galactapedia: Synchronized galactapedia articles with translation support
  • Ship Matrix & Pricing: Daily updates of ship specifications, MSRP, and loaner information
  • Multi-language Support: English, German, and Chinese Simplified translations
  • RESTful API: Well-documented API endpoints for all data (see docs.star-citizen.wiki)

Quick Start with Docker

Prerequisites

  • Docker 20.10+
  • Docker Compose 2.0+
  • Git

Installation Steps

  1. Clone the repository

    git clone https://github.com/StarCitizenWiki/API.git
    cd API
    
  2. Initialize git submodules

    git submodule update --init --recursive
    
  3. Configure environment variables

    cp .env.example .env
    

    Edit .env and configure at minimum:

    • APP_NAME, APP_KEY, APP_URL
    • POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD
    • DB_DATABASE, DB_USERNAME, DB_PASSWORD (should match POSTGRES_* values)
  4. Start all services

    docker compose up -d
    
  5. Run initial setup

    docker compose exec api php artisan key:generate
    docker compose exec api php artisan migrate
    docker compose exec api php artisan game:add-version --default <SC_UNPACKED_DATA_VERSION>
    docker compose exec api php artisan db:seed
    docker compose exec api php artisan game:sync
    
  6. Verify installation

    Visit http://localhost:8080 to access the API.


Environment Configuration

Configure your .env file with the following variables. Priority indicators help you understand which variables are critical.

Priority Indicators:

  • 🔴 Required - Must be set for the application to function
  • 🟡 Important - Should be configured for full functionality
  • Optional - Has sensible defaults, configure as needed

Application Core

| Variable | Priority | Default | Description | |----------|----------|---------|-------------| | APP_NAME | 🔴 | Laravel | Application name | | APP_KEY | 🔴 | (generate) | Encryption key - generate with php artisan key:generate | | APP_ENV | 🔴 | local | Environment: local, production | | APP_URL | 🔴 | http://localhost | Base URL for the application | | APP_DEBUG | 🔴 | true | Enable debug mode (set false in production) | | APP_LOCALE | ⚪ | en | Default language | | APP_FALLBACK_LOCALE | ⚪ | en | Fallback language |

Database - PostgreSQL

| Variable | Priority | Default | Description | |----------|----------|---------|-------------| | DB_CONNECTION | 🔴 | pgsql | Database driver (must be pgsql) | | DB_HOST | 🔴 | 127.0.0.1 | Database host (db for Docker) | | DB_PORT | 🔴 | 5432 | PostgreSQL port | | DB_DATABASE | 🔴 | api | Database name | | DB_USERNAME | 🔴 | root | Database username | | DB_PASSWORD | 🔴 | (empty) | Database password | | POSTGRES_DB | 🔴 | (match DB_DATABASE) | PostgreSQL container database name | | POSTGRES_USER | 🔴 | (match DB_USERNAME) | PostgreSQL container username | | POSTGRES_PASSWORD | 🔴 | (match DB_PASSWORD) | PostgreSQL container password |

External Services

| Variable | Priority | Default | Description | |----------|----------|---------|-------------| | DEEPL_AUTH_KEY | 🟡 | (empty) | DeepL API key for automated translations | | DEEPL_TARGET_LOCALE | ⚪ | de | Locale sent to DeepL for automated translations | | DEEPL_TRANSLATION_LOCALE | ⚪ | (derived from DEEPL_TARGET_LOCALE) | Translation key used when saving automated translations. Override this when the DeepL locale differs from the app locale key, for example de_DE -> de |

Authentication

| Variable | Priority | Default | Description | |----------|----------|---------|-------------| | SANCTUM_STATEFUL_DOMAINS | ⚪ | localhost | Comma-separated domains for stateful API authentication | | FORTIFY_ALLOW_REGISTRATION | ⚪ | true | Allow user registration |

Infrastructure

| Variable | Priority | Default | Description | |----------|----------|---------|-------------| | QUEUE_CONNECTION | ⚪ | database | Queue driver: sync, database, redis | | CACHE_STORE | ⚪ | database | Cache driver: file, database, redis | | SESSION_DRIVER | ⚪ | database | Session storage: file, cookie, database, redis | | SESSION_LIFETIME | ⚪ | 120 | Session lifetime in minutes | | REDIS_HOST | ⚪ | 127.0.0.1 | Redis server host | | REDIS_PASSWORD | ⚪ | null | Redis password | | REDIS_PORT | ⚪ | 6379 | Redis port |

Mail Configuration

| Variable | Priority | Default | Description | |----------|----------|---------|-------------| | MAIL_MAILER | ⚪ | log | Mail driver: smtp, sendmail, log | | MAIL_HOST | ⚪ | 127.0.0.1 | SMTP host | | MAIL_PORT | ⚪ | 2525 | SMTP port | | MAIL_USERNAME | ⚪ | null | SMTP username | | MAIL_PASSWORD | ⚪ | null | SMTP password | | MAIL_FROM_ADDRESS | ⚪ | hello@example.com | Default "from" email address | | MAIL_FROM_NAME | ⚪ | ${APP_NAME} | Default "from" name |

Logging

| Variable | Priority | Default | Description | |----------|----------|---------|-------------| | LOG_CHANNEL | ⚪ | stack | Logging channel: stack, single, daily | | LOG_LEVEL | ⚪ | debug | Minimum log level: debug, info, warning, error |

Filesystem

| Variable | Priority | Default | Description | |----------|----------|---------|-------------| | FILESYSTEM_DISK | ⚪ | local | Default filesystem disk: local, public, s3 | | AWS_ACCESS_KEY_ID | ⚪ | (empty) | AWS access key (if using S3) | | AWS_SECRET_ACCESS_KEY | ⚪ | (empty) | AWS secret key (if using S3) | | AWS_DEFAULT_REGION | ⚪ | us-east-1 | AWS region | | AWS_BUCKET | ⚪ | (empty) | S3 bucket name |

Data Migration - v2 to v3

Only required when migrating from v2 to v3

| Variable | Priority | Default | Description | |----------|----------|---------|-------------| | MARIADB_HOST | ⚪ | (empty) | MariaDB host for v2 migration | | MARIADB_DATABASE | ⚪ | (empty) | MariaDB database name | | MARIADB_USERNAME | ⚪ | (empty) | MariaDB username | | MARIADB_PASSWORD | ⚪ | (empty) | MariaDB password |


Custom Artisan Commands

The API provides specialized Artisan commands for managing game data, comm-links, and translations.

User Management

| Command | Description | Common Options | |---------|-------------|----------------| | user:add | Create a new user | Interactive prompts for email, name, password |

Comm-Link Management

| Command | Description | Common Options | |---------|-------------|----------------| | comm-link:download | Download Comm-Links for the given IDs | <ids> - Comma-separated list of Comm-Link IDs | | comm-link:import | Import Comm-Link HTML from storage | Processes downloaded HTML files | | comm-link:schedule | Download missing Comm-Links and queue imports | Automated by scheduler | | comm-link:download-new-versions | Re-download and import existing Comm-Links | --skip - Skip certain operations | | comm-link:translate | Translate all untranslated Comm-Links using DeepL | Requires DEEPL_AUTH_KEY | | comm-link:backfill-image-hashes | Dispatch comm-link image hashing jobs | Processes images for deduplication | | comm-link:backfill-counts | Backfill comm-link images_count and links_count from pivot tables | --chunk - Process per chunk size, --dry-run - Preview changes | | comm-link:compute-similar-image-ids | Compute and mark similar/duplicate comm-link images | --queue - Queue name (default: expensive), --recent - Only recent images |

Game Data Management

| Command | Description | Common Options | |---------|-------------|----------------| | game:add-version | Add a new game version | --default - Set as default version | | game:sync | Sync manufacturers, tags, and optionally import items/vehicles | Runs multiple import commands | | game:import-manufacturers | Import game manufacturers from scunpacked data | Syncs manufacturer data | | game:import-tags | Import game entity tags from scunpacked data | Syncs classification tags | | game:import-items | Dispatch item import jobs for a specific game version | Imports weapons, components, etc. | | game:import-vehicles | Dispatch vehicle import jobs for a specific game version | Imports ships and ground vehicles | | game:compute-item-base-ids | Compute base_id values for item variants | Groups item variants | | game:backfill-shipmatrix-ids | Backfill shipmatrix_id for game_vehicle_data records | Links vehicles to ship matrix | | game:review-vehicle-matches | Interactively review and match unmatched game vehicles | Manual matching interface |

Vehicle/Ship Matrix

| Command | Description | Common Options | |---------|-------------|----------------| | vehicles:import-ship-matrix | Download and import the latest ship matrix | Syncs official ship specifications | | vehicles:import-msrp | Import all MSRPs from pledge store upgrade API | Updates ship pricing | | vehicles:import-loaner | Import all loaner ship mappings | Updates loaner relationships |

Starmap

| Command | Description | Common Options | |---------|-------------|----------------| | starmap:sync | Download and import the latest starmap | Syncs sys

View on GitHub
GitHub Stars41
CategoryDevelopment
Updated2h ago
Forks11

Languages

PHP

Security Score

80/100

Audited on Mar 31, 2026

No findings