Compare commits

...

3 Commits

Author SHA1 Message Date
beo3000 06722b4667 deploy 2026-02-21 13:30:53 +01:00
beo3000 27880646cc fix sync in local test env 2026-02-21 13:17:07 +01:00
beo3000 bf3db803ac added manifest 2026-02-21 13:11:22 +01:00
15 changed files with 4658 additions and 8 deletions

View File

@ -14,7 +14,9 @@
"Bash(az webapp config appsettings list:*)",
"Bash(node:*)",
"Bash(python3:*)",
"Bash(echo:*)"
"Bash(echo:*)",
"Bash(git -C ka-note check-ignore .env)",
"Bash(git -C . check-ignore ka-note/.env)"
]
}
}

View File

@ -1,6 +1,9 @@
AZURE_CLIENT_ID=<app-registration-client-id>
AZURE_TENANT_ID=<azure-ad-tenant-id>
# Set to true for local dev to skip JWT verification (never use in production)
# DEV_AUTH_BYPASS=true
# Client needs VITE_ prefix — create client/.env with:
# VITE_AZURE_CLIENT_ID=<same as above>
# VITE_AZURE_TENANT_ID=<same as above>

View File

@ -1 +1 @@
1.0.7
1.0.8

View File

@ -34,6 +34,7 @@
"svelte": "^5.19.0",
"tailwindcss": "^3.4.17",
"typescript": "^5.7.3",
"vite": "^6.1.0"
"vite": "^6.1.0",
"vite-plugin-pwa": "^1.2.0"
}
}

View File

@ -4,6 +4,9 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
<link rel="manifest" href="/manifest.webmanifest" />
<link rel="apple-touch-icon" href="%sveltekit.assets%/icon-192.png" />
<meta name="theme-color" content="#3a3a3a" />
<title>Ka-Note</title>
%sveltekit.head%
</head>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,32 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
<!-- Dark background -->
<rect width="512" height="512" fill="#3a3a3a" rx="80"/>
<!-- White circle -->
<circle cx="256" cy="256" r="170" fill="#ffffff"/>
<!-- Open book shape -->
<!-- Book spine (center line) -->
<!-- Left page -->
<path d="M130 195 Q130 185 140 183 L248 183 L248 330 Q200 325 152 335 Q130 338 130 320 Z" fill="#f0ede8"/>
<!-- Right page -->
<path d="M264 183 L372 183 Q382 185 382 195 L382 320 Q382 338 360 335 Q312 325 264 330 Z" fill="#f0ede8"/>
<!-- Book spine shadow -->
<rect x="248" y="183" width="16" height="147" fill="#e0dbd2" rx="2"/>
<!-- Left page: orange/amber checkmark -->
<polyline points="160,255 190,285 230,220" fill="none" stroke="#f59e0b" stroke-width="16" stroke-linecap="round" stroke-linejoin="round"/>
<!-- Right page: teal horizontal lines -->
<line x1="280" y1="220" x2="360" y2="220" stroke="#0d9488" stroke-width="8" stroke-linecap="round"/>
<line x1="280" y1="245" x2="355" y2="245" stroke="#0d9488" stroke-width="8" stroke-linecap="round"/>
<line x1="280" y1="270" x2="350" y2="270" stroke="#0d9488" stroke-width="8" stroke-linecap="round"/>
<line x1="280" y1="295" x2="345" y2="295" stroke="#0d9488" stroke-width="8" stroke-linecap="round"/>
<!-- Right page: teal clock icon (top-right corner of right page) -->
<!-- Clock circle -->
<circle cx="358" cy="200" r="18" fill="none" stroke="#0d9488" stroke-width="5"/>
<!-- Clock hands -->
<line x1="358" y1="200" x2="358" y2="191" stroke="#0d9488" stroke-width="4" stroke-linecap="round"/>
<line x1="358" y1="200" x2="365" y2="204" stroke="#0d9488" stroke-width="4" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,8 +1,33 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
plugins: [sveltekit()],
plugins: [
sveltekit(),
VitePWA({
registerType: 'autoUpdate',
manifest: {
name: 'Ka-Note',
short_name: 'Ka-Note',
description: 'Local-first meeting and topic management',
start_url: '/',
display: 'standalone',
background_color: '#3a3a3a',
theme_color: '#3a3a3a',
icons: [
{ src: '/icon-192.png', sizes: '192x192', type: 'image/png' },
{ src: '/icon-512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable' }
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,svg,png,woff2}']
},
devOptions: {
enabled: true
}
})
],
server: {
proxy: {
'/api': 'http://localhost:3001'

4578
ka-note/package-lock.json generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@ -4,7 +4,7 @@
"private": true,
"type": "module",
"scripts": {
"dev": "node --watch --import tsx/esm src/index.ts",
"dev": "node --env-file=../.env --watch --import tsx/esm src/index.ts",
"build": "tsc",
"start": "node dist/index.js",
"db:generate": "drizzle-kit generate",

View File

@ -13,14 +13,22 @@ export type AuthEnv = {
const clientId = process.env.AZURE_CLIENT_ID ?? '';
const tenantId = process.env.AZURE_TENANT_ID ?? '';
const devBypass = process.env.DEV_AUTH_BYPASS === 'true';
const jwksUrl = `https://login.microsoftonline.com/${tenantId}/discovery/v2.0/keys`;
const issuerV2 = `https://login.microsoftonline.com/${tenantId}/v2.0`;
const issuerV1 = `https://sts.windows.net/${tenantId}/`;
const JWKS = createRemoteJWKSet(new URL(jwksUrl));
const JWKS = devBypass ? null : createRemoteJWKSet(new URL(jwksUrl));
export const authMiddleware = createMiddleware<AuthEnv>(async (c, next) => {
if (devBypass) {
console.warn('[auth] DEV_AUTH_BYPASS active — skipping JWT verification');
c.set('auth', { userId: 'dev-user', name: 'Dev User', email: 'dev@localhost' });
await next();
return;
}
const authHeader = c.req.header('Authorization');
if (!authHeader?.startsWith('Bearer ')) {
return c.json({ error: 'Missing or invalid Authorization header' }, 401);
@ -28,7 +36,7 @@ export const authMiddleware = createMiddleware<AuthEnv>(async (c, next) => {
const token = authHeader.slice(7);
try {
const { payload } = await jwtVerify(token, JWKS, {
const { payload } = await jwtVerify(token, JWKS!, {
issuer: [issuerV2, issuerV1],
audience: `api://${clientId}`,
});

BIN
vorlagen/ka-note_logo1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 KiB