Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"node_modules/**",
"**/node_modules/**",
".next/",
"app/ai-best-practices",
"out",
"public/",
"package.json",
Expand Down
9 changes: 4 additions & 5 deletions app/_meta.ts
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 3 additions & 0 deletions app/deployment/meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {

Check warning on line 1 in app/deployment/meta.ts

View workflow job for this annotation

GitHub Actions / build

Assign object to a variable before exporting as module default
"new-deployment":"Add New Deployment"
};
61 changes: 61 additions & 0 deletions app/deployment/new-deployment/page.mdx
Original file line number Diff line number Diff line change
@@ -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`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For cross-platform compatibility, it's best practice to use forward slashes (/) for file paths in documentation instead of backslashes (\).

`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`

6 changes: 5 additions & 1 deletion app/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
![Apps](./picsa-apps.png)

## Getting Started

View the [Readme](https://github.com/e-picsa/picsa-apps) on the main picsa-apps Repo
Loading