• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[DevAAC] New AAC and best website for TFS 1.X

Hi everyone, im having a wierd issue. After installing this acc maker the only thing i can see in browser is background.
Moreover im getting some errors in browser's console. Uncaught SyntaxError: Unexpected token <
Any one got that before?

Thats my config.php
http://scr.hu/1wpq/cp6rs
 
hmm, i try run this ....

link /api/v1/server/info (Blank, error 500)

Log error:
2018/03/11 21:30:18 [error] 5417#5417: *18 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'where clause' in /var/www/TEST_SITE/htdocs/vendor/illuminate/database/Illuminate/Database/Connection.php:299
Stack trace:
#0 /var/www/TEST_SITE/htdocs/vendor/illuminate/database/Illuminate/Database/Connection.php(299): PDO->prepare('select * from `...')
#1 /var/www/TEST_SITE/htdocs/vendor/illuminate/database/Illuminate/Database/Connection.php(617): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'select * from `...', Array)
#2 /var/www/TEST_SITE/htdocs/vendor/illuminate/database/Illuminate/Database/Connection.php(581): Illuminate\Database\Connection->runQueryCallback('select * from `...', Array, Object(Closure))
#3 /var/www/TEST_SITE/htdocs/vendor/illuminate/database/Illuminate/Database/Connection.php(304): Illuminate\Database\Connection->run('select * from `...', Array, Object(Closure))
#4 /var/www/TEST_SITE/htdocs/vendor/illuminate/d" while reading response header from upstream, client: 127.0.0.1, server: TEST_SITE.com, request: "GET /api/v1/server/info HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "TEST_SITE.com"
 
Note: You can download a stable version here.

Hi there!

First of all, this thread is a discussion because DevAAC is still considered "work in progress". It has a mature enough backend, but the frontend is incomplete. I hope to gather some feedback from you and prioritize feature requests from those who decide to use it.

Introduction
DevAAC is completely free (MIT license), open-source AAC based on Slim PHP framework (for backend) and AngularJS on frontend.

It's been created by me, my friend and @Znote, who helped me a lot with frontend and convinced me to use AngularJS and started me on it.

The only goal of DevAAC is to support TFS 1.0. At this point, it's stupid to use any other forgotten engine. There are tons of versions of Gesior, ModernAAC and even ZnoteAAC. The author cannot maintain a version of them for TFS 0.2, 0.3, 0.4 and 1.0 separately. Noone uses them all to test bugs and it takes a lot of code to support them all in one software package. For the same reason, the newest version of TFS only supports one client protocol - it would be very hard to maintain support for multiple versions.

Technically speaking, ModernAAC has too much of MVC bloatware - too much code, structure and complexity to do too little. Gesior is an offense to developer's eyes so I'll skip it. Znote is a promising alternative and a "standard" for TFS 1.0 but it still feels like mix'n'match of code. We aim to learn from the mistakes of those scripts and create one good solution.

Frontend and backend
DevAAC is split into two modules: frontend and backend. Right now they live in the same repository but it might be a good idea to split them along the way. DevAAC has been built for simplicity, security and ease of use and code. I realize that most of us are not professional programmers and probably learn while extending the code. Therefore, the code of DevAAC should always be annotated and simple to understand.

These reasons made me decide to use Slim PHP Framework. It is really slim, just what we need for what we have. It takes minutes to learn and is fast. We don't need anything else. Slim provides us "controllers" and "routers".

For "Models" and the MySQL database, we use Laravel's Eloquent ORM. It is just simply... eloquent.

Server requirements and Installation instructions
DevAAC needs PHP. The newer, the better. Minimum requirements are specified in README.
For speed and simplicity, we use Composer to download dependencies. Stable versions will probably come out with everything bundled but I doubt there will be any named version. We prefer agile development. You should be able to pull new commits from master branch in our git repo and run it safely.

In the code repo, we have a Vagrantfile if you are familiar with Vagrant. It will allow you to build full Linux virtual machine to test your code on a real Ubuntu box with nginx, MySQL, PHP and everything you need.

My ultimate guide to install/configure Ubuntu box to host OTS also installs DevAAC by default. Since my hosting service uses that recipe, it also includes the DevAAC by default (you can replace it with anything else you want though).

Backend

Quick facts:
  • Backend is written in PHP using Slim framework and Eloquent ORM
  • The primary purpose of backend is to provide RESTful API to be consumed by frontend, server lists like otls.net, OTClient or your restful cat
  • It can run invisibly alongside your current AAC, just exposing /api/ route
  • You should never need to modify the backend core and you should update it frequently by "git pull"
DB Schema: DevAAC does not modify the database schema. This means that there is no "installation" required, no tables to add, no SQL queries to run, no samples to add to database. It is supposed to be super-easy to install... wait, not installation! Plug & Play!

