diff --git a/structure-folders.md b/structure-folders.md new file mode 100644 index 0000000..ec09cba --- /dev/null +++ b/structure-folders.md @@ -0,0 +1,62 @@ +# Folder Structure + +Each repository in this project has a specific folder structure that i find to be the most convenient. Here, I'll explain it. + +``` +root/ + - client/ + - components/ + - pages/ + - panels/ + - utilities/ + - app.jsx + - markdown/ + - styles/ + - common/ + - utilities/ + - server/ + - database/ + - models/ + - index.js + - index.js + - server.js + - sql/ + - .envdev + - .gitignore + - configure-script.js + - LICENSE + - package.json + - README.md +``` + +These are the most common folders and files between the core project and the microservices. Some, like `client` are only present in the core repo, while others not shown, are only present in their specific `server/` directories (such as `server/auth/` in the auth-server). + +## Client + +This folder structure is only in the core repo, and provides the client-facing React code. Most of the components are under `client/components` divided either as a full page, or as a panel (a reusable component on a larger page). + +`client/markdown/` contains markdown files that are rendered as entire pages on their own, while `client/styles` contains the CSS files for specific or entire areas of the project. + +## Common + +The `common/` directory is used for common files shared between client and server directories. + +## Server + +This directory is used by all repos, but the core repo has only a placeholder server that serves the client code at the time of writing. `server/database` and `server/database/models` hold the database information, while repo-specific directories can also be found here (such as `server/news`, `server/auth` and `server/chat`). `server/admin` may occasionally be found here as well. + +## Sql + +`sql/` contains some sql scripts for various uses. + +## Test + +`test` contains tools for testing the projects. This will eventually house fully automated testing suites. + +## Tools + +No repo currently has this directory, but eventually `tools/` will hold various utilities for building and maintaining the project manually. + +## Root + +There are also a number of files in the root directory listed here, which are fairly common between the projects, and are described by their names. \ No newline at end of file