Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
315593c
remove old web
filipslezaklab Oct 14, 2025
93b0bb1
init project
filipslezaklab Oct 14, 2025
c9914fd
Update defguard-ui
filipslezaklab Oct 14, 2025
d6293e9
login layout
filipslezaklab Oct 14, 2025
6a6d6ab
login basic working
filipslezaklab Oct 15, 2025
b40c636
finish styling details tab
filipslezaklab Oct 17, 2025
b2c71f7
change pass modal wip
filipslezaklab Oct 19, 2025
c9311d2
change password modal functional
filipslezaklab Oct 20, 2025
ad6b51c
register totp and email mfa modals
filipslezaklab Oct 20, 2025
1e506ef
fix lint
filipslezaklab Oct 20, 2025
50dcfdb
Update lint-web.yml
filipslezaklab Oct 20, 2025
574e6fc
add webnext workflow deploying staging
filipslezaklab Oct 20, 2025
9ad9ce0
fix dockerfile
filipslezaklab Oct 20, 2025
54cdd5b
deploy staging after webnext build
filipslezaklab Oct 20, 2025
597326c
working totp register with recovery codes modal
filipslezaklab Oct 21, 2025
bccc629
totp and recovery login fixed redirects
filipslezaklab Oct 22, 2025
ee8673e
add email mfa and update auth profile card
filipslezaklab Oct 23, 2025
5447ff2
upgrade packages
filipslezaklab Oct 23, 2025
cc332b9
devices tab test table/grid
filipslezaklab Oct 28, 2025
6fe6040
add device modal update wip
filipslezaklab Oct 30, 2025
c1eb244
fix devices table accessor keys
filipslezaklab Oct 31, 2025
49688f4
update user devices tab
filipslezaklab Nov 2, 2025
eeb7972
add user profile auth keys tab
filipslezaklab Nov 3, 2025
a932c4d
add user api tokens tab
filipslezaklab Nov 4, 2025
296b1f7
users table update wip
filipslezaklab Nov 4, 2025
64a2cac
users page update
filipslezaklab Nov 5, 2025
001b4bd
autodeploy to new env
wojcik91 Nov 5, 2025
91481e2
add missing permission
wojcik91 Nov 5, 2025
902838e
fix job order
wojcik91 Nov 5, 2025
3943108
users list update
filipslezaklab Nov 5, 2025
8dd1907
users list update
filipslezaklab Nov 6, 2025
f68ecd2
add 404 route
filipslezaklab Nov 7, 2025
9f339e4
groups update
filipslezaklab Nov 7, 2025
63323c5
add user modal update
filipslezaklab Nov 7, 2025
afbe476
squash style bugfixes
filipslezaklab Nov 7, 2025
bb6ffec
fix add missing location icon
filipslezaklab Nov 7, 2025
9cbad1d
upgrade web packages
filipslezaklab Nov 7, 2025
4ddb5d3
update users list actions
filipslezaklab Nov 10, 2025
4e41f45
reuse add group modal for edit
filipslezaklab Nov 10, 2025
07efc7f
add side bar nav
filipslezaklab Nov 10, 2025
defbef5
openid client page update
filipslezaklab Nov 11, 2025
a56db18
add webhooks page
filipslezaklab Nov 12, 2025
49a3dc3
tables update
filipslezaklab Nov 12, 2025
011a567
allow nulls in input
filipslezaklab Nov 12, 2025
2bb4a17
table selection update
filipslezaklab Nov 13, 2025
6a72dcc
add openid app consent page
filipslezaklab Nov 13, 2025
2b5444c
add network devices page
filipslezaklab Nov 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/workflows/lint-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
run: |
npm i -g npm pnpm
pnpm i --frozen-lockfile
- name: Build
working-directory: ./web
run: pnpm build
- name: Lint
working-directory: ./web
run: pnpm run lint
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/webnext-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy to webnext environment
permissions:
contents: read
id-token: write
packages: write
on:
push:
branches:
- webnext
paths-ignore:
- "*.md"
- "LICENSE"

jobs:
build-image:
uses: ./.github/workflows/build-docker.yml
with:
tags: |
type=ref,event=branch
type=sha

deploy-webnext:
needs: build-image
runs-on: [self-hosted, Linux, X64]
environment: WEBNEXT
if: ${{ github.event_name != 'pull_request' && github.ref_name == 'webnext' }}
env:
KUBE_HOST: ${{ secrets.KUBE_HOST }}
KUBE_CERTIFICATE: ${{ secrets.KUBE_CERTIFICATE }}
KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }}
steps:
- name: Add SHORT_SHA env variable
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
- name: Deploy new image version
uses: actions-hub/[email protected]
with:
args: --namespace defguard-filip set image deployment/defguard defguard=ghcr.io/defguard/defguard:sha-${{ env.SHORT_SHA }}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = ../proto.git
[submodule "web/src/shared/defguard-ui"]
path = web/src/shared/defguard-ui
url = ../ui.git
url = [email protected]:DefGuard/ui.git
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM public.ecr.aws/docker/library/node:24 AS web

