Stack Tecnológico
Visão Geral das Tecnologias
O Acesso ao Emprego utiliza um stack moderno e comprovado, escolhido para garantir escalabilidade, manutenibilidade e performance.
Frontend Technologies
Core Framework
React 19 + TypeScript
{
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"typescript": "~5.7.2"
}
}
Justificativa:
- Componentes reutilizáveis
- Virtual DOM para performance
- Grande ecossistema
- TypeScript para type safety
Vite
// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import svgr from 'vite-plugin-svgr'
export default defineConfig({
plugins: [react(), svgr()],
resolve: {
alias: {
'@': '/src'
}
}
})
Features Utilizadas:
- Hot Module Replacement (HMR)
- Build otimizado
- Suporte nativo para TypeScript
- Plugin para SVG como componentes React
UI Framework
Material-UI v6
// Principais componentes MUI utilizados
{
"@mui/material": "^6.4.11",
"@mui/icons-material": "^6.4.8",
"@mui/x-data-grid": "^7.28.3",
"@mui/x-date-pickers": "^7.28.2",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0"
}
State Management
Zustand
// Store configuration
import { create } from 'zustand'
interface AuthStore {
user: User | null
isAuthenticated: boolean
login: (user: User) => void
logout: () => void
}
const useAuthStore = create<AuthStore>((set) => ({
user: null,
isAuthenticated: false,
login: (user) => set({ user, isAuthenticated: true }),
logout: () => set({ user: null, isAuthenticated: false })
}))
TanStack Query (React Query)
// API configuration
import { QueryClient } from '@tanstack/react-query'
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 5 * 60 * 1000, // 5 minutes
retry: 3,
refetchOnWindowFocus: false
}
}
})
Form Management
React Hook Form + Zod
{
"react-hook-form": "^7.55.0",
"@hookform/resolvers": "^5.0.1",
"zod": "^3.24.2"
}
Rich Text Editor
TipTap
{
"@tiptap/react": "^2.11.7",
"@tiptap/starter-kit": "^2.11.7",
"@tiptap/extension-highlight": "^2.11.7",
"@tiptap/extension-link": "^2.11.7",
"@tiptap/extension-placeholder": "^2.11.7",
"@tiptap/extension-text-align": "^2.11.7",
"@tiptap/extension-underline": "^2.11.7"
}
Outras Bibliotecas Frontend
| Biblioteca | Uso | Versão |
|---|---|---|
| axios | HTTP client | ^1.8.4 |
| react-router-dom | Routing | ^7.3.0 |
| dayjs | Date manipulation | ^1.11.13 |
| jspdf | PDF generation | ^3.0.1 |
| recharts | Charts | ^2.15.3 |
| react-easy-crop | Image cropping | ^5.4.1 |
| react-multi-carousel | Carousel component | ^2.8.6 |
Backend Technologies
Django Ecosystem
Core Framework
# requirements.txt principais
Django==5.1.7
djangorestframework==3.15.2
django-cors-headers==4.7.0
django-filter==25.1
drf-spectacular==0.28.0
Arquitetura:
- Domain-Driven Design (DDD)
- Clean Architecture
- RESTful APIs
Autenticação e Autorização
# JWT Authentication
djangorestframework_simplejwt==5.5.0
djangorestframework-api-key==2.*
django-rest-passwordreset==1.5.0
Task Queue e Workers
# Celery configuration
celery==5.4.0
django-celery-beat==2.7.0
django-celery-results==2.5.1
redis==5.2.1
Uso de Celery para:
- Processamento assíncrono
- Tarefas agendadas
- Envio de emails
- Processamento de dados
Servidor WSGI
gunicorn==20.1.0
Python ML/AI Libraries
Processamento de Linguagem Natural
nltk==3.8.1 # Natural Language Toolkit
gensim # Topic modeling
networkx # Graph analysis
Fuzzy Logic
scikit-fuzzy # Fuzzy logic toolkit
Data Processing
pandas # Via geobr dependency
bs4 # BeautifulSoup for web scraping
Database Technologies
PostgreSQL 14
# docker-compose.yml
postgres:
image: postgres:14-alpine
environment:
POSTGRES_DB: portal_talentos
POSTGRES_USER: admin
POSTGRES_PASSWORD: ${DB_PASSWORD}
Features Utilizadas:
- JSON fields
- Full-text search
- Indexes otimizados
- Migrations com Django
Redis 7.2
redis:
image: redis:7.2-alpine
ports:
- 6379:6379
Uso do Redis:
- Cache de sessões
- Cache de queries
- Message broker para Celery
- Rate limiting
DevOps & Infrastructure
Containerization
Docker
# Backend Dockerfile
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["gunicorn", "app.wsgi:application", "--bind", "0.0.0.0:8080"]
Docker Compose Services
services:
- postgres # Database
- redis # Cache & Queue
- backend # Django API
- worker # Celery Worker
- beat # Celery Beat Scheduler
- nginx # Reverse Proxy (production)
Web Server
Nginx (Production)
server {
listen 80;
server_name portal-talentos.gov.br;
location / {
proxy_pass http://frontend:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /api {
proxy_pass http://backend:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Development Tools
Code Quality - Frontend
ESLint + Prettier
// eslint.config.js
{
"extends": [
"@eslint/js",
"eslint-plugin-react-hooks",
"eslint-config-prettier"
],
"plugins": [
"prettier",
"react-refresh"
]
}
Testing Stack
Backend Testing
# Testing libraries
pytest==8.3.5
coverage==7.7.0
Faker==37.0.2
django-seed==0.3.1
Testing Strategy
| Type | Tool | Coverage Target |
|---|---|---|
| Unit | Pytest | 80% |
| Integration | Django Test Client | 70% |
| API | DRF Test Client | Critical endpoints |
| Frontend | Jest (planned) | Components |
Database Tools
# Database utilities
psycopg2-binary==2.9.10 # PostgreSQL adapter
django-redis==5.4.0 # Redis cache backend
API Documentation
DRF Spectacular
# Automatic OpenAPI 3.0 schema generation
drf-spectacular==0.28.0
Features:
- Swagger UI
- ReDoc documentation
- OpenAPI 3.0 schema
- Automatic endpoint discovery
Security Tools
Application Security
# Security dependencies
PyJWT==2.9.0 # JWT tokens
django-cors-headers==4.7.0 # CORS handling
pillow==11.1.0 # Image processing (security patches)
Environment Management
environs==14.1.1 # Environment variables
python-dotenv==1.0.1 # .env file support
Monitoring & Logging
Logging
- Django built-in logging
- Structured logs em JSON
- Log levels: DEBUG, INFO, WARNING, ERROR, CRITICAL
Performance Monitoring
- Django Debug Toolbar (development)
- Database query optimization
- Redis cache monitoring
Bibliotecas Auxiliares
Utilities
# Várias utilidades
inflection==0.5.1 # String inflection
python-dateutil==2.9.0 # Date utilities
toposort==1.10 # Topological sorting
marshmallow==3.26.1 # Object serialization
PyYAML==6.0.2 # YAML support
Geolocalização
geobr # Brazilian geographic data
Ambientes
Development
- Hot reload para frontend (Vite)
- Django development server
- SQLite ou PostgreSQL local
- Redis local
Staging
- Docker Compose
- PostgreSQL container
- Redis container
- Nginx proxy
Production (Planejado)
- Kubernetes ou ECS
- RDS PostgreSQL
- ElastiCache Redis
- CloudFront CDN
- S3 para arquivos estáticos
Stack Atual
Esta documentação reflete o stack tecnológico atual do projeto Acesso ao Emprego, baseado na análise dos arquivos package.json, requirements.txt e docker-compose.yml.