Chapter 2 Project layout
2
Chapter 2

Project layout

Runtime projects are ordinary folders with an explicit app contract. The two files to read first are oro.toml, which describes the app, and the copy map, which says exactly what ships.

Read the generated shape

Keep source files, copied assets, and build output in separate places.

Terminal
find . -maxdepth 2 -type f | sort
Project shape
field-notes/
  oro.toml
  copy-map.toml
  src/
    index.html
    main.js
    styles.css
  build/

Name the bundle inputs

The build config points to the copy map. The copy map owns the final bundle paths.

oro.toml
[build]
name = "field-notes"
copy_map = "copy-map.toml"
output = "build"
copy-map.toml
"./src/index.html" = "index.html"
"./src/main.js" = "main.js"
"./src/styles.css" = "styles.css"

Check what will ship

If a file is not in the copy map, it is not part of the bundled app.

Terminal
oroc build .
oroc print-build-dir .

Treat the copy map as a manifest, not a convenience file. It keeps builds reviewable because every bundled file has an intentional source path.

What changed

  • oro.toml became the app contract.
  • copy-map.toml became the shipping manifest.
  • src/ stayed plain web source.
  • build/ stayed generated output.

Chapter complete

Next, separate shared project configuration from local machine overrides.

Continue to configuration