WORKDIR /app
COPY web/package.json web/pnpm-lock.yaml web/.npmrc ./
COPY web/package.json web/pnpm-lock.yaml ./
RUN npm i -g pnpm
RUN pnpm install --ignore-scripts --frozen-lockfile
COPY web/ .
RUN pnpm run generate-translation-types
RUN pnpm build

FROM public.ecr.aws/docker/library/rust:1 AS chef
Expand All @@ -31,7 +30,6 @@ RUN cargo chef cook --release --recipe-path recipe.json

# build project
COPY --from=web /app/dist ./web/dist
COPY web/src/shared/images/svg ./web/src/shared/images/svg
RUN apt-get update && apt-get -y install protobuf-compiler libprotobuf-dev
COPY Cargo.toml Cargo.lock ./
# for vergen
Expand Down
2 changes: 0 additions & 2 deletions web/.biomeignore

This file was deleted.

1 change: 1 addition & 0 deletions web/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
>0.3%, last 2 versions, since 2025, not op_mini all, not dead
20 changes: 1 addition & 19 deletions web/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,5 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.{ts,tsx}]
indent_style = space
indent_size = 2
rulers = 90

[*.{scss}]
indent_style = space
indent_size = 2
rulers = 90

[*.{html}]
indent_style = space
indent_size = 2
[*.{ts,tsx,js,jsx,scss,html,json,yaml}]
rulers = 90

[*.{json,yaml}]
insert_final_newline = true
indent_style = space
indent_size = 2
rulers = 80
36 changes: 36 additions & 0 deletions web/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
* text=auto eol=lf

*.js text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.json text eol=lf
*.html text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.lock text eol=lf

*.woff binary
*.woff2 binary
*.ttf binary
*.otf binary
*.eot binary
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.webp binary
*.avif binary
*.ico binary
*.mp4 binary
*.webm binary
*.ogg binary
*.mp3 binary
*.wav binary
*.pdf binary
*.zip binary
*.tar binary
*.gz binary
31 changes: 29 additions & 2 deletions web/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
*.local*
./*.env
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local
project.inlang/cache
.env.development

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.tanstack
.cfft*
blueprint-templates
1 change: 0 additions & 1 deletion web/.npmrc

This file was deleted.

1 change: 0 additions & 1 deletion web/.nvmrc

This file was deleted.

3 changes: 1 addition & 2 deletions web/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/src/i18n/*.ts
/src/i18n/*.tsx
/src/**/*.tsx
/src/**/*.ts
/src/**/*.js
10 changes: 10 additions & 0 deletions web/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["stylelint-config-standard-scss"],
"plugins": ["stylelint-scss"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"custom-property-empty-line-before": null,
"value-keyword-case": null
}
}
5 changes: 0 additions & 5 deletions web/.typesafe-i18n.json

This file was deleted.

120 changes: 60 additions & 60 deletions web/README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
# Defguard frontend
# React + TypeScript + Vite

React.js based, web user interface for Defguard project.
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

## Run development server
Currently, two official plugins are available:

Install dependencies
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

```bash
pnpm install
```

Start the dev server

```bash
pnpm run dev
```

You can configure API proxy by changing `target` key value under `/api` path within `vite.config.ts` file.

## Build docker image
## React Compiler

```bash
docker build .
```

## Linting

For linting this project uses [prettier](https://www.npmjs.com/package/prettier), [eslint](https://www.npmjs.com/package/eslint) and [stylelint](https://stylelint.io/)
The React Compiler is currently not compatible with SWC. See [this issue](https://github.com/vitejs/vite-plugin-react/issues/428) for tracking the progress.

#### Available commands
## Expanding the ESLint configuration

Check linting in all supported files ( both prettier and eslint )
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```bash
pnpm run lint
```
```js
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...

Fix all autofixable problems with eslint
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,

```bash
pnpm run eslint-fix
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```

Fix all autofixable probles with prettier

```bash
pnpm run prettier-fix
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```

Fix all autofixable problems with pretter and eslint

```bash
pnpm fix-lint
```

#### Adding new SVG components

Move .svg files into `src/shared/images/svg` then use command:

```bash
pnpm parse-svgs
```

This will generate new components within `src/shared/components/svg`, they can be used as a regular components. Also this command doesn't replace or modify already existing files.

## Conventional Commits

Using [commitlint](https://commitlint.js.org/#/) with this [config](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).

## Versioning

Using [standard-version](https://github.com/conventional-changelog/standard-version)
Loading