Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Best Website File/Folder Practises?

I'm beginning to work on a project on my own and working with frameworks. Currently, I have Laravel and Bootstrap being used and the folders are obviously starting to build up.

Are there any 'best' practises to file structure in websites to make it easy to navigate at all? While I'm at it, I'm only just starting with Laravel, can I put Laravel all into its own folder, or is it best being in the root directory of the website?
I build wordpress custom websites and I like their file structure.
/wp-content/themes/theme-name
main.css (style.css)
/css
/js

You could always use vendor though for another if you have multiple types of frameworks being used.
Web Designer / Developer & SEO Expert.

View Work
Earn 10% of the job you refer me to!

Skype aerox.design

If it's something small, I usually only bother with a folder for images or whatever there's a lot of. If larger, typically looks like this:

/index.html
/contact.html
/assets/css
/assets/js
/assets/fonts
etc

I put all my files aside from pages into the assets folder with a specific subfolder for the type of content.
Skype: ryand.8
[Image: XbaG5gl.gif]
(Jun 5, 2017 12:21 PM)Rushax Wrote:  I build wordpress custom websites and I like their file structure.
/wp-content/themes/theme-name
main.css (style.css)
/css
/js

You could always use vendor though for another if you have multiple types of frameworks being used.
I'm basically trying to figure out what kinds of folder names people have where they store certain things so it can be easily navigated if I ever get someone to work with. I have another project where they have a folder called 'dist' where they keep css/js files, unsure of why the name is dist though.

(Jun 5, 2017 04:44 PM)ryan⚜ Wrote:  If it's something small, I usually only bother with a folder for images or whatever there's a lot of. If larger, typically looks like this:

/index.html
/contact.html
/assets/css
/assets/js
/assets/fonts
etc

I put all my files aside from pages into the assets folder with a specific subfolder for the type of content.
Yeah for small projects I'm not too fussed, I'm trying to get into making bigger projects and basically want a good structure so if anyone was to join, they wouldn't be asking me why I don't have things grouped together properly or something. Right now I have a 'resources' folder which keeps all the css/js files that my site will have. Unsure what to do with Laravel at this time and where to put it but I might just look through some Laravel web project sources.
I think it ultimately depends on the project. For example if you were doing an asset management type of site, you wouldn't want to potentially keep all of your images under the /images directory. You'd probably want to categorize them in a particular order.
Obviously for smaller sites this is absolutely fine and I agree with Ryan's structure. I've also seen 'dist' used and it means distribution and "and is the minified/concatenated version - actually used on production sites."
Source: https://stackoverflow.com/questions/2373...st-folders

I saw the use of things such as vendor as well if you had multiple frameworks used, which if structured correctly work really well.
PHP Code

<?php 
/vendor
     
/isotope/
     /
bootstrap
     
/other big libraries used 
I suppose it comes down to personal preference as well as trying to maintain a simple structure.
Web Designer / Developer & SEO Expert.

View Work
Earn 10% of the job you refer me to!

Skype aerox.design



Possibly Related Threads...
Thread / Author Replies Views Last Post
by Account of the GodsMar 16, 2018 09:41 AM 6 166 Mar 16, 2018 09:41 AM
Last Post: Account of the Gods
by StapletonDec 1, 2013 05:13 AM 11 441 Dec 1, 2013 05:13 AM
Last Post: Stapleton