Skip to main content
Topic: Reorganize the project files (Read 2211 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Reorganize the project files

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.

Re: Reorganize the project files

Reply #1

I like the additon of the www, cleans things up a bit

Re: Reorganize the project files

Reply #2

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.
Bugs creator.
Features destroyer.
Template killer.

Re: Reorganize the project files

Reply #3

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.


Re: Reorganize the project files

Reply #5

 emanuele smells interesting stuff. nods
Bugs creator.
Features destroyer.
Template killer.

Re: Reorganize the project files

Reply #6

/www to rename /pub[lic]
Sorry for my English