-
Notifications
You must be signed in to change notification settings - Fork 80
Configuração pronta para deploy #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Marcelo-Rosas
wants to merge
33
commits into
thaleslaray:main
Choose a base branch
from
Marcelo-Rosas:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
fc32170
Add Vercel Web Analytics to Next.js
vercel[bot] 7ddd2d1
Merge pull request #1 from Marcelo-Rosas/vercel/vercel-web-analytics-…
Marcelo-Rosas 8fe9303
Fix React Server Components CVE vulnerabilities
vercel[bot] 5412a89
Merge pull request #2 from Marcelo-Rosas/vercel/react-server-componen…
Marcelo-Rosas 48acb2e
Fix Meta limits fetch parameters
Marcelo-Rosas 1c9fea6
Merge pull request #3 from Marcelo-Rosas/codex/corrigir-problema-de-c…
Marcelo-Rosas 653524c
Configuração pronta para deploy
Marcelo-Rosas 476cd55
feat: Add WhatsApp testing and migration scripts, and update environm…
Marcelo-Rosas 52c496d
feat: Add Docker Compose configurations for production and debug envi…
Marcelo-Rosas 47fd700
feat: add whatsapp diagnostic script
Marcelo-Rosas 6da9a70
fix: sync package-lock with package.json
Marcelo-Rosas ca0c85c
chore(lint): align typescript-eslint and pin typescript for eslint co…
Marcelo-Rosas 6cc2874
chore(lint): garantir lint estável para Next 16
Marcelo-Rosas e58121d
chore: atualizar dependências
Marcelo-Rosas 2878912
fix: align AI SDK versions; setup ESLint flat config; lint fixes; add…
Marcelo-Rosas 808115b
refactor: optimize post-completion window check and sidebar skeleton …
Marcelo-Rosas f7d5570
fix(realtime): make pollCount single source of truth; remove ref; als…
Marcelo-Rosas 503e36d
merge: resolve package conflicts with remote
Marcelo-Rosas eb1eeff
fix(vercel): add missing @vercel/analytics; remove deprecated config
Marcelo-Rosas 97c0713
feat: add Supabase Auth password reset flow
Marcelo-Rosas 25f4b22
fix: improve auth callback to always redirect to reset-password
Marcelo-Rosas 0a29fe6
Update test.yml
Marcelo-Rosas 5af40f4
minhas alterações
Marcelo-Rosas bb77584
Update .env.example
Marcelo-Rosas 8349680
Update .env.example
Marcelo-Rosas e35175d
Update .env.example
Marcelo-Rosas 1cae3b0
Update .env.example
Marcelo-Rosas 1dfbe7e
Update .env.example
Marcelo-Rosas 1d59b9f
Update .env.example
Marcelo-Rosas 5f1ec3e
Update .env.example
Marcelo-Rosas 5f1f4f2
Update .env.example
Marcelo-Rosas 1854c93
Update .env.example
Marcelo-Rosas f4ca7f0
Update .env.example
Marcelo-Rosas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1,34 @@ | ||
| # =========================================== | ||
| # SmartZap - Next.js + Upstash Workflow v2.0 | ||
| # =========================================== | ||
|
|
||
| # ----- SECURITY (Required for Production) ----- | ||
| # Generate with: openssl rand -base64 32 | ||
| # API Key for general API access | ||
| SMARTZAP_API_KEY=szap_your_generated_api_key_here | ||
|
|
||
| # Admin Key for sensitive operations (database, redeploy) | ||
| SMARTZAP_ADMIN_KEY=szap_admin_your_admin_key_here | ||
|
|
||
| # Allowed frontend origin for CORS (defaults to Vercel URL) | ||
| FRONTEND_URL=https://your-app.vercel.app | ||
|
|
||
| # ----- UPSTASH (Required for Production) ----- | ||
| # Get these from: https://console.upstash.com | ||
| UPSTASH_REDIS_REST_URL=https://xxx.upstash.io | ||
| UPSTASH_REDIS_REST_TOKEN=xxx | ||
|
|
||
| # QStash is required for Upstash Workflow | ||
| # Get from: https://console.upstash.com/qstash | ||
| QSTASH_TOKEN=xxx | ||
| QSTASH_CURRENT_SIGNING_KEY=xxx | ||
| QSTASH_NEXT_SIGNING_KEY=xxx | ||
|
|
||
| # ----- WHATSAPP API ----- | ||
| # From Meta Business Settings: https://business.facebook.com | ||
| WHATSAPP_TOKEN=your_access_token | ||
| WHATSAPP_PHONE_ID=your_phone_number_id | ||
| WHATSAPP_BUSINESS_ACCOUNT_ID=your_business_account_id | ||
| WHATSAPP_VERIFY_TOKEN=my_verify_token | ||
|
|
||
| # ----- AI (Optional) ----- | ||
| # For AI-generated templates | ||
| GEMINI_API_KEY=your_gemini_api_key | ||
|
|
||
| # ----- DATABASE ----- | ||
| # Choose your database provider: 'turso' or 'supabase' | ||
| # ------------------------------------------------------------ | ||
| # 🔐 SEGURANÇA / ADMIN (Recomendado) | ||
| # ------------------------------------------------------------ | ||
|
|
||
| # Senha do painel (login). É a "senha mestra" do SmartZap. | ||
| # - Local: defina aqui no .env.local | ||
| # - Vercel: o wizard salva como variável de ambiente | ||
|
|
||
| MASTER_PASSWORD=Vectra@179mr$$$HUB | ||
|
|
||
| AUTH_SECRET=jaVBVCWDNboM0ctLGYlYpGkp3sFD/MukA3ytSaTe3E4= | ||
|
|
||
| SMARTZAP_ADMIN_KEY=Vectra@179mr | ||
|
|
||
| # (opcional mas recomendado) | ||
| SMARTZAP_API_KEY=Vectra@179mr$$ | ||
|
|
||
| # ===== Banco (Supabase) ===== | ||
| DATABASE_PROVIDER=supabase | ||
| NEXT_PUBLIC_SUPABASE_URL=https://bfxovdgjgoijwkekbftl.supabase.co | ||
| NEXT_PUBLIC_SUPABASE_ANON_KEY==eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJmeG92ZGdqZ29pandrZWtiZnRsIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjU3NTg5MDQsImV4cCI6MjA4MTMzNDkwNH0.aPbtNP_pAkmBGdSrdi4VqqvkxrVTTPivu2bo-F4ckZ8 | ||
| NEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY=sb_secret_nFBQ7_EGAtnsSJF_x2jFXA_yCXbJQHU | ||
|
|
||
| # ===== Upstash Redis (obrigatório p/ workflows) ===== | ||
| UPSTASH_REDIS_REST_URL=https://ready-sunbird-10099.upstash.io | ||
| UPSTASH_REDIS_REST_TOKEN=ASdzAAIncDI3YWZjZTM0MmE1OWQ0ODJhYjgyNDZlYzU1Y2I5NWNlMXAyMTAwOTk | ||
|
|
||
| # ===== QStash (obrigatório p/ workflows) ===== | ||
| QSTASH_URL="https://qstash.upstash.io" | ||
| QSTASH_TOKEN=eyJVc2VySUQiOiIwZjNlNTY5Ny01NWYxLTQ0ZjItOWJiYS05OWNjOWU5OWM1MDMiLCJQYXNzd29yZCI6IjNiNmZlMDNmMDJhZDQ0ZGI5YzA2Y2VkYTU2Y2NjYjk1In0= | ||
| QSTASH_CURRENT_SIGNING_KEY=sig_6F8RbNs8QXBjqzuN4h7SpXKgHMfX | ||
| QSTASH_NEXT_SIGNING_KEY=sig_5rhRMUtxzFDeqdV1YkZhCLzayuP7 | ||
|
|
||
| # Turso (SQLite - legacy) | ||
| TURSO_DATABASE_URL=libsql://your-database.turso.io | ||
| TURSO_AUTH_TOKEN=your_turso_auth_token | ||
|
|
||
| # Supabase (PostgreSQL - recommended) | ||
| NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co | ||
| NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key | ||
| SUPABASE_SERVICE_ROLE_KEY=your_service_role_key | ||
|
|
||
| # ----- Vercel / App URL ----- | ||
| # NEXT_PUBLIC_APP_URL is optional. If not set, the system will auto-detect: | ||
| # 1. VERCEL_PROJECT_PRODUCTION_URL (stable production domain, auto-set by Vercel) | ||
| # 2. VERCEL_URL (deployment-specific URL, auto-set by Vercel) | ||
| # | ||
| # Only set this manually if you have a custom domain: | ||
| # NEXT_PUBLIC_APP_URL=https://your-custom-domain.com | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| node_modules | ||
| .next | ||
| dist | ||
| coverage | ||
| .next/standalone | ||
| .next/cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| /** @type {import("eslint").Linter.Config} */ | ||
| module.exports = { | ||
| extends: ["next/core-web-vitals"], | ||
| parser: "@typescript-eslint/parser", | ||
| plugins: ["@typescript-eslint"], | ||
| parserOptions: { | ||
| ecmaVersion: "latest", | ||
| sourceType: "module", | ||
| project: ["./tsconfig.json"], | ||
| tsconfigRootDir: __dirname, | ||
| }, | ||
| rules: { | ||
| "react/no-unescaped-entities": "off", | ||
| "@typescript-eslint/no-explicit-any": "off", | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "extends": ["next/core-web-vitals"], | ||
| "plugins": ["@typescript-eslint"], | ||
| "parser": "@typescript-eslint/parser", | ||
| "rules": { | ||
| "react/no-unescaped-entities": "off", | ||
| "@typescript-eslint/no-explicit-any": "off" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,3 +51,4 @@ coverage/ | |
|
|
||
| # Backups / Utility | ||
| tmp/ | ||
| .env*.local | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Add TypeScript parser options for better type-aware linting.
The ESLint configuration is missing
parserOptionsfor the TypeScript parser. This limits the effectiveness of type-aware lint rules.🔎 Proposed enhancement
{ "extends": ["next/core-web-vitals"], "plugins": ["@typescript-eslint"], "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module", + "project": "./tsconfig.json" + }, "rules": { "react/no-unescaped-entities": "off", "@typescript-eslint/no-explicit-any": "off" } }Note: Including
"project": "./tsconfig.json"enables type-aware linting rules but may slow down linting. If performance is a concern, you can omit it.📝 Committable suggestion
🤖 Prompt for AI Agents