This repository provides a starter template for building addons for the AirLink server panel. It includes fully structured TypeScript backend and frontend logic, UI registration, and utilities to quickly create powerful, modular addons.
Tip
Check out my addons by seeing the branches of this repos such as Modrinth Store Parachute
-
Modular TypeScript structure for backend and UI
-
Pre-configured UI components:
- Sidebar items
- Server menu items
- Server sections
-
Optional file upload handling with type validation
-
Server utilities for checking access, permissions, and info
-
Ready-to-use database operations examples using Prisma
-
Icon helpers for quick SVG integration
airlink-addons/
├─ src/
│ ├─ index.ts # Addon entry point
│ ├─ ui.ts # UI component registration
│ ├─ types.ts # Type definitions
│ ├─ handlers/
│ │ └─ backend-logic.ts # Example backend operations
├─ views/ # Optional custom EJS views
├─ package.json
├─ tsconfig.json
└─ README.md
git clone --branch template https://github.com/g-flame-oss/airlink-addons my-addon
cd my-addon
npm install
npm run buildThen move the dist folder or compiled files into your AirLink panel addons directory.
- Download the latest release from the repository.
- Move the release folder into the AirLink
addonsdirectory. - Restart your AirLink panel.
- UI Components
Open
src/ui.tsto register sidebar items, server menu items, and server sections. Example:
ui.addSidebarItem({
id: 'my-addon-main',
label: 'My Addon',
icon: getExampleIcon(),
url: '/my-addon',
section: 'main',
order: 50,
isAdminItem: false
});-
Backend Logic Use
src/handlers/backend-logic.tsfor database operations, file handling, and server utilities. -
Types
types.tsprovides type definitions for Multer files, servers, Prisma client, and Addon API objects.
import { validateFileUpload } from './handlers/backend-logic';
const result = validateFileUpload(file, logger, { maxSize: 5 * 1024 * 1024 });
if (!result.valid) {
console.error(result.error);
}- Use TypeScript for both frontend and backend logic.
- Compile your addon with:
npm run build- Addons can be reloaded by restarting the AirLink panel or using hot reload if supported.
- Fork the repository
- Make changes in your fork
- Open a pull request with a clear description of your changes
MIT License — open-source and free to use.