Plugins: The core backend application is supposed to provide most common functionality. Anything that is not useful for everyone, has some extra dependencies or that you want to develop yourself, should be a plugin. Plugins are just files included by the core before Slim framework processes the request, so you can do anything. It is your server after all! See examples. Some plugins can be disabled in config.php, others cannot. It all depend on a plugin. If you build a cool plugin, please contribute it back through a pull request!

Config: All you need to do is provide a path to config.lua. If for some reason, you don't have the TFS server on this machine (so no config.lua), you can specify an array of some required options from config.lua. It's best to provide a path to config.lua. That's the only required configuration. Just copy config.sample.php as config.php and read it. You will know what to set and how to set it up .

Current features besides "regular" AAC operations include:
  • news: those are "posts" loaded by API so server lists can use them (ain't that cool, huh?). To create a post, simply create a file in public_html/news directory, ending with .md. It is a Markdown file, so you don't need to know HTML! To remove post, remove the file. There is no admin panel (yet). Simple? Duh!
  • rate limiter: it's a plugin. It is ultra-fast because it keeps info in memory (APC/APCu). It prevents DoS attacks.
  • ip ban: it's a plugin. TFS 1.0 allows you to ban IPs. You probably don't like people with those IPs, so this plugin bans them for you from the website too.
Frontend

Quick facts:
  • It is a Single Page Application, so it's super-fast once it loads
  • It's based on AngularJS and is supposed to be SEO-friendly, too
  • This is the place which you can fork and edit heavily to adapt to your server
  • It uses RESTful API exposed by the backend to do everything
  • The default frontend is based on Bootstrap
Everyone needs to customize their AAC. We know it. Whatever features it may have, you will end up editing something. It's not possible to make everything configurable through admin panel. It adds a lot of code and is probably not necessary for most of people. Therefore, I believe that frontend is the play for you to edit. Even if you make mistakes, it doesn't pose any security risk to your server. Everything important runs on the server (backend) and you don't need to edit that. Frontend runs in the browser, so you can do whatever you want in here.

I expect (hopefully) people to come up with modified editions of frontend to include custom templates/themes/layouts. It would be great if people started releasing those. It should be fine to fork frontend and not keep up with updates. It is enough to update the backend (API) to stay safe and compatible with newest versions and not ruing your customizations, which are entirely on the front-end side!

How is DevAAC better? What should be expected in future?
DevAAC is something completely new because nobody has built an AAC as a single-page app. And everybody loves single-page apps, because they are fast!

Secondly, the powerful API can be used by server lists. If a significant number of servers implements DevAAC API, it would be possible to create accounts, manage players and read news through the list itself! It would act just like a front-end. The same could be done in the OTClient itself, if someone codes that! Possibilites are endless and unfortunately I don't have the time to implement it all. I will use some features of the API in the new server list (http://otls.net) project.

What's great about the API is that you can install it even if you already use a different AAC! Just set up your webserver to pass /api/ request to DevAAC and everything else to your current AAC. That's it!

Current Progress:
  • backend: almost done, a couple more features are needed
  • fronted: preview is available, a lot of features missing
Contribute!
I am looking for help, especially on the front-end part. If you want to contribute, contact me or just start sending pull requests!

Download link
There is no download link! Learn how to use Github, visit our repo at DevelopersPL/DevAAC and help the project to be the best AAC for TFS 1.0!


Tell us what you think!

Thats Awesome, I think i will fork that and refactor the front end using Vue js
 
Alright, so I thought this AAC seemed really neat and wanted to give it a go. However I feel like I'm too uneducated on several of the points in the instructions. So maybe someone can clarify for me so I can get through this.

1. Laravel & Slim Framework. Is this something I need to know how to manage? I think that I've managed to install them, but not sure at all how they should be configured. I will have a lot of reading to do to even nearly understand what those are.

2. Backend. OP posts a picture of the backend which looks like some kind of admin panel or something? How do I access this?

3. My progress so far. I've managed to get the main page going, but when I try to create an account it just says "Not found: undefined".
test.png

I am using latest TFS 1.3 with DevAAC which is 1.2 compatible from here

I have also linked config.lua location in config.php

MySQL settings are set in config.lua.dist and I have created a database with schema.sql imported.

PHP VERSION
Code:
PHP 7.3.10 (cli) (built: Sep 26 2019 13:40:03) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.10, Copyright (c) 1998-2018 Zend Technologies

MARIADB VERSION
Code:
Your MariaDB connection id is 11
Server version: 10.4.8-MariaDB Arch Linux

NGINX VERSION
Code:
nginx version: nginx/1.16.1

I might be missing something obvious here, I've managed to setup Znote in the passed though. Also this is the first time I'm using nginx instead of apache.

Maybe the TFS version is the issue here?
 
@Sequax This AAC has really not been updated in a long while. It's great for when you want to expand/develop it but it's probably not download'n'run state right now.
 
Back
Top