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.
/
/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.
I like the additon of the www, cleans things up a bit
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.
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.
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
/me smells interesting stuff. nods
/www to rename /pub[lic]