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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
target/
web/node_modules
web/dist
webnext/node_modules
webnext/dist
.volumes/
.github/
docs/
8 changes: 4 additions & 4 deletions .github/workflows/lint-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ jobs:
with:
node-version: 24
- name: install deps
working-directory: ./webnext
working-directory: ./web
run: |
npm i -g pnpm
pnpm i --frozen-lockfile
- name: Build translations
working-directory: ./webnext
working-directory: ./web
run: pnpm dlx @inlang/paraglide-js compile --project ./project.inlang --outdir ./src/paraglide
- name: Lint
working-directory: ./webnext
working-directory: ./web
run: pnpm lint
- name: Audit
working-directory: ./webnext
working-directory: ./web
run: pnpm audit --prod
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ jobs:
with:
node-version: 24
cache: "pnpm"
cache-dependency-path: ./webnext/pnpm-lock.yaml
cache-dependency-path: ./web/pnpm-lock.yaml

- name: Install frontend dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
working-directory: webnext
working-directory: web

- name: Build frontend
run: pnpm build
working-directory: webnext
working-directory: web

- name: Build release binary
uses: actions-rs/cargo@v1
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
[submodule "web/src/shared/defguard-ui"]
path = web/src/shared/defguard-ui
url = git@github.com:DefGuard/ui.git
[submodule "webnext/src/shared/defguard-ui"]
path = webnext/src/shared/defguard-ui
url = git@github.com:DefGuard/ui.git
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM node:24-alpine AS web

WORKDIR /app
COPY webnext/package.json webnext/pnpm-lock.yaml ./
COPY web/package.json web/pnpm-lock.yaml ./
RUN npm i -g pnpm
RUN pnpm install --ignore-scripts --frozen-lockfile
COPY webnext/ .
COPY web/ .
RUN pnpm build

FROM rust:1 AS chef
Expand All @@ -28,7 +28,7 @@ COPY --from=planner /build/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json

# build project
COPY --from=web /app/dist ./webnext/dist
COPY --from=web /app/dist ./web/dist
RUN apt-get update && apt-get -y install protobuf-compiler libprotobuf-dev
COPY Cargo.toml Cargo.lock build.rs ./
# for vergen
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cargo run
To run webapp dev server:

```bash
cd webnext/
cd web/
pnpm install
pnpm run dev
```
Expand Down
2 changes: 1 addition & 1 deletion src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub async fn index() -> impl IntoResponse {
}

#[derive(Embed)]
#[folder = "webnext/"]
#[folder = "web/"]
#[include = "dist/*"]
struct WebAsset;

Expand Down
19 changes: 1 addition & 18 deletions web/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,5 @@ insert_final_newline = true
indent_style = space
indent_size = 2

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

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

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

[*.{json,yaml}]
indent_style = space
indent_size = 2
rulers = 80
2 changes: 2 additions & 0 deletions web/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VITE_UPDATE_BASE_URL="/update/api"
UPDATE_TARGET_URL=""
File renamed without changes.
5 changes: 3 additions & 2 deletions web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ pnpm-debug.log*
lerna-debug.log*

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

# Editor directories and files
.vscode/*
Expand All @@ -24,3 +24,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.tanstack
1 change: 0 additions & 1 deletion web/.npmrc

This file was deleted.

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

This file was deleted.

2 changes: 2 additions & 0 deletions web/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/src/i18n/*.ts
/src/i18n/*.tsx
/src/**/*.tsx
/src/**/*.ts
3 changes: 2 additions & 1 deletion web/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"tabWidth": 2,
"singleQuote": true,
"useTabs": false,
"printWidth": 90
"printWidth": 90,
"endOfLine": "lf"
}
File renamed without changes.
4 changes: 0 additions & 4 deletions web/.typesafe-i18n.json

This file was deleted.

File renamed without changes.
22 changes: 0 additions & 22 deletions web/README.md

This file was deleted.

