# Pubflow License

**Company:** Pubflow, Inc.  
**Primary License:** AGPL-3.0 (GNU Affero General Public License v3.0)  
**Alternative License:** Commercial License (available for purchase)  
**Contact:** enterprise@pubflow.com

---

## 📄 Primary License: AGPL-3.0

Pubflow is licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)**.

### What is AGPL-3.0?

AGPL-3.0 is a **strong copyleft** open source license that:

- ✅ Allows **free commercial use**
- ✅ Allows **modification** of the code
- ✅ Allows **distribution** of the software
- ✅ Allows **private use**
- ⚠️ Requires **source code disclosure** if you modify and offer as a web service
- ⚠️ Requires **same license** for derivative works
- ⚠️ Requires **license and copyright notice** preservation

### Key Points

**You CAN:**
- ✅ Use Pubflow commercially (in your business)
- ✅ Use Pubflow in your SaaS application
- ✅ Modify the source code
- ✅ Distribute the software
- ✅ Use for private/internal purposes

**You MUST:**
- ⚠️ Disclose source code if you modify and offer as a network service
- ⚠️ License derivative works under AGPL-3.0
- ⚠️ Keep license and copyright notices
- ⚠️ State significant changes made to the code

**You DON'T need to:**
- ❌ Release code if you just USE Pubflow (without modifications)
- ❌ Release code for internal/private use (even if modified)
- ❌ Release your business logic or application code
- ❌ Pay anything (AGPL is free)

---

## 📜 Full License Text

The complete AGPL-3.0 license text is available at:

- **Official Source:** https://www.gnu.org/licenses/agpl-3.0.en.html
- **SPDX:** https://spdx.org/licenses/AGPL-3.0-only.html
- **GitHub:** https://github.com/pubflow/pubflow/blob/main/LICENSE

### License Header

All Pubflow source files include this header:

```
Copyright (C) 2024-present Pubflow, Inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
```

---

## 💼 Alternative License: Commercial License

For organizations that cannot or do not want to comply with AGPL-3.0, we offer a **Commercial License**.

### Why Choose Commercial License?

**You need a Commercial License if:**
- 💰 You want to modify Pubflow and keep changes private
- 💰 You're creating a competing PaaS service
- 💰 Your company has anti-AGPL policies
- 💰 You need enterprise support and SLA
- 💰 You need legal indemnification

### What's Included

- ✅ **No AGPL obligations** - Keep modifications private
- ✅ **Enterprise support** - Priority support with SLA
- ✅ **Legal protection** - Indemnification clause
- ✅ **Custom features** - Request features for your use case
- ✅ **Training** - Team training and onboarding

### Pricing

**Custom pricing based on your needs.**

**Contact:** enterprise@pubflow.com for a quote.

**Learn more:** [Commercial License Details](https://pubflow.com/dual-licensing)

---

## 🎯 Dual Licensing Model

Pubflow uses a **dual licensing model**:

```
Pubflow Software
├── License Option 1: AGPL-3.0 (Free)
│   ✅ Free forever
│   ✅ Open source
│   ✅ Commercial use allowed
│   ⚠️ Must release modifications if offering web service
│
└── License Option 2: Commercial License (Paid)
    ✅ Keep modifications private
    ✅ No AGPL obligations
    ✅ Enterprise support
    💰 Custom pricing (contact us)
```

**You choose which license works best for your use case.**

---

## 📋 License Compliance

### How to Comply with AGPL-3.0

If you modify Pubflow and offer it as a web service, you must:

1. **Keep License Notices**
   - ✅ Keep all copyright notices
   - ✅ Keep all license headers
   - ✅ Include AGPL-3.0 license text

2. **Disclose Source Code**
   - ✅ Make source code available to users
   - ✅ Include installation instructions
   - ✅ Provide access for at least 3 years

3. **Document Changes**
   - ✅ Document significant changes (CHANGELOG.md)
   - ✅ Mark modified files
   - ✅ Include modification dates

4. **Provide Notice**
   - ✅ Display notice in your service UI
   - ✅ Link to source code repository
   - ✅ Include AGPL-3.0 license

**Example notice:**
```
This service uses Pubflow software.
Source code: https://github.com/yourcompany/pubflow-fork
License: AGPL-3.0
```

### How to Comply with Commercial License

If you purchase a Commercial License:

1. **Pay License Fee**
   - 💰 Monthly or annual subscription
   - 💰 Based on number of developers

2. **Follow Terms**
   - ✅ Use within agreed scope
   - ✅ Don't redistribute source code publicly
   - ✅ Don't sublicense to competitors

3. **Maintain Subscription**
   - ✅ Keep subscription active
   - ✅ Renew annually
   - ⚠️ Revert to AGPL if cancelled

---

## ❓ Frequently Asked Questions

### Can I use Pubflow for free?

**YES!** Pubflow is free under AGPL-3.0. You can use it commercially without paying anything.

### Do I need to open-source my entire application?

**NO!** You only need to release modifications to Pubflow's code, and only if you offer it as a web service. Your business logic stays private.

### What if I just use Pubflow without modifying it?

**No obligations!** If you use Pubflow without modifications, you don't need to release any code.

### Can I use Pubflow in a closed-source product?

**YES!** As long as you don't modify Pubflow's code. If you do modify it and offer as a web service, you need to release those modifications or purchase a Commercial License.

### What counts as "offering as a web service"?

Providing access to Pubflow over a network to other users (SaaS, API service, cloud hosting). Internal company systems don't count.

### How do I purchase a Commercial License?

Contact **enterprise@pubflow.com** for pricing and terms.

---

## 📚 Additional Resources

### Documentation

- 📖 [License FAQ](./LICENSE-FAQ.md) - Detailed Q&A about licensing
- 📖 [Commercial License](./COMMERCIAL-LICENSE.md) - Commercial license details
- 📖 [License Comparison](./LICENSE-COMPARISON.md) - AGPL vs Commercial comparison
- 📖 [Examples](./EXAMPLES.md) - Real-world code examples

### Legal

- 📄 [AGPL-3.0 Full Text](https://www.gnu.org/licenses/agpl-3.0.en.html)
- 📄 [SPDX License Info](https://spdx.org/licenses/AGPL-3.0-only.html)
- 📄 [OSI Approval](https://opensource.org/licenses/AGPL-3.0)

### Support

- 💬 [GitHub Discussions](https://github.com/pubflow/pubflow/discussions)
- 💬 [Discord Community](https://discord.gg/pubflow)
- 📧 [Enterprise Support](mailto:enterprise@pubflow.com)

---

## 📞 Contact

### Licensing Questions

- 📧 **Email:** enterprise@pubflow.com
- 🌐 **Website:** https://pubflow.com/dual-licensing
- 📝 **Request Consultation:** https://pubflow.com/contact

### Commercial License Sales

- 📧 **Email:** enterprise@pubflow.com
- 📝 **Request Quote:** https://pubflow.com/dual-licensing

---

## ⚖️ Copyright

**Copyright © 2024-present Pubflow, Inc.**

All rights reserved under the terms of the AGPL-3.0 license or Commercial License.

---

## 🔖 License Identifier

**SPDX-License-Identifier:** AGPL-3.0-only

---

**Pubflow, Inc.** - Building the future of backend development.

*Last Updated: 2025-12-14*

