Initial commit: base slice (auth, roles, users, admin) scaffold

Backend: .NET 10 Clean Architecture + LiteCqrs.Net + EF Core/PostgreSQL +
Identity/JWT. Frontend: React 19 + Vite + TanStack Query/Router + Tailwind v4
with a retro CRT theme. Docker/compose deployment mirroring PnvPanel's
conventions, scoped down to the current base feature set.
This commit is contained in:
Leonid Pershin
2026-07-24 05:40:34 +03:00
commit 8a3eebc48f
156 changed files with 9335 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
import { useEffect } from 'react'
import { cn } from '@/shared/lib/cn'
import { useToastContext } from './toast-store'
export function Toaster() {
const { toasts, dismiss } = useToastContext()
return (
<div className="pointer-events-none fixed bottom-4 right-4 z-[10000] flex flex-col gap-2">
{toasts.map((t) => (
<ToastItem key={t.id} id={t.id} message={t.message} variant={t.variant} onDismiss={dismiss} />
))}
</div>
)
}
function ToastItem({
id,
message,
variant,
onDismiss,
}: {
id: number
message: string
variant: 'default' | 'success' | 'error'
onDismiss: (id: number) => void
}) {
useEffect(() => {
const timeout = setTimeout(() => onDismiss(id), 4000)
return () => clearTimeout(timeout)
}, [id, onDismiss])
return (
<div
className={cn(
'crt-panel pointer-events-auto rounded-md px-4 py-3 text-sm shadow-lg',
variant === 'success' && 'border-primary/60',
variant === 'error' && 'border-red-700/60 text-red-400',
)}
onClick={() => onDismiss(id)}
role="status"
>
{message}
</div>
)
}