farmbot_os/docs/project/structure.md

1.5 KiB

FarmBot Source Project structure

The FarmBot OS application is broken into several sub OTP applications.

Generating Specific documentation

Each project has it's own inline documentation. Documentation can be generated by changing directory into the application of interest and using exdoc to generate docs. For example for farmbot_core:

cd farmbot_core
mix deps.get
mix docs

Generating docs for all projects can be done with the root level Makefile:

make deps
make docs

Commonality

All of these folders share a common structure.

$ tree $OTP_APP_ROOT
$OTP_APP_ROOT
├── lib/
│   ├── application.ex
│   └── some_file.ex
|
├── test/
|   └── test_helper.exs
|
├── config/
|   └── config.exs
|
├─── mix.exs
└─── mix.lock

* The `lib` folder contains Elixir source code
* the `test` folder contains Elixir scripts responsible for testing the `lib` code
* the `config` folder contains Elixir scripts responsible for
  configuring the **current** OTP app
* `mix.exs` and `mix.lock` files are responsible describing
  the OTP app, and managing external dependencies