Manifest File Structure
Relevant source files
The following files were used as context for generating this wiki page:
The manifest.json file serves as a comprehensive catalog of all generated branding assets for the FOSSBilling project. It records metadata for every exported file, including icons, logos, favicons, and preview sheets, while providing a timestamp of the export event.
The asset generation script creates this file in the distribution directory to allow automated systems and users to discover available files without manual directory traversal. Sources: README.md:44-48, scripts/generate-assets.ts:153-155
Data Model
The manifest follows a structured hierarchy defined in the TypeScript type definitions. It consists of a top-level object containing global metadata and an array of individual asset objects.
The diagram shows the relationship between the root manifest object and the individual asset entries. Sources: scripts/types.ts:1-21
Root Object Fields
| Field | Type | Description |
|---|---|---|
exportedAt | String | The UTC date and time of the asset generation in ISO 8601 format. |
files | Array | A list of Asset objects representing every file in the distribution. |
Sources: scripts/types.ts:18-21, test/generate-assets.test.ts:43-44
Asset Entry Fields
Each entry in the files array describes a specific exported file. Some fields are optional or specific to certain asset types (e.g., raster images or multi-resolution icons).
| Field | Type | Description |
|---|---|---|
path | String | The relative path to the file from the distribution root. |
variant | String | null | The background variant name (e.g., light-background). Null for global assets. |
type | String | Categorizes the asset: icon, logo, favicon, apple-touch-icon, or preview. |
format | String | The file extension (e.g., svg, png, ico). |
width | Number | The width in pixels (only for PNG formats). |
height | Number | The height in pixels (only for PNG formats). |
sizes | Number[] | Array of internal frame sizes (only for .ico files). |
variants | String[] | List of included variants (only for the preview asset). |
Sources: scripts/types.ts:8-16, scripts/generate-assets.ts:121-125, test/generate-assets.test.ts:54-68
Generation Logic
The generate-assets.ts script assembles the manifest after validating and processing all SVG masters and raster exports. It ensures that the manifest accurately reflects the files present in the output directory.
The flow shows how asset metadata is collected during the generation process before being written to the final manifest file. Sources: scripts/generate-assets.ts:70-155
Path Normalization
The generator converts system-specific file paths into standardized web paths using forward slashes (/). This ensures consistency across different operating systems. Sources: scripts/generate-assets.ts:121
Obsolete File Removal
The generation process compares existing files against the newly generated manifest. If a file exists in the output directory but is not present in the current manifest, the script identifies it as obsolete and removes it. This prevents the manifest from referencing non-existent files or leaving orphaned assets from previous configurations. Sources: scripts/generate-assets.ts:167-185, test/generate-assets.test.ts:75-96
Usage in Configuration
The contents of the manifest are directly influenced by the export.config.json file. Changing the configuration parameters results in a different set of entries in the generated manifest.
{
"iconSizes": [128, 256, 512],
"logoWidths": [600, 1200],
"variants": {
"light-background": { "icon": "...", "logo": "..." }
}
}
Sources: export.config.json:1-21
If iconSizes contains three integers, the manifest will include three distinct PNG icon entries for every configured variant. Sources: scripts/generate-assets.ts:140-142
The manifest serves as the single source of truth for the Branding Website, allowing it to dynamically list and provide download links for all available versions of the FOSSBilling logo and icons. Sources: README.md:21-23