ElkArte Community

Title: Reorganize the project files
Post by: Joshua Dickerson on July 14, 2015, 05:18:01 pm
I got a new laptop and am going to start getting back in to development more. So, I am setting up a new development environment with Netbeans (or PHPStorm if I decide to pay up). Problem that I am seeing is that there is a lot of development stuff in the project that I want to separate. So, I was thinking that the easiest way to handle this is to just move everything to a new directory. Thus, a new structure.

Code: [Select]
/
/elkarte
/cache
/docs
/install
/packages
/sources
/www (in documentation, recommend this is the only publicly viewable directoy)
/attachments (should only put the public attachments here)
/avatars
/smileys
/themes
LICENSE.txt
SSI.php
agreement.txt
emailpost.php
emailtopic.php
favicon.ico
index.php (points to /elkarte/index.php)
ssi_examples.php
ssi_examples.shtml
Settings.sample.php
Settings_bak.sample.php
index.php
db_last_error.sample.txt
email_imap_cron.php
/tests
.gitattributes
.gitignore
CONTRIBUTING.md
README.md
index.php (points to /elkarte/index.php)
composer.json
composer.lock
license.md
phpdoc.yml

Then when it comes time to package, you pretty much just grab the /elkarte directory and you are done.
Title: Re: Reorganize the project files
Post by: Spuds on July 16, 2015, 09:46:06 pm
I like the additon of the www, cleans things up a bit
Title: Re: Reorganize the project files
Post by: emanuele on July 23, 2015, 05:57:15 am
Interesting, not something we can do for 1.1, but for 2.0 could be an idea.
I see two small issues with the current config:
1) attachments, as you noted it should contain "public" attachments, but public attachments are just the avatars, so, why not put the avatars in avatars?
2) cache, at the moment css and js hives are stored in that directory, so it should either be moved to www or another one should exist in... themes? Probably the second is cleaner and much nicer anyway.
Title: Re: Reorganize the project files
Post by: Joshua Dickerson on July 23, 2015, 11:44:15 am
Public attachments (those that don't have any permissions attached to them) could just return a 301 (permanently moved). Hopefully, the client won't hit the PHP uri anymore and go straight to the new uri. We could put all of the public attachments in a public folder and reduce the load on the server.
Title: Re: Reorganize the project files
Post by: Joshua Dickerson on December 29, 2015, 08:40:12 pm
I went and did a little something crazy... started a new repo just for 2.0. First change... reorganize the project's files.

https://github.com/joshuaadickerson/Elkarte2/tree/753c5e6e14080a7e90ba4d72b3ffa96d6163e52a
Title: Re: Reorganize the project files
Post by: emanuele on December 30, 2015, 02:07:16 am
/me smells interesting stuff. nods
Title: Re: Reorganize the project files
Post by: inter on December 30, 2015, 06:51:10 am
/www to rename /pub[lic]