Skip to content
Open
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
25 changes: 23 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ jobs:
elif [[ "$RELEASE_NAME" == healthcheck-* ]]; then
PROJECT="healthcheck"
VERSION=${RELEASE_NAME#healthcheck-}
elif [[ "$RELEASE_NAME" == carto-* ]]; then
PROJECT="carto"
VERSION=${RELEASE_NAME#carto-}
else
echo "Invalid release name prefix. Must be 'dispatcher', 'lrm', 'landing' or 'healthcheck'."
echo "Invalid release name prefix. Must be 'dispatcher', 'lrm', 'landing', 'carto' or 'healthcheck'."
exit 1
fi

Expand Down Expand Up @@ -114,4 +117,22 @@ jobs:
push: true
platforms: linux/amd64
tags: ghcr.io/${{ github.repository_owner }}/hub-healthcheck:${{ steps.extract_info.outputs.version }}
context: ./tools/healthcheck
context: ./tools/healthcheck

- name: Build and push carto backend Docker image
if: steps.extract_info.outputs.project == 'carto'
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64
tags: ghcr.io/${{ github.repository_owner }}/hub-carto-back:${{ steps.extract_info.outputs.version }}
context: ./web/carto/server

- name: Build and push carto frontend Docker image
if: steps.extract_info.outputs.project == 'carto'
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64
tags: ghcr.io/${{ github.repository_owner }}/hub-carto-front:${{ steps.extract_info.outputs.version }}
context: ./web/carto/client
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ hub/dispatcher/src/main/resources/*.properties

# Needed as GitHub action for AsyncAPI generation installs npm packages
node_modules/
package-lock.json
package.json

# Class generation
models/node_modules
Expand Down
13 changes: 13 additions & 0 deletions web/carto/client/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
30 changes: 30 additions & 0 deletions web/carto/client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
es2021: true,
},
parser: 'vue-eslint-parser', // ✅ Use Vue's ESLint parser
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
'plugin:nuxt/recommended',
'plugin:prettier/recommended',
],
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'vue', 'prettier'],
// add your custom rules here
rules: {
'prettier/prettier': ['error', { singleQuote: true, semi: true }],
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-console': ['warn', { allow: ['error'] }],
'no-debugger': 'warn',
},
};
93 changes: 93 additions & 0 deletions web/carto/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# Nuxt generate
dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# IDE / Editor
.idea

# Service worker
sw.*

# macOS
.DS_Store

# Vim swap files
*.swp

# Nitro server output
.output
5 changes: 5 additions & 0 deletions web/carto/client/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist
.nuxt
.output
plugins
6 changes: 6 additions & 0 deletions web/carto/client/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"semi": true,
"vueIndentScriptAndStyle": false,
"plugins": ["prettier-plugin-vue"]
}
15 changes: 15 additions & 0 deletions web/carto/client/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": [
"stylelint-config-standard",
"stylelint-config-recommended-vue",
"stylelint-config-recommended-scss"
],
"plugins": [
"stylelint-scss"
],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"selector-class-pattern": null
}
}
39 changes: 39 additions & 0 deletions web/carto/client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 1. Build
FROM --platform=linux/amd64 node:19 AS builder

# Set working directory
WORKDIR /app

# Copy the npm project files needed for install to the container
COPY package*.json ./

# Install dependencies
RUN npm ci

# Copy the project files to the container
COPY . .

# Build the project
RUN npm run build

# 2. Start
FROM --platform=linux/amd64 node:19 AS runner

WORKDIR /app

ADD package.json .
ADD nuxt.config.ts .

COPY --from=builder /app/.nuxt ./.nuxt
COPY --from=builder /app/.output ./.output
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/public ./public

ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3000

# Expose port 3000
EXPOSE 3000

# Start the web app
CMD ["npm", "start"]
69 changes: 69 additions & 0 deletions web/carto/client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# dashboard

## Build Setup

```bash
# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate
```

For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org).

## Special Directories

You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality.

### `assets`

The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts.

More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/assets).

### `components`

The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components.

More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/components).

### `layouts`

Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop.

More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/layouts).


### `pages`

This directory contains your application views and routes. Nuxt will read all the `*.vue` files inside this directory and setup Vue Router automatically.

More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/get-started/routing).

### `plugins`

The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use `Vue.use()`, you should create a file in `plugins/` and add its path to plugins in `nuxt.config.js`.

More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins).

### `static`

This directory contains your static files. Each file inside this directory is mapped to `/`.

Example: `/static/robots.txt` is mapped as `/robots.txt`.

More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/static).

### `store`

This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex.

More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store).
Binary file added web/carto/client/assets/images/icons/SMUR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/carto/client/assets/images/icons/ambulance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/carto/client/assets/images/icons/heart-flash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/carto/client/assets/images/icons/map-marker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/carto/client/assets/images/logo_ANS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/carto/client/assets/images/logo_ministere.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions web/carto/client/assets/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Ref: https://github.com/nuxt-community/vuetify-module#customvariables
//
// The variables you want to modify
// $font-size-root: 20px;
3 changes: 3 additions & 0 deletions web/carto/client/composables/envUtils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function isEnvProd() {
return process.env.NODE_ENV === 'production';
}
Loading