- This AAC (Automatic Account Creator) is built as a SPA (Single Page Application) on the front-end and a RESTful API on the back-end.
- It is supposed to be easily extensible via plugins (check
- The core of this AAC does not modify TFS' database schema. News are loaded as static markdown files from
- The REST API is planned to be utilized by many external projects like OT server lists and OT Client.
Check out the REST API documentation!
This software is designed to:
- be easy to understand and modify
- emphasize simplicity and security
- provide an example of good programming practices in PHP
- require zero configuration for simple and secure use
- follow good practices of REST API
- follow PSR-2 coding guidelines
- PHP >= 5.4
- PHP JSON extension
- PHP MySQL NATIVE DRIVER (mysqlnd) extension (or this will happen)
- PHP APC or APCu extension (if you want
Installation (zip-bundle release) - stable
- Download zip-bundle release from GitHub (green button)
- Unpack to a directory higher than your web root, so that public_html is the web root (you can rename it if you need)
- If you use nginx, you can find sample vhost config in our wiki
- Web server MUST be configured to serve public_html as Document Root, DevAAC won't work in a subdirectory!
config.phpand follow instructions in it
- Get composer
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin
- Clone this repo:
git clone https://github.com/DevelopersPL/DevAAC.git
- Install dependencies:
- Set up your web server to serve DevAAC/public_html as document root and add required rewrites
config.phpand follow instructions
- Receive JSON
- Send JSON with
Content-Type: application/jsonor form input with
Content-Type: application/x-www-form-urlencodedbut don't mix them!
- You can override method with X-HTTP-Method-Override header
- Actions return the modified object
- HTTP status codes are meaningful, most common ones: 400 (missing params/bad params), 401 (not logged in), 403 (permission denied)
- If rate limiting is active, it will return 503 with text/plain! 429 is planned but is not supported by all web servers (e.g. nginx)
- Slim framework documentation
- API documentation is awesome thanks to Swagger. Put Swagger Annotations in the code!
- You can use Vagrant to setup a development machine. Install Vagrant, execute
vagrant upin project root and connect to http://localhost:8044/
- Swagger docs are dynamically served at /api/v1/docs
You can generate Swagger API docs manually:
php vendor/zircote/swagger-php/swagger.phar DevAAC/ -o api-docs
Contributions are always welcome, please submit pull requests! We are looking for back-end plugins and front-end functionality of themes. (It is proper to keep non-essential functionality in the form of plugins.)
Released under MIT license.