Initial commit: backend scaffold, auth, frontend login

- FastAPI + SQLAlchemy async + Alembic + Postgres backend
- Auth: JWT access + rotating refresh tokens, argon2, roles, audit log
- React 19 + Vite frontend: login page, protected route, auth context
- Docker Compose: postgres, redis, migrate, api, worker (placeholder), frontend/nginx

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-22 15:07:15 +03:00
co-authored by Claude Sonnet 5
commit 2664cb8213
71 changed files with 4999 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
import '@/pages/DashboardPage.css'
import { useAuth } from '@/features/auth/useAuth'
const ROLE_LABEL: Record<string, string> = {
admin: 'Администратор',
cashier: 'Кассир',
viewer: 'Наблюдатель',
}
/**
* Временная заглушка. Очередь «получено, чек не пробит» — этап 6 плана,
* пока здесь только подтверждение, что вход и защищённый роут работают.
*/
export function DashboardPage() {
const { user, logout } = useAuth()
return (
<div className="dashboard-shell">
<header className="dashboard-topbar">
<span className="dashboard-brand">lux_fiscal</span>
<div className="dashboard-user">
<span>{user?.full_name}</span>
<span className="dashboard-role">{user ? (ROLE_LABEL[user.role] ?? user.role) : ''}</span>
<button type="button" className="dashboard-logout" onClick={() => void logout()}>
Выйти
</button>
</div>
</header>
<main className="dashboard-body">
<div className="dashboard-placeholder">
<h2>Очередь заказов появится здесь</h2>
<p>
Вход выполнен успешно. Экран «получено, чек не пробит» будет добавлен на следующих
этапах — после интеграций с Новой Поштой и Checkbox.
</p>
</div>
</main>
</div>
)
}