PHPackages                             cactus-io/mammillaria - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. cactus-io/mammillaria

ActiveProject[HTTP &amp; Networking](/categories/http)

cactus-io/mammillaria
=====================

A simple fast and stateless download micro-service

0.2.2(5y ago)417MITPHPCI failing

Since Apr 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/cactus-io/mammillaria)[ Packagist](https://packagist.org/packages/cactus-io/mammillaria)[ Docs](https://github.com/cactus-io/mammillaria)[ RSS](/packages/cactus-io-mammillaria/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Mammillaria
===========

[](#mammillaria)

Mammillaria is light, fast, and stateless file download micro-service that servered contents to be download by 3th partis.

Mammillaria uses JWT to protect contents from anonymous access while providing a direct link to contents.

Download API
------------

[](#download-api)

The REST API to download a file is:

```
GET: {host}/api/v2/cactus/files/{token}/content

```

Where {host} is the full path of the server and {token} is a JWT token.

Token
-----

[](#token)

Information of the file, access control, and other metadata are placed in the JWT token. There are several fields in the token to control Mammillaria. For more information about field in the token see document/token.md

Quick Start
-----------

[](#quick-start)

Create a directory

```
mkdir mammillaria
cd mammillaria

```

Create a test file:

```
touch README.md
echo "#Hello world">>README.md
cd ..

```

First of all generate a token by executing the following command:

```
docker run -it \
	cactusio/mammillaria:latest \
	../bin/generate-token

```

Fill all required attribute to generate a new token:

```
Mammillaria
File Path:/README.md
Access (r, rw, w):r
Expire at (ex. 2021-01-01 00:00:00):2021-01-01 00:00:00
Key:321

-------------------------------------------
Token:
-------------------------------------------
 File     |/README.md
 Access   |r
 Expiry   |2021-01-01 00:00:00
-------------------------------------------
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXRoIjoiXC9SRUFETUUubWQiLCJhY2Nlc3MiOiJyIiwiZXhwaXJ5IjoiMjAyMS0wMS0wMSAwMDowMDowMCIsImhvc3QiOm51bGwsImFjY291bnQiOm51bGx9.7ayp1qlry4F_3yTJ1RkG9lYGgBowHVhXZoXYINjuyj8

```

To run a new instance of the server:

```
docker run \
	-p "80:80" \
	-e "MAMMILLARIA_JWT_KEY=321" \
	-v ./mammillaria:/mnt/storage \
	cactusio/mammillaria:latest

```

Open a browser to download the file

```
http://localhost:80/api/v2/{token}/content

```

example:

```
http://localhost:80/api/v2/cactus/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXRoIjoiXC9SRUFETUUubWQiLCJhY2Nlc3MiOiJyIiwiZXhwaXJ5IjoiMjAyMS0wMS0wMSAwMDowMDowMCIsImhvc3QiOm51bGwsImFjY291bnQiOm51bGx9.7ayp1qlry4F_3yTJ1RkG9lYGgBowHVhXZoXYINjuyj8/content

```

Contributing
------------

[](#contributing)

If you would like to contribute to the project, please read our [contributor documentation](http://cactus-io.viraweb123.ir/wb/blog/content-contributor)and the [`CONTRIBUTING.md`](CONTRIBUTING.md). The `CONTRIBUTING.md` file explains how to set up a development installation, how to run the test suite, and how to contribute to documentation.

For a high-level view of the vision and next directions of the project, see the [Cactus community roadmap](docs/roadmap.md).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~202 days

Total

4

Last Release

1983d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6371551?v=4)[Mostafa Barmshory](/maintainers/mostafabarmshory)[@mostafabarmshory](https://github.com/mostafabarmshory)

---

Top Contributors

[![mostafabarmshory](https://avatars.githubusercontent.com/u/6371551?v=4)](https://github.com/mostafabarmshory "mostafabarmshory (8 commits)")

---

Tags

file-managerfile-sharingjwthttpdownloaderCactus

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cactus-io-mammillaria/health.svg)

```
[![Health](https://phpackages.com/badges/cactus-io-mammillaria/health.svg)](https://phpackages.com/packages/cactus-io-mammillaria)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.2k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.1k1.0B5.5k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[psr/http-client

Common interface for HTTP clients

1.7k680.7M2.1k](/packages/psr-http-client)[psr/link

Common interfaces for HTTP links

2.5k144.1M68](/packages/psr-link)[rmccue/requests

A HTTP library written in PHP, for human beings.

3.6k34.5M258](/packages/rmccue-requests)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
