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
40 changes: 0 additions & 40 deletions .devcontainer/devcontainer.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: '20'
node-version-file: .nvmrc
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: '22'
node-version-file: .nvmrc
cache: 'npm'
cache-dependency-path: docs/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: '20'
node-version-file: .nvmrc
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ config.yaml
proxy/*.pem

# IDE
.vscode/
.idea/
.vscode/*
!.vscode/extensions.json

# Logs
*.log
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.20.0
14 changes: 14 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"recommendations": [
"Vue.volar",
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-italian",
"bradlc.vscode-tailwindcss",
"foxundermoon.shell-format",
"vitest.explorer",
"golang.go"
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Web application providing centralized authentication and management using Logto
## 🚀 Quick Start

### Requirements
- **Development**: Go 1.24+, Node.js 20+ LTS, Make
- **Development**: Go 1.24+, Node.js per `.nvmrc` at the repo root, Make
- **Containers**: Docker OR Podman (optional, for full infrastructure)
- **External**: Logto instance with M2M app and Management API permissions
- **Deploy**: Render account with GitHub integration
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ Common problems and solutions.

### Prerequisites

- Node.js 20+
- npm
- Node.js — the version in `.nvmrc` at the repo root (`nvm install && nvm use`).
npm ships with Node, so there is nothing separate to install.

```bash
# Install dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ docs/

## Prerequisiti

- **Node.js** 20 o superiore
- **npm** (incluso con Node.js)
- **Node.js** — la versione indicata in `.nvmrc` nella radice del repository
(`nvm install && nvm use`). npm è incluso in Node.js, non serve installarlo a parte.

## Sviluppo Locale

Expand Down
2 changes: 1 addition & 1 deletion docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
]
},
"engines": {
"node": ">=20.0"
"node": ">=24"
},
"overrides": {
"@babel/plugin-transform-modules-systemjs": "^7.29.7",
Expand Down
7 changes: 2 additions & 5 deletions frontend/Containerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Build stage
FROM docker.io/library/node:22.18.0 AS base
# Node version: keep in sync with /.nvmrc
FROM docker.io/library/node:24.20.0 AS base

WORKDIR /app

# Development stage
FROM base as dev
CMD ["sh", "-c", "npm install && npm run dev"]

FROM base as builder
# Copy build trigger file to force rebuilds when it changes
COPY .render-build-trigger /tmp/build-trigger
Expand Down
81 changes: 32 additions & 49 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ Vue.js web application for My Nethesis with Logto authentication and Role-Based
## Quick Start

### Prerequisites
- Node.js 20+ LTS
- NPM
- Backend API running
- Node.js — the exact version in [`.nvmrc`](../.nvmrc) at the repo root. See [Node version](#node-version).
- Backend API running on port 8080
- Logto instance configured

### Setup
Expand All @@ -16,13 +15,31 @@ Vue.js web application for My Nethesis with Logto authentication and Role-Based
> Start it first with `cd backend && make dev-up && make run`.

```bash
# Install dependencies
npm ci

# Start development server (port 5173)
npm run dev
nvm install # no argument: reads ../.nvmrc, installs that version and switches to it
node -v # must match ../.nvmrc
npm ci # npm ships inside Node — nothing separate to install
npm run dev # development server on port 5173
```

### Node version

One version is pinned for the whole repo, at the **root** rather than here, because
nvm and fnm both search *upward* from the current directory — so a single pin
covers `frontend/` and `docs/` alike.

`.nvmrc` is the only version file, because every manager in practical use here
reads it: both nvm and fnm do.

- **nvm**: `nvm install`, then `nvm use` in every new shell. nvm does **not** switch
automatically; add the `cd` hook from nvm's "Deeper Shell Integration" section to
your shell rc if you want it to.
- **fnm**: `fnm install && fnm use`, or `eval "$(fnm env --use-on-cd)"` to automate it.

`engines` in `package.json` is the backstop. On the wrong Node, `npm ci` still
succeeds but prints `EBADENGINE` — treat that as an error, because `npm run
type-check` would then check against `@types/node` for a runtime you are not
actually running.

### Required Environment Variables

Environment files must be generated using the `sync` tool. See [sync README](../sync/README.md) for details.
Expand Down Expand Up @@ -91,47 +108,15 @@ npm run qa
npm run preview
```

### Container Development

#### Podman Development
```bash
# Start development container
./dev.sh
### Running without installing Node

# Build container image
./dev.sh build

# Run commands in container
./dev.sh npm run lint-fix
./dev.sh npm run format-fix
./dev.sh bash
```
There is no container-based dev server: `npm run dev` on the host is the only
development path.

#### VSCode Dev Containers

**Important Notes:**
- Modifying `dev.containers.dockerPath` setting affects all projects globally
- This procedure may not work on [VSCodium](https://vscodium.com/)

**Setup:**
1. Install [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
2. Configure Podman support:
- Go to `File > Preferences > Settings`
- Search for `dev.containers.dockerPath`
- Set the value to `podman`
3. Open the frontend directory in VSCode
4. Open Command Palette (`CTRL+SHIFT+P`) → "Reopen in Container" (or "Rebuild and Reopen in Container")
5. Open integrated terminal: `View > Terminal`
6. Run development commands:
```bash
npm install # Install dependencies
npm run dev # Start development server
npm run lint-fix # Fix linting issues
npm run format-fix # Format source files
npm run qa # Start QA environment server
```

Container configuration is in `.devcontainer/devcontainer.json`.
To run the app without installing anything, use the full stack from the repo
root — `docker-compose up -d`, app on http://localhost:9090. It needs a root `.env`
supplying the `VITE_LOGTO_*` values, which compose declares mandatory. That builds the
frontend's `production` target, so it is a build, not a live-reload server.

## Testing

Expand Down Expand Up @@ -167,8 +152,6 @@ frontend/
│ ├── views/ # Page components
│ └── i18n/ # Internationalization
├── public/ # Static assets
├── .devcontainer/ # VSCode Dev Container config
├── dev.sh # Podman development script
└── build.sh # Production build script
```

Expand Down
49 changes: 0 additions & 49 deletions frontend/dev.sh

This file was deleted.

20 changes: 12 additions & 8 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"version": "0.8.3",
"private": true,
"type": "module",
"engines": {
"node": ">=24",
"npm": ">=11"
},
"scripts": {
"dev": "vite --host",
"qa": "vite --host --mode qa",
Expand Down Expand Up @@ -59,7 +63,7 @@
"@pinia/colada-devtools": "^1.1.2",
"@tsconfig/node22": "^22.0.1",
"@types/lodash": "^4.17.18",
"@types/node": "^22.14.0",
"@types/node": "^24.0.0",
"@vitejs/plugin-vue": "^5.2.3",
"@vitest/coverage-v8": "^3.2.4",
"@vue/eslint-config-prettier": "^10.2.0",
Expand Down
Loading
Loading