A secure Next.js application that acts as an interface between incoming URLs with query parameters and Chatwoot messaging.
- Parse URL query parameters (phone number and message body)
- Extract examination access codes (Código and Senha) from URL-encoded text
- Display a user-friendly confirmation interface
- Allow editing of credentials before sending
- Select target Chatwoot inbox dynamically
- Send formatted messages to Chatwoot
-
Install dependencies (handled automatically by v0)
-
Configure environment variables:
- Copy
.env.exampleto.env.local - Add your Chatwoot credentials:
CHATWOOT_URL: Your Chatwoot instance URLCHATWOOT_API_TOKEN: Your Chatwoot API tokenCHATWOOT_ACCOUNT_ID: Your Chatwoot account ID
- Copy
-
The app works with mock data if Chatwoot credentials are not configured, perfect for development.
Access the app with URL parameters:
https://apistudio.ceroimagem.com.br/?number=5522999014450&body=http://www.ceroimagem.com.br%0A*Código*:%20PK2797961%0A*Senha*:%20xnk2a
The app will:
- Parse the phone number and body
- Extract Código and Senha automatically
- Display a confirmation form
- Allow you to select an inbox and edit credentials
- Send the formatted message to Chatwoot
- All Chatwoot credentials are stored server-side only
- No sensitive data is exposed to the frontend
- Input validation on both client and server
- Designed for internal use by clinic staff
- Next.js 16 (App Router)
- TypeScript
- TailwindCSS v4
- shadcn/ui components
- Server Components & Server Actions