Warning
Before you create Models, etc remove the 0001_initial.py from migrations folder if you dont have created own one.
A Example App that templating example to example
- Modern React SPA Frontend:
- React 19, TypeScript, and Vite build pipeline
- Tailwind CSS v4 styling, custom sci-fi theme variables, and responsive layouts
- Lucide icons (
lucide-react) and status indicators (LiveStatusIndicator,SecurityBadge) - TanStack Query (
@tanstack/react-query) for cached state management & TanStack Table (@tanstack/react-table) for sortable, searchable data tables - Full internationalization (
i18next/react-i18next) with translations for 12 languages - Type-safe API communication using
openapi-fetchand auto-generated TypeScript schemas
- Django Ninja REST API:
- Modular API endpoints (
/example/api/) with interactive OpenAPI documentation - Automated schema and TypeScript type generation via Makefile
- Modular API endpoints (
- Example Boilerplate:
- Clean Alliance Auth app architecture (models, managers, tasks, forms, and views)
- Pre-configured unit tests for backend (
AuthTestCase) and frontend (Vitest+ Testing Library)
Note
AA Example needs at least Alliance Auth v5 Please make sure to update your Alliance Auth before you install this APP
Make sure you're in your virtual environment (venv) of your Alliance Auth then install the pakage.
pip install aa-exampleConfigure your Alliance Auth settings (local.py) as follows:
INSTALLED_APPS = [
# other apps
"eve_sde", # only if it not already existing
"example",
# other apps?
]
# This line is right below the `INSTALLED_APPS` list, if not already exist!
INSTALLED_APPS = ["modeltranslation"] + INSTALLED_APPSTo set up the Scheduled Tasks add following code to your local.py
if "example" in INSTALLED_APPS:
CELERYBEAT_SCHEDULE["AA Example :: Test Task"] = {
"task": "example.tasks.example_task",
"schedule": crontab(minute=0, hour="*/1"),
}To set up the Logger add following code to your local.py
Ensure that you have writing permission in logs folder.
LOGGING["handlers"]["example_file"] = {
"level": "INFO",
"class": "logging.handlers.RotatingFileHandler",
"filename": os.path.join(BASE_DIR, "log/example.log"),
"formatter": "verbose",
"maxBytes": 1024 * 1024 * 5,
"backupCount": 5,
}
LOGGING["loggers"]["extensions.example"] = {
"handlers": ["example_file"],
"level": "DEBUG",
}AA Skillfarm uses EVE SDE data to map IDs to names for EveTypes. You will need to preload some data from SDE once.
python manage.py migrate eve_sde
python manage.py esde_load_sdeMigrate the app and collect static.
python manage.py migrate example
python manage.py collectstatic --noinputWith the Following IDs you can set up the permissions for the Example
| ID | Description | Details |
|---|---|---|
basic_access |
Can access the Example module | All members with this permission can access the Example module. |
manage_access |
Can Manage Example module | Can manage application settings and data. |
full_access |
Full access to Example module | Administrative access with full management permissions. |
The Following Settings can be setting up in the local.py
- EXAMPLE_APP_NAME:
"YOURNAME"- Set the name of the APP - EXAMPLE_TASKS_TIME_LIMIT:
7200- Defines the time (in seconds) a task will timeout
If you set up EXAMPLE_LOGGER_USE to True you need to add the following code below:
The user interface of AA Example is built as a modern React Single-Page Application (SPA) located in the frontend/ directory.
- Framework: React 19, TypeScript
- Bundler & Tooling: Vite 8 (
@vitejs/plugin-react-swc), Tailwind CSS v4 (@tailwindcss/vite) - UI Components & Icons: React-Bootstrap, Lucide Icons (
lucide-react) - Data & Tables: TanStack React Query (
@tanstack/react-query), TanStack Table (@tanstack/react-table) - API Client:
openapi-fetchwith types generated viaopenapi-typescript - Testing: Vitest with
@testing-library/reactandjsdom - Localization:
i18next&react-i18next(12 languages)
You can control the frontend build, test, and development workflows directly from the repository root:
| Command | Description |
|---|---|
make react-dev |
Starts the Vite development server with proxy to backend |
make react-build |
Runs TypeScript compilation (tsc -b) and Vite production build |
make react-test |
Runs Vitest unit tests |
make react-lint |
Runs ESLint verification |
make react-eslint |
Runs ESLint with automated fixes (--fix) |
make react-test-build |
Runs build, asset copy, translation sync, and collectstatic |
make react-release |
Runs full release build (build, i18n scan, asset copy, collectstatic) |
make react-copy-assets |
Copies Vite production build artifacts to Django's static directory |
make react-copy-translations |
Copies frontend i18n translations to Django's static directory |
make react-translations |
Scans source code and updates i18n translation files |
make react-openapi |
Exports Django Ninja OpenAPI schema and regenerates TypeScript types |
make react-clean |
Cleans React build directory |
-
Install dependencies:
cd frontend npm install -
Start Vite development server:
# Inside frontend/ npm run dev # Or from repository root: make react-dev
-
Run tests and linter:
make react-test make react-lint
Help us translate this app into your language or improve existing translations. Join our team!"
You want to improve the project? Please ensure you read the Contribution Guidelines