Metadata-Version: 2.1
Name: aa-opshub
Version: 0.1.1
Summary: Standalone Alliance Auth app: structure timers, ops calendar, recurring ops, reminders and per-op Discord pings with signup buttons.
Keywords: allianceauth,eve online,discord,calendar,timers
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Games/Entertainment
License: MIT
Requires-Python: >=3.10
Requires-Dist: allianceauth<6,>=4
Requires-Dist: requests
Requires-Dist: PyNaCl>=1.5
Description-Content-Type: text/markdown

# aa-opshub

A **standalone** Alliance Auth app that combines, in one package, the everyday
features of Structure Timers II, Op Calendar and a Discord signup bot. It
depends only on Alliance Auth itself (no aa-structures, aa-structuretimers,
aa-opcalendar, aa-fleetpings, ...), so updates to other community plugins can't
break it.

## What it does (version 0.1)

**Timers** (Structure Timers II style)
- Timer board: system, structure type and name, owner, armor/shield/hull/anchoring..., hostile/friendly, FINAL flag, notes, OPSEC flag
- Search and filters (objective, timer type, structure type, include past)
- OPSEC timers are hidden from anyone without the `view_opsec` permission
- **Notification rules** (admin site): post a Discord message when a timer is created, or N minutes before it expires, optionally filtered by objective / timer type, with `@everyone`, `@here` or a role ping. Each timer is announced once per rule.
- Old timers are deleted automatically

**Calendar and ops** (Op Calendar style)
- Month-grid calendar showing ops and timers together, with category colours and tickers
- Create an op from a timer (prefilled) or from scratch; categories, FC, doctrine, formup, "important" flag, group restriction
- **Recurring ops** (daily / weekly / every 2 weeks / monthly, up to 52 repeats). Repeats are posted to Discord shortly before each one starts, not all at once.
- **Reminder pings**: 1 hour / 1 day / 1 week before, plus one custom time. Each is a new pinging message replying to the op's post.
- **"Starting now" ping** button (`@here` or `@everyone`) on the op page
- **Personal calendar feed** (.ics) for Google / Outlook / Apple calendar. Token-protected, shows only what that user may see.

**Discord**
- One message per op with `@everyone` / `@here` / role ping and **Attending / Tentative / Declined buttons**
- The embed lists who is coming, tentative and declined and updates live; signing up on the Auth page updates it too
- Editing an op refreshes the message (no re-ping); deleting an op deletes the message

## Not included yet (planned stages)

- **Structures:** automatic ESI sync of corp structures, fuel alerts, attack/reinforcement notifications that create timers
- **Fleet Pings:** formatted pings with fleet types, doctrines, comms and formup locations
- Staging-system distances (jumps / light-years) on timers, in-game calendar import, NPSI event imports

## Install

See the guides in `docs/`:

1. `1-SERVER-ADMIN-INSTALL.md` - for whoever runs the Auth server (Docker, no Git)
2. `2-DISCORD-SETUP.md` - creating the Discord bot, click by click
3. `3-FIRST-RUN-TEST.md` - a safe test checklist

After install, `auth opshub_check` self-tests the setup.

## Permissions

| Permission | For |
|---|---|
| `basic_access` | everyone: see timers/ops/calendar, sign up (web and Discord) |
| `create_timer` | scouts: add timers, edit/delete their own |
| `create_operation` | FCs: create ops, edit/delete their own, send pings |
| `view_opsec` | see OPSEC-flagged timers |
| `manage_all` | leadership: edit/delete anyone's, see all group-restricted ops |

Discord signups need the member to have the Auth **Discord service** activated
and a **main character** set.

## Notes

- Times are EVE time (UTC). Signup names are the member's main character.
- The Discord embed shows signed-up names to everyone who can see the channel;
  group-restricted ops are only hidden inside Auth.
- Changing an op's ping channel after creation isn't supported: delete and recreate.
- Templates extend `allianceauth/base-bs5.html` (Alliance Auth 4/5).
- Developed without a live Alliance Auth to run against. Pure logic (scheduling,
  calendar grid, iCal, Discord payloads) and migration/model consistency are
  unit-tested (`python -m unittest discover -s tests`); run the first-run test on
  your server before relying on it.
- Developer note: after changing `models.py`, run `python tools/make_migration.py`.
