PHPackages                             cgili/modus-crashapi - 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. cgili/modus-crashapi

ActiveLibrary[API Development](/categories/api)

cgili/modus-crashapi
====================

A minimal PHP API to access Crash Statistics

1.0.1(7y ago)03[1 issues](https://github.com/carlosgili/modus-crashapi/issues)AGPL-3.0-or-laterPHPPHP ^5.6

Since Mar 7Pushed 7y ago1 watchersCompare

[ Source](https://github.com/carlosgili/modus-crashapi)[ Packagist](https://packagist.org/packages/cgili/modus-crashapi)[ Docs](https://github.com/carlosgili/modus-crashapi)[ RSS](/packages/cgili-modus-crashapi/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (1)Used By (0)

modus-crashapi
==============

[](#modus-crashapi)

Crash Information API in PHP
============================

[](#crash-information-api-in-php)

This is a simple API implementation developed for ModusCreate in order to get Crash Information from NHTSA (one.nhtsa.gov) in specific JSON Format.

The implementation is pretty simple and it does not offer security measures like authentication, full request parameters validation, full UTF-8 multilanguage compatibility checks, etc.

Requirements
------------

[](#requirements)

- A Clean Server with Debian 8
- Apache 2.4 or upper server with mod\_php enabled
- PHP 5.6 or upper with JSON extension

Optional Requirements
---------------------

[](#optional-requirements)

- Composer () (Only if you plan to Upgrade/Reinstall Flight)
- Flight PHP Framework () (Already Bundled with the App)

Directory Structure
-------------------

[](#directory-structure)

```
 - vendor			Composer downloaded files (Flight Framework)
 - composer.json		Composer json configuration
 - composer.lock		Composer lock file
 - README.md			This readme file
 - html				The directory publised in the WEB Server
   - .htaccess			Apache Server configurations
   - index.php			Full Implementation

```

Basic LAMP Setup on Debian
--------------------------

[](#basic-lamp-setup-on-debian)

During the setup we assume that you have a newly deployed Server or VM with Debian 8.

For all the setup operations you should be logged-in as 'root'

To setup the basic LAMP use:

```
# apt-get install php5-cli php5-json
# apt-get install apache2 libapache2-mod-php5

```

We do not require mysql.

To check if PHP is running you can use:

```
# php -r "print \"hello\n\";"

```

You shoud see a hello.

Changing Apache to Port 8080
----------------------------

[](#changing-apache-to-port-8080)

To change Apache server to Listen on port 8080, you must edit /etc/apache2/ports.conf and change the line:

```
Listen 80

```

For the line:

```
Listen 8080

```

Then change the file /etc/apache2/sites-available/000-default.conf and change the lines:

```

	....
	DocumentRoot /var/www/html
	....

```

For the lines:

```

	....
	DocumentRoot /var/www/modus-crashapi/html
	....

```

Downloading and Installing the Application under the Apache Server
------------------------------------------------------------------

[](#downloading-and-installing-the-application-under-the-apache-server)

Enter /var/www directory

```
# cd /var/www

```

We will require git to download the repository:

```
# apt-get install git

```

Clone the repository:

```
# git clone https://github.com/carlosgili/modus-crashapi.git
# chown -R www-data:www-data modus-crashapi

```

Restart Apache and check the results
------------------------------------

[](#restart-apache-and-check-the-results)

To restart Apache use:

```
# systemctl restart apache2

```

Now it should be able to access the server at port 8080:

We will need wget:

```
# apt-get install wget

```

Now check the if the server is running:

```
# wget -qO- http://localhost:8080

```

You should get a JSON reponse simillar to:

```
{ "status": "Ready" }

```

If your server is accessible thru your network you can also access the server with any browser at:

```
http://:8080

```

OPTIONAL: Composer and Flight Setup
-----------------------------------

[](#optional-composer-and-flight-setup)

First you MUST be inside /var/www/modus-crashapi directory

```
# cd /var/www/modus-crashapi

```

To install Composer use:

```
# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# php composer-setup.php

```

This should have created two new files:

```
composer-setup.php
composer.phar

```

To download and reinstall the Flight Framework you can use:

```
# php composer.phar require mikecao/flight

```

If you require aditional Information about the Composer installation you can check:

If you require additional information about Flight setup you can check:

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

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

Unknown

Total

1

Last Release

2621d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5977c3262785db351cd41080505f7a64275c52712d0e108151f6c324c2f7e1f3?d=identicon)[cgili](/maintainers/cgili)

---

Top Contributors

[![carlosgili](https://avatars.githubusercontent.com/u/11710478?v=4)](https://github.com/carlosgili "carlosgili (18 commits)")

---

Tags

api

### Embed Badge

![Health badge](/badges/cgili-modus-crashapi/health.svg)

```
[![Health](https://phpackages.com/badges/cgili-modus-crashapi/health.svg)](https://phpackages.com/packages/cgili-modus-crashapi)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

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