# Licensing Details for TREK: AGPL-3.0 and MIT Explained

> Understand the TREK licensing: AGPL-3.0 for the main repository and MIT for the plugin-sdk submodule. Learn the details of each license.

- Repository: [Maurice/TREK](https://github.com/mauriceboe/TREK)
- Tags: licensing-details
- Published: 2026-07-10

---

**The TREK repository is primarily licensed under the GNU Affero General Public License v3.0 (AGPL-3.0), while the `plugin-sdk` submodule is separately licensed under the MIT License.**

TREK, an open-source project by mauriceboe, employs a dual-licensing strategy that reflects its modular architecture. Understanding these licensing details for TREK is essential for developers who intend to deploy, modify, or distribute the software—especially given the specific network-use obligations imposed by the AGPL.

## Core Application: AGPL-3.0

The main TREK codebase is governed by the **GNU Affero General Public License v3.0 (AGPL-3.0)**, a strong copyleft license designed specifically for network-served software. You can find the complete license text in the repository’s top-level `LICENSE` file.

According to the mauriceboe/TREK source code, the AGPL-3.0 requires that any modifications or derivative works deployed as a service must make their source code available to all users of that service. This provision extends the traditional GPL requirements to cover web applications and APIs, ensuring that users interacting with TREK over a network retain the right to access the source code.

## Plugin SDK: MIT License

Within the same repository, the **`plugin-sdk` submodule** operates under a different licensing regime. This component is licensed under the **MIT License**, a permissive license that allows unrestricted reuse, modification, and distribution, including within proprietary projects.

The full text of this license is located in `plugin-sdk/LICENSE`. Unlike the AGPL-3.0 governing the core application, the MIT License imposes only minimal requirements: you must preserve the copyright notice and permission notice in all copies or substantial portions of the SDK.

## Dependency Licensing Landscape

Beyond the core components, TREK relies on various third-party dependencies managed through npm. These dependencies carry their own individual licenses, which are enumerated in the [`package.json`](https://github.com/mauriceboe/TREK/blob/main/package.json) file. While these external packages do not alter TREK’s overall licensing structure, compliance with their respective terms remains mandatory when distributing the complete application.

## License Compliance Requirements

When distributing TREK or creating derivative works, you must adhere to the following obligations:

1. **Include the AGPL-3.0 license text** (or a URL pointing to it) with any distribution of the core application.
2. **Preserve the MIT license notice** for all files originating from the `plugin-sdk` directory.
3. **Make source code available** for any modifications to the core application that are deployed as a network service, as mandated by AGPL-3.0 Section 13.

## Practical Implementation: License Headers

When contributing to TREK or creating plugins, appropriate license headers help maintain clear provenance.

**For core TREK TypeScript files:**

```typescript
/**
 * TREK – Travel & Route Exploration Kit
 * Copyright (c) 2026 mauriceboe
 *
 * This file is part of TREK and is licensed under the AGPL-3.0.
 * See https://github.com/mauriceboe/TREK/blob/main/LICENSE for details.
 */

```

**For projects using the MIT-licensed plugin SDK:**

```typescript
import { createPlugin } from '@trek/plugin-sdk';

// The plugin SDK is MIT-licensed, so you may incorporate it into proprietary software
// as long as you retain the copyright notice from the SDK.
createPlugin({ name: 'MyCustomPlugin', version: '1.0.0' });

```

## Summary

- **Core TREK** is licensed under **AGPL-3.0** (`LICENSE`), requiring source code disclosure for network-deployed modifications.
- **plugin-sdk** is licensed under **MIT** (`plugin-sdk/LICENSE`), allowing commercial and proprietary use with attribution.
- **Third-party dependencies** maintain their own licenses as specified in [`package.json`](https://github.com/mauriceboe/TREK/blob/main/package.json).
- Compliance requires preserving both license texts and fulfilling AGPL network-use obligations for the core application.

## Frequently Asked Questions

### Can I use TREK in a commercial SaaS product?

If you deploy TREK as a service, the AGPL-3.0 requires you to provide the complete source code of your modified version to all users of the service. However, you can use the MIT-licensed `plugin-sdk` in proprietary SaaS products without disclosing your source code, provided you include the original copyright notice.

### What is the difference between AGPL-3.0 and MIT licenses in this repository?

The AGPL-3.0 is a strong copyleft license that applies to the core TREK application and triggers source code sharing requirements when the software is used over a network. The MIT License applies only to the `plugin-sdk` submodule and is permissive, allowing virtually unrestricted use, modification, and redistribution with minimal attribution requirements.

### Where can I find the full license texts for TREK?

The AGPL-3.0 license for the core application resides in the root `LICENSE` file. The MIT License for the plugin SDK is located at `plugin-sdk/LICENSE`. Both files are available in the mauriceboe/TREK repository on GitHub.

### Do I need to open-source my plugins if I use the TREK plugin SDK?

No. Because the `plugin-sdk` is MIT-licensed, you can develop proprietary plugins without releasing their source code. You must only retain the MIT copyright notice from the SDK itself. However, if your plugin modifies the core TREK codebase (AGPL-3.0), those modifications fall under the AGPL requirements.