Skip to content

App structure

Apps created with Genstore CLI follow a standardized directory structure for efficient development and management. Each directory and file serves a specific purpose to ensure a clear and maintainable app structure.

Directory overview

bash
your-app/
├── genstore.app.toml           			# Required: Main config file
├── genstore.app.{config-name}.toml          # Optional: Environment configs
├── package.json                			# Required: Project dependencies
├── app/                        			# Required: App code
   └── ...                    				# Entry points, routes, webhooks
└── extensions/                 			# Optional: Extensions directory
    └── your-extension/                  	 # Extension example
            ├── genstore.extension.toml      # Extension config
            └── ...

Core files

Configuration files

FileRequiredDescription
genstore.app.tomlYesMain app metadata and configuration file, marks app root directory
genstore.app.{config-name}.tomlNoEnvironment-specific configurations for local management and Genstore synchronization
package.jsonYes- Contains Node-related project metadata
- Contains project dependencies and scripts
- Used to run Genstore CLI commands via package manager
- Subdirectories may contain additional package.json files

Directories

DirectoryRequiredDescription
app/YesContains app entry points, routes, and webhooks
extensions/No- Houses generated extensions
- Each subdirectory represents an extension
- Subdirectory name as the local identifier
- Each subdirectory must contain a TOML config file

Configuration details

Main config file (genstore.app.toml )

This is the core configuration file for app-level settings and metadata. When you first run app dev, Genstore CLI automatically:

  • Links current project with Genstore app.
  • Updates configuration information.
  • Generates necessary app identifiers and credentials

Environment config files (genstore.app.{config-name}.toml)

Using genstore.app.{config-name}.toml, you can:

  • Link project to multiple Genstore apps
  • Manage configurations across environments (development, testing, production)
  • Maintain separate settings for each environment