diff --git a/.cspell.json b/.cspell.json index 24cdb86..1396a0b 100644 --- a/.cspell.json +++ b/.cspell.json @@ -5,6 +5,7 @@ "node_modules/**", "**/node_modules/**", ".next/", + "app/ai-best-practices", "out", "public/", "package.json", diff --git a/app/_meta.ts b/app/_meta.ts index 410237c..2528859 100644 --- a/app/_meta.ts +++ b/app/_meta.ts @@ -1,13 +1,12 @@ const meta = { index: "Introduction", - setup: "Setup", - applications: "Applications", - server: "Server & API", + server: "Server Management", + deployment: "Deployment Management", advanced: "Advanced", translations: "Translations", - design: "Destign System", + design: "Design System", troubleshooting: "Troubleshooting", - "ai-best-practices": "AI Best Practices", + "ai-best-practices": "AI", issues: { title: "Issues ↗", href: "https://github.com/e-picsa/picsa-apps/issues", diff --git a/app/deployment/meta.ts b/app/deployment/meta.ts new file mode 100644 index 0000000..29c0bfc --- /dev/null +++ b/app/deployment/meta.ts @@ -0,0 +1,3 @@ +export default { + "new-deployment":"Add New Deployment" +}; diff --git a/app/deployment/new-deployment/page.mdx b/app/deployment/new-deployment/page.mdx new file mode 100644 index 0000000..2775e7d --- /dev/null +++ b/app/deployment/new-deployment/page.mdx @@ -0,0 +1,61 @@ +# Create Deployment + +## Database updates + +### Country code +Register [ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) for the country within the database schema. + +E.g., if adding the country "Zimbabwe", should use code `zw` + +```sql +ALTER TYPE country_code ADD VALUE 'zw'; +``` + +### Languages +Additionally register any language codes using the [ISO 639 Set 1 standard](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) + +Include an `en` variant for localised updates to English language variables, e.g. adding `shona` and `ndebele` languages + +Update database +```sql +ALTER TYPE locale_code ADD VALUE 'zw_en'; +ALTER TYPE locale_code ADD VALUE 'zw_sn'; +ALTER TYPE locale_code ADD VALUE 'zw_nd'; +``` + +When all database updates are complete export the new type-definitions via +```bash +yarn nx run picsa-server:gen-types +``` + +### Data updates +Finally provided mappings in the hardcoded app data mappings + +`libs\data\deployments\countries.ts`. +```ts +const COUNTRIES_BASE: { [key in ICountryCode]: { label: string } } = { + zw: { label: 'Zimbabwe' }, +}; +``` + +`libs\data\deployments\locales.ts`. +```ts +const LOCALES_BASE: { +zw_en: { language_code: 'en', language_label: 'English', country_code: 'zw' }, +zw_sn: { language_code: 'sn', language_label: 'Shona', country_code: 'zw' }, +zw_nd: { language_code: 'nd', language_label: 'Ndebele', country_code: 'zw' }, +} +``` + +## Static Assets + +1. Downloaded from public source, e.g. +https://en.wikipedia.org/wiki/List_of_aspect_ratios_of_national_flags + +2. Compress SVGs via +https://jakearchibald.github.io/svgomg/ + +3. Place in local folder `libs/shared-assets/images/flags` + +4. Upload to Supabase Storage Bucket `global/images/flags` + diff --git a/app/page.mdx b/app/page.mdx index 1281fd4..aa3a267 100644 --- a/app/page.mdx +++ b/app/page.mdx @@ -3,4 +3,8 @@ Welcome to the PICSA Project documentation. This project supports the PICSA digital applications and web components that can be accessed as standalone tools. ## Overview -![Apps](./picsa-apps.png) \ No newline at end of file +![Apps](./picsa-apps.png) + +## Getting Started + +View the [Readme](https://github.com/e-picsa/picsa-apps) on the main picsa-apps Repo \ No newline at end of file