Initialize Nuxt.js project with Docker deployment setup

- Add core Nuxt.js application structure with TypeScript
- Include Docker configuration and deployment guide
- Set up project scaffolding with pages, composables, and middleware
- Add environment configuration and Git ignore rules
This commit is contained in:
2025-08-06 14:31:16 +02:00
parent 4ccccde3e4
commit 024d0da617
26 changed files with 1860 additions and 0 deletions

17
middleware/auth.ts Normal file
View File

@@ -0,0 +1,17 @@
export default defineNuxtRouteMiddleware((to) => {
// Skip auth for public pages
if (to.meta.auth === false) {
return;
}
// Check if user is authenticated
const authState = useState('auth.state', () => ({
authenticated: false,
user: null,
groups: [],
}));
if (!authState.value.authenticated) {
return navigateTo('/login');
}
});