Skip to content
This repository was archived by the owner on Oct 19, 2025. It is now read-only.

g-flame-oss/airlink-addons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirLink Panel Addon Template

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

Features

  • 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


Folder Structure

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

Installation

Option 1: Clone & Build

git clone --branch template https://github.com/g-flame-oss/airlink-addons my-addon 
cd my-addon
npm install
npm run build

Then move the dist folder or compiled files into your AirLink panel addons directory.

Option 2: Direct Download

  1. Download the latest release from the repository.
  2. Move the release folder into the AirLink addons directory.
  3. Restart your AirLink panel.

Usage

  1. UI Components Open src/ui.ts to 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
});
  1. Backend Logic Use src/handlers/backend-logic.ts for database operations, file handling, and server utilities.

  2. Types types.ts provides type definitions for Multer files, servers, Prisma client, and Addon API objects.


Example: File Upload Validation

import { validateFileUpload } from './handlers/backend-logic';

const result = validateFileUpload(file, logger, { maxSize: 5 * 1024 * 1024 });
if (!result.valid) {
  console.error(result.error);
}

Development

  • 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.

Contributing

  1. Fork the repository
  2. Make changes in your fork
  3. Open a pull request with a clear description of your changes

License

MIT License — open-source and free to use.