- Add JWT auth guard with Bearer token and cookie support - Update .env.example files with PASSWORD_PEPPER documentation - Update seeder to use PASSWORD_PEPPER for password hashing - Update seeder README with hash verification examples - Fix frontend auth and page components - Update backend JWT service and seed migration |
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| contexts | ||
| hooks | ||
| i18n | ||
| lib | ||
| README.md | ||
Frontend Source
Código fonte do frontend Next.js.
📁 Estrutura
| Diretório | Descrição |
|---|---|
app/ |
App Router - páginas e layouts |
components/ |
Componentes React reutilizáveis |
contexts/ |
React Contexts (Auth, Theme) |
hooks/ |
Custom hooks |
lib/ |
Utilitários e configurações |
🔑 Contextos
AuthContext.tsx
Gerencia autenticação global:
- Estado do usuário logado
- Funções de login/logout
- Token JWT em localStorage
🪝 Hooks
| Hook | Descrição |
|---|---|
useAuth |
Acesso ao contexto de autenticação |
useProfile |
Gerenciamento de perfil de usuário |
📦 Lib
| Arquivo | Descrição |
|---|---|
utils.ts |
Funções helper (cn, formatDate) |
api.ts |
Cliente HTTP para backend |