• 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

Don Daniello

/root
Staff member
Administrator
Joined
Apr 11, 2008
Messages
3,697
Solutions
16
Reaction score
1,463
Location
Proland
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 https://github.com/DevelopersPL/DevAAC and help the project to be the best AAC for TFS 1.0!


Tell us what you think!
 
Bootstrap combined with Angular yeay, looks great. What about fontawesome? :D would be kewl for the start page.
 
There is no other environment that would provide benefits to offset the "change factor".

If anybody has a database for TFS 1.0 populated with all sorts of data and you are willing to share it with me (you can and should reset emails and passwords first) then it would greatly help in developing DevAAC.
 
Last edited:
PHP is bad, sure, but how you would get more contributors? Lets use a noob language. Gesior is not good, but its works. So, the idea of this ACC is good, but its better having something working and usable to show than just put the idea in the forum.
 
This AAC is in PHP because it is very easy to learn and is very easy to run. Installing a Ruby on Rails or Python Django stack is not easy.
This AAC was designed with some freshness in OpenTibia world. There is no other AAC that uses distinct client/server model. By keeping the backend small and limited to API only, we eliminate a lot of areas for bugs. I also hope that once all features are complete, not many changes will be required. The majority of development will continue in the frontend, which should be moved to a separate repository by then. Therefore, PHP will be good enough.
 
Interesting AAC :)! The problem is that new AAC usually lack features/layouts :( Hopefully we can see some contributions
 
This isn't first single page app accmaker. I've built one with ember.js.

I think this accmaker doesn't say it's for Open Tibia. It could be for company selling ships and no one would ever notice the change. Server owners don't care about backend as long as frontend is nice and easy, so players will come, register, notice it's site about GAME. You even use code block in example news... It's really useful for every OTS admin when they create message to players. GJ.
 
This isn't first single page app accmaker. I've built one with ember.js.

I think this accmaker doesn't say it's for Open Tibia. It could be for company selling ships and no one would ever notice the change. Server owners don't care about backend as long as frontend is nice and easy, so players will come, register, notice it's site about GAME. You even use code block in example news... It's really useful for every OTS admin when they create message to players. GJ.

Therefore it Open Tibia is dying we have "admins" but no developers.
Also i think this are in development and with time can be more intuitive, easy...
 
Last edited:
Interesting AAC :)! The problem is that new AAC usually lack features/layouts :( Hopefully we can see some contributions
The plan is to finish the features first, then we will improve the default layout. After that, we plan to implement some other layouts but I expect that once the features are complete enough, people will start doing it themselves for their own servers.

This isn't first single page app accmaker. I've built one with ember.js.

I think this accmaker doesn't say it's for Open Tibia. It could be for company selling ships and no one would ever notice the change. Server owners don't care about backend as long as frontend is nice and easy, so players will come, register, notice it's site about GAME. You even use code block in example news... It's really useful for every OTS admin when they create message to players. GJ.
Well, since yours wasn't released here (or was it?) I wasn't really aware of that. DevAAC was initially built with ember.js (you can see it in early commits) but Znote suggested to change that.
You don't get the idea of Markdown or WIP, do you?
 
I was just needed to comment this. @Znote told me about the development for a couple weeks ago, and it really turns out to be an masterpiece!!
And above comments, yes there are tons of OT developers who cares about the backend of a website as well.

GREAT WORK! This is just amazing, thanks @Don Daniello , @Znote and Don's friend for sharing this.

Kind regards,
Cornex.
 
Thanks @Cornex, fortunately there are still people who value strong backend more than nice colors on frontend. If you'd like to help or contribute, we are always looking to add more Authors to the project!
 
Thanks @Cornex, fortunately there are still people who value strong backend more than nice colors on frontend. If you'd like to help or contribute, we are always looking to add more Authors to the project!

Under the summer I have tons of things to complete, after the summer I (1,5 month) will contribute as much I can.
And yes, there are many who value a strong backend. Sadly that mostly AAC's most focused on the layout.. That is why I am glad DevAAC is here! (And it could not get better developers either!) ..
And you doing great in only support TFS 1.0!

For now, great work and keep improve this. Will without any doubt turns out as a great, really great AAC.

Happy summer OTLand!
 
This AAC is in PHP because it is very easy to learn and is very easy to run. Installing a Ruby on Rails or Python Django stack is not easy.
This AAC was designed with some freshness in OpenTibia world. There is no other AAC that uses distinct client/server model. By keeping the backend small and limited to API only, we eliminate a lot of areas for bugs. I also hope that once all features are complete, not many changes will be required. The majority of development will continue in the frontend, which should be moved to a separate repository by then. Therefore, PHP will be good enough.

Holy shit, do not remind me the days I tried installing Django...

Ontopic: It looks awesome! I hope to start working on my first server in years and if I do, I will be using this AAC.
Keep up the good work Don!
 
To all of the haters who despise our layout: it has just been improved a little:
2014-06-24_12-16-13_qcyr.png
 
Back
Top