Skip to main content

A public asset shop plugin for Alliance Auth.

Project description

aa-shop

An Alliance Auth plugin that lets registered auth members run a publicly available shop stocked from their own (or their corporation's) assets.

Features

  • Members create and manage personal shops; authorized users manage corporation shops.
  • A member back-office at /shop-backoffice/ (lists your shops, create/edit/delete).
  • Each published shop gets a public storefront at /shop/<slug>/ — no login required. Unpublished shops are visible only to their managers (preview).

Requirements

Installation

  1. Install into your Alliance Auth virtual environment:

    pip install aa-shop
    
  2. Add "shop" to INSTALLED_APPS in your auth project's local.py:

    INSTALLED_APPS += ["shop"]
    
  3. Allow the storefront to expose its public (non-gated) views — required, or anonymous visitors are redirected to login:

    APPS_WITH_PUBLIC_VIEWS = ["storefront"]
    
  4. Run migrations and collect static files, then restart your AA services:

    python manage.py migrate
    python manage.py collectstatic
    
  5. EVE universe data: the Hulls picker lists ship types from django-eveuniverse, so make sure your eveuniverse data is populated with ship types (load the full EVE universe, or at least the Ship category, using eveuniverse's load tooling). Ships that aren't loaded won't be selectable.

  6. Grant permissions (Django admin, or via groups/states):

    Permission Grants
    shop.basic_access Access the back-office; create/manage your personal shops
    shop.manage_corporation_shops Create/manage your corporation's shops

Periodic price refresh

Hulls priced as % Jita Buy / % Jita Sell are refreshed by a Celery task every 6 hours. Add to your local.py:

from celery.schedules import crontab

CELERYBEAT_SCHEDULE["shop_refresh_pct_prices"] = {
    "task": "shop.tasks.refresh_pct_prices",
    "schedule": crontab(minute=0, hour="*/6"),
}
CELERYBEAT_SCHEDULE["shop_refresh_all_stock"] = {
    "task": "shop.tasks.refresh_all_stock",
    "schedule": crontab(minute=0),   # hourly
}

Stock is recomputed from memberaudit assets (no ESI). Refresh on demand with python manage.py shop_refresh_stock (--async to enqueue the per-shop tasks).

The task uses the public ESI market endpoint (no token) at low priority (override with SHOP_TASKS_PRIORITY, 1=urgent .. 9=idle; default 7). Prices are best-of-book at Jita 4-4 (highest buy / lowest sell), the same as Janice.

To refresh on demand (e.g. after setting up %-pricing), run inline:

python manage.py shop_refresh_prices           # synchronous, prints results
python manage.py shop_refresh_prices --async    # enqueue Celery tasks instead

Usage

  • Members: open Shop in the auth sidebar (/shop-backoffice/) to create a shop — set a slug, name, type (personal/corporation), and publish it.
  • Public: share /shop/<slug>/; published shops are browsable by anyone.

Contributing

Design docs and implementation plans live in docs/superpowers/. The storefront stylesheet ships compiled (shop/static/shop/storefront.css); to rebuild it after changing storefront templates, use the standalone Tailwind v4 CLI + daisyUI (no Node required):

bash scripts/build-css.sh        # add --watch during development

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aa_shop-0.1.1.tar.gz (50.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aa_shop-0.1.1-py3-none-any.whl (74.4 kB view details)

Uploaded Python 3

File details

Details for the file aa_shop-0.1.1.tar.gz.

File metadata

  • Download URL: aa_shop-0.1.1.tar.gz
  • Upload date:
  • Size: 50.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for aa_shop-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0a769a4556314b88197360bbbac15619db1f38851ee572e2b2f1fb46f24c15b5
MD5 c9e6e81ae6bd0520eb64df88bafa70bc
BLAKE2b-256 4730e773fd75062eecbb0d885d15895840ac4cf8761d48c5cbb17d75846c8b3b

See more details on using hashes here.

File details

Details for the file aa_shop-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aa_shop-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 74.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for aa_shop-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad2da2d94db0e1ba3332d6cedbc8b26c12fc2684a8448380194fb045c409ff0
MD5 e4c5bcff911b1cb0934571e7f344806f
BLAKE2b-256 a9cfd27cac138e884c06ade1c5ababd1842b424c02368de4dae9bf70d965442d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page