PHPackages                             locomotivemtl/o6c-api - 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. [API Development](/categories/api)
4. /
5. locomotivemtl/o6c-api

ActiveLibrary[API Development](/categories/api)

locomotivemtl/o6c-api
=====================

10PHP

Since May 1Pushed 6y ago10 watchersCompare

[ Source](https://github.com/locomotivemtl/o6c-api)[ Packagist](https://packagist.org/packages/locomotivemtl/o6c-api)[ RSS](/packages/locomotivemtl-o6c-api/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

o6c.ca
======

[](#o6cca)

Only 6 characters. URL Shortener based on Slim 4 (PSR-7 and PSR-15).

```
composer create-project locomotivemtl/o6c-api
```

API
===

[](#api)

> Keep it simple.

- `GET /{code}`
    - Redirect to the original URL.
- `POST /api/v1/login`
    - Retrieve an auth token (jwt) from credentials.
- `POST /api/v1/shorten`
    - Create a new short-link. Must provide a valid access token.

> See [locomotivemtl/o6c-client](https://github.com/locomotivemtl/o6c-client) for a simple client library to interact with this API.

Dependencies
============

[](#dependencies)

- PHP 7.2+
- Slim 4
- pimple/pimple
- lcobucci/jwt

How to install
==============

[](#how-to-install)

- `composer install`
- Setup a MySQL/MariaDB database.
    - Import the `data/schema.sql`.
- Copy the `config/config.sample.php` to `config/config.php` and edit its value to your environment.
- Generate a RSA key for the JWT token `cd config;sh jwt.sh`.
- Set up your web server (with a short URL!) to point to `public/`.
    - In dev, try `composer start`.

Adding new users
================

[](#adding-new-users)

> Work in progress.

Add them manually in the `users` table. The password format is

```
$password = password_hash($plain, PASSWORD_DEFAULT);
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfb071c0ff7ce9500c528a003a2c53124248debc3e5bf367c17f89f5e6136125?d=identicon)[mducharme](/maintainers/mducharme)

---

Top Contributors

[![mducharme](https://avatars.githubusercontent.com/u/12157?v=4)](https://github.com/mducharme "mducharme (3 commits)")

### Embed Badge

![Health badge](/badges/locomotivemtl-o6c-api/health.svg)

```
[![Health](https://phpackages.com/badges/locomotivemtl-o6c-api/health.svg)](https://phpackages.com/packages/locomotivemtl-o6c-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M478](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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