Last updated Nov 29, 2023

Suggested directory structure

There is no enforced directory structure your new app has to align to, though we do have some recommendations to ensure:

  • Separate and namespaced Forge and Connect code (and their dependencies)
  • Extensibility (especially for potential future Forge remotes)
  • Alignment to the Forge's default structure

Our recommendations depend on whether your existing app runs a microservice or monorepo architecture.

Microservice architecture

If your app involves having multiple microservices in separate repos or directories, we simply recommend creating a new directory or repo for the Forge parts of your app, separate from your existing Connect app. The only required file to start is your manifest.yml.

Monorepo architecture

If your whole app just sits in one directory or you have a monorepo architecture, we'd recommend:

  1. Move all of your Connect app under /remotes/connect (this aligns with how your manifest.yml represents remotes).
  2. Keep the rest of your Forge app at the top level.

Your structure then should look something similar to:

1
2
Forge app directory
├── node_modules
├── remotes
│   ├── connect
│   │   ├── <all your existing Connect app code>  
├── src
├── manifest.yml
├── package.json
├── bitbucket-pipelines.yml
└── .gitignore

If you add any future remotes (using Forge remote), this structure allows you to create new folders within your /remotes/ directory and aligns with the default Forge structure.

Next steps

You've now got a recommended structure for your app. From here, we'd recommend you:

Rate this page: