Add initial project structure with backend and frontend setup

- Created backend structure with Go, including main application logic and API endpoints.
- Added Docker support for both development and production environments.
- Introduced frontend using Nuxt 3 with Tailwind CSS for styling.
- Included configuration files for Docker and environment variables.
- Established basic documentation for contributing, development, and deployment processes.
- Set up .gitignore and .dockerignore files to manage ignored files in the repository.
This commit is contained in:
2026-02-24 22:27:05 +03:00
commit 605a31567e
97 changed files with 18350 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
export default defineNuxtRouteMiddleware(async () => {
const api = useMapApi()
try {
const me = await api.me()
if (!me.auths?.includes('admin')) {
return navigateTo('/profile')
}
} catch {
return navigateTo('/login')
}
})

View File

@@ -0,0 +1,14 @@
export default defineNuxtRouteMiddleware(async (to) => {
const { isLoginPath, isSetupPath } = useAppPaths()
if (isLoginPath(to.path)) return
if (isSetupPath(to.path)) return
const api = useMapApi()
try {
await api.me()
} catch {
const { setupRequired } = await api.setupRequired()
if (setupRequired) return navigateTo('/setup')
return navigateTo('/login')
}
})