Skip to content

thiagoretes/DevAAC

 
 

Repository files navigation

DevAAC by developers.pl for TFS 1.0

Quick facts:

  • 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 plugins/example.php.
  • The core of this AAC does not modify TFS' database schema. News are loaded as static markdown files from public_html/news.
  • 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:

Requirements

  • PHP >= 5.4
  • PHP JSON extension
  • PHP MySQL NATIVE DRIVER (mysqlnd) extension (or this will happen)
  • PHP APC or APCu extension (if you want plugins/ratelimiter.php to work)

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!
  • Rename config.sample.php to config.php and follow instructions in it

Installation (development)

  • 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: composer.phar install
  • Set up your web server to serve DevAAC/public_html as document root and add required rewrites
  • Rename config.sample.php to config.php and follow instructions

REST API

  • Receive JSON
  • Send JSON with Content-Type: application/json or form input with Content-Type: application/x-www-form-urlencoded but 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)

Hacking

You can generate Swagger API docs manually:

php vendor/zircote/swagger-php/swagger.phar DevAAC/ -o api-docs

Authors

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.

Packages

No packages published

Languages

  • PHP 71.6%
  • HTML 17.0%
  • JavaScript 10.9%
  • Other 0.5%