145 lines
3.4 KiB
Markdown
145 lines
3.4 KiB
Markdown
# Frontend - GoHorse Jobs
|
|
|
|
[](https://nextjs.org/)
|
|
[](https://tailwindcss.com/)
|
|
[](https://typescriptlang.org/)
|
|
|
|
Frontend da plataforma GoHorse Jobs construído com **Next.js 15** e **App Router**.
|
|
|
|
---
|
|
|
|
## 🏗️ Arquitetura
|
|
|
|
```
|
|
src/
|
|
├── app/ # App Router (Páginas)
|
|
│ ├── dashboard/ # Área logada
|
|
│ │ ├── admin/ # Painel SuperAdmin
|
|
│ │ ├── empresa/ # Painel Empresa
|
|
│ │ └── candidato/ # Painel Candidato
|
|
│ ├── login/ # Autenticação
|
|
│ ├── vagas/ # Listagem pública
|
|
│ └── layout.tsx # Layout raiz
|
|
│
|
|
├── components/ # Componentes React
|
|
│ ├── ui/ # shadcn/ui primitives
|
|
│ ├── forms/ # Formulários reutilizáveis
|
|
│ └── (feature)/ # Componentes por feature
|
|
│
|
|
├── contexts/ # React Contexts
|
|
│ └── AuthContext.tsx # Autenticação global
|
|
│
|
|
├── hooks/ # Custom Hooks
|
|
│ ├── useAuth.ts # Hook de autenticação
|
|
│ └── useProfile.ts # Hook de perfil
|
|
│
|
|
└── lib/ # Utilitários
|
|
├── api.ts # Cliente HTTP
|
|
└── utils.ts # Helpers gerais
|
|
```
|
|
|
|
---
|
|
|
|
## 🎨 Design System
|
|
|
|
### Tecnologias
|
|
|
|
| Tecnologia | Uso |
|
|
|------------|-----|
|
|
| **shadcn/ui** | Componentes base (Radix UI) |
|
|
| **Tailwind CSS 4** | Estilização utility-first |
|
|
| **Lucide Icons** | Ícones |
|
|
| **Framer Motion** | Animações |
|
|
|
|
### Tema
|
|
|
|
O tema está definido em `src/app/globals.css` usando CSS variables com cores `oklch()`:
|
|
|
|
- **Primary**: Laranja (`oklch(0.68 0.22 45)`)
|
|
- **Background**: Light/Dark mode automático
|
|
- **Componentes**: Herdam do design system
|
|
|
|
---
|
|
|
|
## 📱 Páginas Principais
|
|
|
|
| Rota | Descrição | Acesso |
|
|
|------|-----------|--------|
|
|
| `/` | Landing page | Público |
|
|
| `/jobs` | Listagem de vagas | Público |
|
|
| `/login` | Autenticação | Público |
|
|
| `/dashboard/admin` | Painel admin | SuperAdmin |
|
|
| `/dashboard/empresa` | Painel empresa | CompanyAdmin, Recruiter |
|
|
| `/dashboard/candidato` | Painel candidato | JobSeeker |
|
|
|
|
---
|
|
|
|
## 🚀 Desenvolvimento
|
|
|
|
### Instalar dependências
|
|
|
|
```bash
|
|
npm install
|
|
```
|
|
|
|
### Executar em desenvolvimento
|
|
|
|
```bash
|
|
npm run dev
|
|
```
|
|
|
|
### Build de produção
|
|
|
|
```bash
|
|
npm run build
|
|
npm run start
|
|
```
|
|
|
|
### Linting
|
|
|
|
```bash
|
|
npm run lint
|
|
```
|
|
|
|
---
|
|
|
|
## 🐳 Docker
|
|
|
|
```bash
|
|
# Build
|
|
docker build -t gohorse-frontend .
|
|
|
|
# Run
|
|
docker run -p 3000:3000 gohorse-frontend
|
|
```
|
|
|
|
**Nota**: Requer `output: "standalone"` no `next.config.ts` (já configurado).
|
|
|
|
---
|
|
|
|
## 📁 Componentes Principais
|
|
|
|
| Componente | Descrição |
|
|
|------------|-----------|
|
|
| `components/ui/*` | Primitivos shadcn/ui |
|
|
| `components/dashboard-*` | Componentes do dashboard |
|
|
| `components/job-*` | Componentes de vagas |
|
|
| `components/sidebar.tsx` | Navegação lateral |
|
|
|
|
---
|
|
|
|
## 🔧 Configuração
|
|
|
|
### Variáveis de Ambiente
|
|
|
|
```env
|
|
NEXT_PUBLIC_API_URL=http://localhost:8080
|
|
```
|
|
|
|
### TypeScript
|
|
|
|
Configurado com strict mode em `tsconfig.json`.
|
|
|
|
### ESLint
|
|
|
|
Configurado com `next/core-web-vitals` e `next/typescript`.
|