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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 42 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion services/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"dependencies": {
"@fastify/cookie": "^11.0.2",
"@fastify/cors": "^11.0.1",
"@lucia-auth/adapter-drizzle": "^1.1.0",
"@node-rs/argon2": "^2.0.2",
"arctic": "^3.7.0",
Expand All @@ -24,7 +25,7 @@
"pg": "^8.16.0",
"pino": "^9.7.0",
"pino-pretty": "^13.0.0",
"zod": "^3.25.36"
"zod": "^3.25.42"
},
"devDependencies": {
"@commitlint/cli": "^19.8.1",
Expand Down
12 changes: 12 additions & 0 deletions services/backend/src/fastify/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
import { FastifyInstance } from 'fastify'
import fastifyFavicon from 'fastify-favicon'
import fastifyCors from '@fastify/cors'

export const registerFastifyPlugins = async (server: FastifyInstance): Promise<void> => {
// Register CORS plugin
await server.register(fastifyCors, {
origin: [
'http://localhost:5173', // Vite dev server
'http://localhost:3000', // Frontend production (if served from same port)
'http://localhost:4173', // Vite preview
],
credentials: true,
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS']
})

// Register favicon plugin
await server.register(fastifyFavicon, {
path: '../shared/public/img',
Expand Down
6 changes: 3 additions & 3 deletions services/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
"@tailwindcss/vite": "^4.1.7",
"@tanstack/vue-table": "^8.21.3",
"@vee-validate/zod": "^4.15.0",
"@vueuse/core": "^13.2.0",
"@vueuse/core": "^13.3.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-vue-next": "^0.511.0",
"pinia": "^3.0.2",
"reka-ui": "^2.2.1",
"reka-ui": "^2.3.0",
"tailwind-merge": "^3.3.0",
"tailwindcss-animate": "^1.0.7",
"vee-validate": "^4.15.0",
"vue": "^3.5.15",
"vue-i18n": "^11.1.4",
"vue-router": "^4.5.1",
"zod": "^3.25.28"
"zod": "^3.25.42"
},
"devDependencies": {
"@commitlint/cli": "^19.8.1",
Expand Down
13 changes: 13 additions & 0 deletions services/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,18 @@
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { RouterView } from 'vue-router'
import { useDatabaseStore } from '@/stores/database'

const databaseStore = useDatabaseStore()

// Initialize database status check on app startup
onMounted(async () => {
try {
await databaseStore.checkDatabaseStatus(true)
} catch (error) {
console.warn('Failed to check database status on app startup:', error)
}
})
</script>
20 changes: 20 additions & 0 deletions services/frontend/src/components/ui/alert/Alert.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { type AlertVariants, alertVariants } from '.'

const props = defineProps<{
class?: HTMLAttributes['class']
variant?: AlertVariants['variant']
}>()
</script>

<template>
<div
data-slot="alert"
:class="cn(alertVariants({ variant }), props.class)"
role="alert"
>
<slot />
</div>
</template>
17 changes: 17 additions & 0 deletions services/frontend/src/components/ui/alert/AlertDescription.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'

const props = defineProps<{
class?: HTMLAttributes['class']
}>()
</script>

<template>
<div
data-slot="alert-description"
:class="cn('text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed', props.class)"
>
<slot />
</div>
</template>
17 changes: 17 additions & 0 deletions services/frontend/src/components/ui/alert/AlertTitle.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'

const props = defineProps<{
class?: HTMLAttributes['class']
}>()
</script>

<template>
<div
data-slot="alert-title"
:class="cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', props.class)"
>
<slot />
</div>
</template>
23 changes: 23 additions & 0 deletions services/frontend/src/components/ui/alert/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { cva, type VariantProps } from 'class-variance-authority'

export { default as Alert } from './Alert.vue'
export { default as AlertDescription } from './AlertDescription.vue'
export { default as AlertTitle } from './AlertTitle.vue'

export const alertVariants = cva(
'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',
{
variants: {
variant: {
default: 'bg-card text-card-foreground',
destructive:
'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90',
},
},
defaultVariants: {
variant: 'default',
},
},
)

export type AlertVariants = VariantProps<typeof alertVariants>
18 changes: 18 additions & 0 deletions services/frontend/src/components/ui/select/Select.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script setup lang="ts">
import type { SelectRootEmits, SelectRootProps } from 'reka-ui'
import { SelectRoot, useForwardPropsEmits } from 'reka-ui'

const props = defineProps<SelectRootProps>()
const emits = defineEmits<SelectRootEmits>()

const forwarded = useForwardPropsEmits(props, emits)
</script>

<template>
<SelectRoot
data-slot="select"
v-bind="forwarded"
>
<slot />
</SelectRoot>
</template>
52 changes: 52 additions & 0 deletions services/frontend/src/components/ui/select/SelectContent.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { reactiveOmit } from '@vueuse/core'
import {
SelectContent,
type SelectContentEmits,
type SelectContentProps,
SelectPortal,
SelectViewport,
useForwardPropsEmits,
} from 'reka-ui'
import { cn } from '@/lib/utils'
import { SelectScrollDownButton, SelectScrollUpButton } from '.'

defineOptions({
inheritAttrs: false,
})

const props = withDefaults(
defineProps<SelectContentProps & { class?: HTMLAttributes['class'] }>(),
{
position: 'popper',
},
)
const emits = defineEmits<SelectContentEmits>()

const delegatedProps = reactiveOmit(props, 'class')

const forwarded = useForwardPropsEmits(delegatedProps, emits)
</script>

<template>
<SelectPortal>
<SelectContent
data-slot="select-content"
v-bind="{ ...forwarded, ...$attrs }"
:class="cn(
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md',
position === 'popper'
&& 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
props.class,
)
"
>
<SelectScrollUpButton />
<SelectViewport :class="cn('p-1', position === 'popper' && 'h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1')">
<slot />
</SelectViewport>
<SelectScrollDownButton />
</SelectContent>
</SelectPortal>
</template>
14 changes: 14 additions & 0 deletions services/frontend/src/components/ui/select/SelectGroup.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script setup lang="ts">
import { SelectGroup, type SelectGroupProps } from 'reka-ui'

const props = defineProps<SelectGroupProps>()
</script>

<template>
<SelectGroup
data-slot="select-group"
v-bind="props"
>
<slot />
</SelectGroup>
</template>
Loading
Loading