# Verificar versão atual
node --version # Necessário: v18.0.0+
npm --version # Necessário: v8.0.0+
# Download: https://nodejs.org/
# Recomendado: Usar Node.js LTS (v18 ou v20)
# Verificar instalação
git --version
# Download: https://git-scm.com/
# Download: https://code.visualstudio.com/
# Extensões essenciais serão instaladas automaticamente
# Clonar projeto
git clone https://github.com/marcio-gil/mae-conecta.git
cd mae-conecta
# Verificar branch
git branch
# Instalar dependências do projeto principal
npm install
# Instalar dependências do frontend
cd frontend
npm install
cd ..
# Configurar hooks de commit
npm run setup:hooks
# Copiar arquivo de exemplo
cp .env.example .env
# Editar variáveis (usar VS Code ou editor preferido)
code .env
Configurações básicas (.env):
# Aplicação
NODE_ENV=development
PORT=3000
APP_URL=http://localhost:3000
# Base de dados (PostgreSQL)
DATABASE_URL="postgresql://user:password@localhost:5432/mae_conecta_dev"
# Autenticação JWT
JWT_SECRET=sua_chave_super_secreta_aqui
JWT_EXPIRES_IN=7d
# APIs Externas
OPENAI_API_KEY=sk-sua_chave_openai_aqui
GOOGLE_MAPS_API_KEY=sua_chave_google_maps_aqui
# Email (Opcional - para notificações)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=seu_email@gmail.com
SMTP_PASS=sua_senha_de_app
# Analytics (Opcional)
GOOGLE_ANALYTICS_ID=GA_MEASUREMENT_ID
HOTJAR_ID=HOTJAR_SITE_ID
# Desenvolvimento - Frontend apenas
npm run dev
# Ou usar turbo para melhor performance
npm run turbo:dev
# Aplicação estará disponível em:
# http://localhost:3000
cd frontend
# Instalar dependências
npm install
# Verificar configuração do Tailwind
npm run build:css
# Executar testes
npm run test
npm run test # Testes unitários
npm run test:a11y # Testes de acessibilidade
npm run test:e2e # Testes end-to-end
npm run lint # Verificar código
npm run format # Formatar código
npm run analyze # Analisar bundle
npm run lighthouse # Verificar performance
# Subir todos os serviços
docker-compose up -d
# Verificar status
docker-compose ps
# Logs em tempo real
docker-compose logs -f
# Parar serviços
docker-compose down
# docker-compose.yml inclui:
- frontend:3000 # Aplicação Next.js
- backend:4000 # API Node.js + GraphQL
- postgres:5432 # Banco de dados
- redis:6379 # Cache e sessões
- nginx:80 # Proxy reverso
# Executar suite completa de testes
npm run test:all
# Testes unitários
npm run test:unit
# Testes de integração
npm run test:integration
# Testes de acessibilidade
npm run test:a11y
# Testes E2E
npm run test:e2e
# Lighthouse CI
npm run lighthouse
# Bundle analyzer
npm run analyze
# Verificar Core Web Vitals
npm run vitals
# axe-core automated tests
npm run a11y:check
# Verificar contraste de cores
npm run a11y:contrast
# Teste de navegação por teclado
npm run a11y:keyboard
# Encontrar IP da máquina
ipconfig # Windows
ifconfig # macOS/Linux
# Exemplo: Se IP for 192.168.1.100
# Acesse no mobile: http://192.168.1.100:3000
# Limpar cache npm
npm cache clean --force
# Deletar node_modules e reinstalar
rm -rf node_modules package-lock.json
npm install
# Usar versão específica do Node
nvm use 18.17.0 # Se tiver nvm instalado
# Verificar uso de memória
npm run analyze:bundle
# Limpar cache do Next.js
rm -rf .next
# Rebuild completo
npm run clean && npm run build
# Verificar configuração do screen reader
npm run a11y:debug
# Testar com diferentes navegadores
npm run test:cross-browser
{
"recommendations": [
"bradlc.vscode-tailwindcss",
"ms-vscode.vscode-typescript-next",
"esbenp.prettier-vscode",
"ms-playwright.playwright",
"deque-systems.vscode-axe-linter",
"ms-vscode.vscode-speech"
]
}
{
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 80,
"arrowParens": "avoid"
}
{
"extends": [
"next/core-web-vitals",
"@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended"
],
"rules": {
"jsx-a11y/anchor-is-valid": "error",
"jsx-a11y/aria-role": "error",
"jsx-a11y/click-events-have-key-events": "error"
}
}
# Build otimizado
npm run build
# Verificar build
npm run start
# Análise de bundle
npm run analyze
# Instalar Vercel CLI
npm i -g vercel
# Login
vercel login
# Deploy
vercel --prod
# Configurar domínio personalizado
vercel domains add mae-conecta.com.br
# Adicionar ao .env.production
NEXT_PUBLIC_ENVIRONMENT=production
SECURITY_HEADERS=true
CSP_ENABLED=true
RATE_LIMITING=true
git checkout -b feature/nome-da-featurenpm run test:all✨ Pronto! Sua aplicação Mãe Conecta está funcionando e pronta para fazer a diferença na vida das mães brasileiras.
🆘 Problemas? Abra uma issue no GitHub ou consulte nossa documentação detalhada. npm start
### **⚙️ Backend (Node.js) - Em desenvolvimento**
```powershell
cd backend
# Instalar dependências
npm install
# Configurar banco de dados
npm run db:setup
# Executar migrações
npm run db:migrate
# Executar seeds
npm run db:seed
# Iniciar em modo desenvolvimento
npm run dev
# API estará disponível em:
# http://localhost:4000/graphql
cd ai-services
# Criar ambiente virtual
python -m venv venv
# Ativar ambiente virtual
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Instalar dependências
pip install -r requirements.txt
# Executar serviço
python main.py
npm run dev:frontend # Executa frontend em desenvolvimento
npm run build:frontend # Build de produção do frontend
npm run start:frontend # Executa frontend em produção
npm run install:all # Instala todas as dependências
### No diretório frontend:
```bash
npm run dev # Desenvolvimento com hot reload
npm run build # Build otimizado para produção
npm run start # Servidor de produção
npm run lint # Verificação de código
npm run type-check # Verificação de TypeScript
npm run dev no frontendhttp://[SEU-IP]:3000Pressione o botão do microfone e diga:
localhost (não IP)npm install -g vercel
cd frontend
vercel
cd frontend
npm run build
# Upload da pasta 'out' para Netlify
O projeto está otimizado para:
git checkout -b feature/nova-featuregit commit -m 'Adiciona nova feature'git push origin feature/nova-featureDesenvolvido com 💜 para transformar vidas através da tecnologia