63 changes: 13 additions & 50 deletions web/biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.2/schema.json",
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
Expand All @@ -9,90 +9,53 @@
"ignoreUnknown": false,
"includes": [
"src/**",
"!src/i18n/*.ts",
"!src/i18n/*.tsx",
"!src/i18n/i18n-util",
"!dist"
"!src/messages",
"!src/paraglide/**/*.js",
"!src/routeTree.gen.ts"
]
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 90,
"attributePosition": "auto",
"bracketSameLine": false,
"bracketSpacing": true,
"expand": "auto",
"useEditorconfig": true,
"includes": ["./src/**"]
"lineEnding": "lf",
"lineWidth": 90,
"indentStyle": "space",
"useEditorconfig": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": "off",
"complexity": {
"noBannedTypes": "error",
"noUselessTypeConstraint": "error"
},
"correctness": {
"noChildrenProp": "error",
"noPrecisionLoss": "error",
"noUnusedVariables": "error",
"useExhaustiveDependencies": "error",
"useHookAtTopLevel": "error",
"useJsxKeyInIterable": "error",
"useUniqueElementIds": "off"
},
"security": {
"noDangerouslySetInnerHtmlWithChildren": "error"
},
"style": {
"noNamespace": "error",
"noNonNullAssertion": "error",
"useArrayLiterals": "error",
"useAsConstAssertion": "error",
"useBlockStatements": "off",
"useLiteralEnumMembers": "off"
"useLiteralEnumMembers": "off",
"useBlockStatements": "off"
},
"suspicious": {
"noCommentText": "error",
"noDuplicateJsxProps": "error",
"noExplicitAny": "error",
"noExtraNonNullAssertion": "error",
"noMisleadingInstantiator": "error",
"noUnsafeDeclarationMerging": "error",
"noArrayIndexKey": "off"
}
},
"includes": ["src/**"]
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto",
"bracketSameLine": false,
"bracketSpacing": true
}
},
"html": {
"formatter": {
"selfCloseVoidElements": "always"
}
},
"overrides": [
{
"includes": ["**/*.js"]
}
],
"assist": {
"enabled": true,
"actions": {
Expand Down
73 changes: 69 additions & 4 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,80 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Enrollment Wizard</title>
<meta name="application-name" content="Defguard VPN Enrollment Portal" />
<title>Defguard Enrollment Service</title>
<meta name="description"
content="Defguard is the enterprise open-source VPN solution built with the highest security standards, inspectability, transparency, and verifiability in mind." />
<meta content="Defguard team" name="author">
<!--Icons-->
<link rel="icon" type="image/ico" href="/src/assets/icons/favicon.ico" />
<link rel="icon" type="image/png" sizes="16x16" href="/src/assets/icons/favicon-16x16.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/src/assets/icons/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="96x96" href="/src/assets/icons/favicon-96x96.png" />
<!--Apple-->
<link rer="apple-touch-icon" href="/src/assets/icons/app/512.png" />
<link rel="apple-touch-icon" sizes="57x57" href="/src/assets/icons/app/57.png" />
<link rel="apple-touch-icon" sizes="60x60" href="/src/assets/icons/app/60.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/src/assets/icons/app/72.png" />
<link rel="apple-touch-icon" sizes="76x76" href="/src/assets/icons/app/76.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/src/assets/icons/app/114.png" />
<link rel="apple-touch-icon" sizes="120x120" href="/src/assets/icons/app/120.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/src/assets/icons/app/144.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/src/assets/icons/app/152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/src/assets/icons/app/180.png" />
<link rel="apple-touch-icon" sizes="256x256" href="/src/assets/icons/app/256.png" />
<link rel="apple-touch-icon" sizes="512x512" href="/src/assets/icons/app/512.png" />
<!-- og -->
<meta content="en_US" property="og:locale">
<meta content="https://defguard.net/" property="og:url">
<meta content="website" property="og:type">
<meta content="https://github.com/DefGuard/defguard.github.io/raw/main/public/images/product/core/hero-image.png"
property="og:image">
<meta content="https://github.com/DefGuard/defguard.github.io/raw/main/public/images/product/core/hero-image.png"
property="og:image:secure_url">
<meta content="image/png" property="og:image:type" />
<meta content="1920" property="og:image:width">
<meta content="1080" property="og:image:height">
<meta content="og:logo" property="/src/assets/icons/apple-icon.png" />
<meta content="og:logo" property="/src/assets/icons/apple-icon-60x60.png" size="60x60" />
<meta content="og:logo" property="/src/assets/icons/apple-icon-120x120.png" size="120x120" />
<meta content="og:logo" property="/src/assets/icons/apple-icon.png" size="192x192" />
<meta property="og:title" content="Defguard Enterprise VPN Enrollment Service" />
<meta property="og:description"
content="Defguard is the enterprise open-source VPN solution built with the highest security standards, inspectability, transparency, and verifiability in mind." />
<meta content="Defguard" property="og:site_name">
<!-- twitter og -->
<meta content="summary_large_image" name="twitter:card">
<meta content="Defguard Enterprise VPN Enrollment Service" name="twitter:title">
<meta
content="Defguard is the enterprise open-source VPN solution built with the highest security standards, inspectability, transparency, and verifiability in mind."
name="twitter:description">
<meta content="@defguard_net" name="twitter:creator">
<meta content="@defguard_net" name="twitter:site">
<meta content="https://defguard.net/" name="twitter:url">
<meta content="https://github.com/DefGuard/defguard.github.io/raw/main/public/images/product/core/hero-image.png"
name="twitter:image">
<!-- JSON-LD structured data -->
<script type=" application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "Defguard Enrollment",
"applicationCategory": "Security",
"operatingSystem": "Web",
"url": "https://defguard.net",
"author": {
"@type": "Organization",
"name": "Defguard"
}
}
</script>
</head>

<body>
<div id="root"></div>
<div id="modals-root"></div>
<div id="toasts-root"></div>
<div id="datepicker-root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

</html>
</html>
Loading