getPlans function is the frontend service layer that provides pricing plan data. This function currently returns mock data but is structured to support future database or API integration.
This documentation covers the frontend service layer from the RespondeIA frontend repository. The pricing data is currently hardcoded in
modules/prices/services/get-plans.ts.Source Code
Frommodules/prices/services/get-plans.ts:
Plan Interface
Frommodules/prices/types/plan.ts:
Returns
Returns aPromise<Plan[]> - array of all available pricing plans.
Current Plans
The service returns three plans:-
Básico (23/month annually)
- For businesses just starting out
- 1 WhatsApp number
- Up to 500 messages
- AI automatic responses
-
Pro (47/month annually) - Highlighted
- For growing SMBs
- 1 WhatsApp number
- Unlimited messages
- Advanced custom AI
- Contact CRM
-
Agencia (119/month annually)
- For agencies and resellers
- Up to 5 numbers
- Unlimited messages
- Multi-client panel
- White-label
Usage Example
In Server Components (Next.js App Router)
Fromapp/(public)/pricing/page.tsx:
In Client Components
Frommodules/prices/screens/pricing-screen.tsx:
Notes
The pricing plans are currently hardcoded in
get-plans.ts. The function is structured to easily support future database or API integration.The pricing page uses ISR (Incremental Static Regeneration) with a 24-hour revalidation period to ensure optimal performance.
Related
Plan Type Interface
TypeScript interface for Plan objects
usePricingPlans Hook
Client-side hook for managing pricing state
Pricing Components
UI components for displaying plans
Pricing Guide
Complete pricing documentation
