Where to put your files in C3 AI packages.
Analytics.c3typ
:Analytics.js
:Analytics.test.js
:Source Files (src/)
.c3typ
).js
, .py
)Asset.c3typ
→ Asset.js
)src/
directory. For an Asset type:User Interface (ui/)
components/
: Reusable UI elements that can be composed into pages
pages/
: Complete application views that combine components
ui/components/AssetCard.jsx
):ui/pages/AssetDashboard.jsx
):Configuration (config/)
config/AppConfig/settings.json
should match AppConfig
Typeconfig/AppConfig/settings.json
(default values)config/AppConfig/settings.dev.json
(overrides for development)config/AppConfig/settings.prod.json
(overrides for production)config/AppConfig/settings.test.json
(overrides for testing)Configuration.get('path.to.value')
to access valuesconfig/AppConfig/settings.json
):config/AppConfig/settings.prod.json
):src/config/AppConfig.c3typ
):Metadata (metadata/)
Schedule/
: Scheduled jobs and cron tasksRole/
: User roles and permissionsTranslation/
: Internationalization stringsSimpleMetric/
: Metrics for monitoringCodeCoverageInstrumentationSpec/
: Test coverage configurationmetadata/Schedule/HealthCheck.json
):metadata/Role/Operator.json
):metadata/Translation/en.csv
):Tests (test/)
src/asset/Asset.js
→ test/src/asset/Asset.test.js
.test
suffix
Asset.js
→ Asset.test.js
test/src/asset/Asset.test.js
):test/integration/AssetSensor.test.js
):Seed Data (seed/)
seed/Asset/
for Asset instancesseed/User/
for User instancesseed/Asset/InitialAssets.json
):Reference Data (data/)
data/reference/
for lookup tablesdata/validation/
for validation rulesdata/ml/
for machine learning parametersdata/reference/equipment-codes.csv
):data/reference/status-mappings.json
):reliabilityDataModel
package in our reliability examples uses a single package approach because it focuses on a set of data models that are tightly coupled.
reliabilityDataModel
, reliabilityMl
, reliabilityUiComponentLibrary
) because each focuses on a different aspect of the application that can evolve independently.
reliabilityUiComponentLibrary
to share UI components across applications, reducing duplication and ensuring consistent user experiences.
Versioning needs differ across components. Your data models might stabilize early while your UI evolves rapidly. Separating these components lets you version them independently, using minor bumps for stable components and major updates for rapidly changing ones.