├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 KriaSoft 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Folder Structure Conventions 2 | ============================ 3 | 4 | > Folder structure options and naming conventions for software projects 5 | 6 | ### A typical top-level directory layout 7 | 8 | . 9 | ├── build # Compiled files (alternatively `dist`) 10 | ├── docs # Documentation files (alternatively `doc`) 11 | ├── src # Source files (alternatively `lib` or `app`) 12 | ├── test # Automated tests (alternatively `spec` or `tests`) 13 | ├── tools # Tools and utilities 14 | ├── LICENSE 15 | └── README.md 16 | 17 | > Use short lowercase names at least for the top-level files and folders except 18 | > `LICENSE`, `README.md` 19 | 20 | ### Source files 21 | 22 | The actual source files of a software project are usually stored inside the 23 | `src` folder. Alternatively, you can put them into the `lib` (if you're 24 | developing a library), or into the `app` folder (if your application's source 25 | files are not supposed to be compiled). 26 | 27 | > **Samples**: [jQuery](https://github.com/jquery/jquery) `src`, [Node.js](https://github.com/nodejs/node) `lib` and `src`, [D3.js](https://github.com/mbostock/d3) `src`, [AngularJS](https://github.com/angular/angular.js) `src`, [Adobe Brackets](https://github.com/adobe/brackets) `src`, [three.js](https://github.com/mrdoob/three.js) `src`, [Express](https://github.com/visionmedia/express) `lib`, [Socket.IO](https://github.com/LearnBoost/socket.io) `lib`, [Less.js](https://github.com/less/less.js) `lib`, [Redis](https://github.com/antirez/redis) `src`, [Ace](https://github.com/ajaxorg/ace) `lib`, [Semantic UI](https://github.com/Semantic-Org/Semantic-UI) `src`, [Zepto.js](https://github.com/madrobby/zepto) `src`, [Emscripten](https://github.com/kripken/emscripten) `src`, [RethinkDB](https://github.com/rethinkdb/rethinkdb) `src`, [Bitcoin](https://github.com/bitcoin/bitcoin) `src`, [MongoDB](https://github.com/mongodb/mongo) `src`, [Facebook React](https://github.com/facebook/react) `src`, [Rust](https://github.com/mozilla/rust) `src`, [ASP.NET](https://aspnetwebstack.codeplex.com/SourceControl/latest) `src`, [SignalR](https://github.com/SignalR/SignalR) `src`, [libgit2](https://github.com/libgit2/libgit2) `src` 28 | 29 | ### Automated tests 30 | 31 | Automated tests are usually placed into the `test` or, less commonly, into the `spec` or `tests` folder. 32 | 33 | > **Q: Why tests are placed into a separate folder, as opposed to having them closer to the code under test?** 34 | > 35 | > **A:** Because you don't want to test the code, you want to test the *program*. 36 | 37 | . 38 | ├── ... 39 | ├── test # Test files (alternatively `spec` or `tests`) 40 | │ ├── benchmarks # Load and stress tests 41 | │ ├── integration # End-to-end, integration tests (alternatively `e2e`) 42 | │ └── unit # Unit tests 43 | └── ... 44 | 45 | > **Samples**: [jQuery](https://github.com/jquery/jquery), [Node.js](https://github.com/joyent/node), [D3.js](https://github.com/mbostock/d3), [AngularJS](https://github.com/angular/angular.js), [Adobe Brackets](https://github.com/adobe/brackets), [three.js](https://github.com/mrdoob/three.js), [Express](https://github.com/visionmedia/express), [Socket.IO](https://github.com/LearnBoost/socket.io), [Less.js](https://github.com/less/less.js), [Bower](https://github.com/bower/bower), [Mozilla PDF.js](https://github.com/mozilla/pdf.js), [Grunt](https://github.com/gruntjs/grunt), [Gulp](https://github.com/gulpjs/gulp), [Semantic UI](https://github.com/Semantic-Org/Semantic-UI), [Zepto.js](https://github.com/madrobby/zepto), [Jade](https://github.com/visionmedia/jade), [RethinkDB](https://github.com/rethinkdb/rethinkdb), [Vagrant](https://github.com/mitchellh/vagrant), [Sails.js](https://github.com/balderdashy/sails), [GitHub Hubot](https://github.com/github/hubot), [Facebook React](https://github.com/facebook/react), [Ansible](https://github.com/ansible/ansible), [ASP.NET](https://aspnetwebstack.codeplex.com/SourceControl/latest), [browserify](https://github.com/substack/node-browserify), [Paper.js](https://github.com/paperjs/paper.js), [Julia](https://github.com/JuliaLang/julia), [Karma](https://github.com/karma-runner/karma) 46 | 47 | ### Documentation files 48 | 49 | Often it is beneficial to include some reference data into the project, such as 50 | Rich Text Format (RTF) documentation, which is usually stored into the `docs` 51 | or, less commonly, into the `doc` folder. 52 | 53 | . 54 | ├── ... 55 | ├── docs # Documentation files (alternatively `doc`) 56 | │ ├── TOC.md # Table of contents 57 | │ ├── faq.md # Frequently asked questions 58 | │ ├── misc.md # Miscellaneous information 59 | │ ├── usage.md # Getting started guide 60 | │ └── ... # etc. 61 | └── ... 62 | 63 | > **Samples**: [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate) `docs`, [Backbone](https://github.com/jashkenas/backbone) `docs`, [three.js](https://github.com/mrdoob/three.js) `docs`, [GitLab](https://github.com/gitlabhq/gitlabhq) `doc`, [Underscore.js](https://github.com/jashkenas/underscore) `docs`, [Grunt](https://github.com/gruntjs/grunt) `docs`, [Emscripten](https://github.com/kripken/emscripten) `docs`, [RequireJS](https://github.com/jrburke/requirejs) `docs`, [GitHub Hubot](https://github.com/github/hubot) `docs`, [Twitter Flight](https://github.com/flightjs/flight) `doc`, [Video.js](https://github.com/videojs/video.js) `docs`, [Bitcoin](https://github.com/bitcoin/bitcoin) `doc`, [MongoDB](https://github.com/mongodb/mongo) `docs`, [libgit2](https://github.com/libgit2/libgit2) `docs`, [Stylus](https://github.com/stylus/stylus) `docs`, [Gulp](https://github.com/gulpjs/gulp) `docs`, [Apache httpd](https://github.com/apache/httpd) `docs`, [Windows Terminal](https://github.com/microsoft/terminal/tree/main) `doc`, [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet) `docs` 64 | 65 | ### Scripts 66 | 67 | ... 68 | 69 | ### Tools and utilities 70 | 71 | ... 72 | 73 | ### Compiled files 74 | 75 | ... 76 | 77 | ### 3rd party libraries 78 | 79 | ... 80 | 81 | ### License information 82 | 83 | If you want to share your work with others, please consider choosing an open 84 | source license and include the text of the license into your project. 85 | The text of a license is usually stored in the `LICENSE` (or `LICENSE.txt`, 86 | `LICENSE.md`) file in the root of the project. 87 | 88 | > You’re under no obligation to choose a license and it’s your right not to 89 | > include one with your code or project. But please note that opting out of 90 | > open source licenses doesn’t mean you’re opting out of copyright law. 91 | > 92 | > You’ll have to check with your own legal counsel regarding your particular 93 | > project, but generally speaking, the absence of a license means that default 94 | > copyright laws apply. This means that you retain all rights to your source 95 | > code and that nobody else may reproduce, distribute, or create derivative 96 | > works from your work. This might not be what you intend. 97 | > 98 | > Even in the absence of a license file, you may grant some rights in cases 99 | > where you publish your source code to a site that requires accepting terms 100 | > of service. For example, if you publish your source code in a public 101 | > repository on GitHub, you have accepted the [Terms of Service](https://help.github.com/articles/github-terms-of-service) 102 | > which do allow other GitHub users some rights. Specifically, you allow others 103 | > to view and fork your repository. 104 | 105 | For more info on how to choose a license for an open source project, please 106 | refer to http://choosealicense.com 107 | --------------------------------------------------------------------------------