feat: site institucional completo com design system - Implementa\u00e7\u00e3o do site institucional da Aggios com design system completo incluindo gradientes, tipografia, componentes e se\u00e7\u00f5es de recursos, pre\u00e7os e CTA

This commit is contained in:
Erik Silva
2025-12-07 02:19:08 -03:00
parent 53f240a4da
commit bf6707e746
90 changed files with 25927 additions and 1 deletions

View File

@@ -0,0 +1,53 @@
/**
* API Configuration - URLs e funções de requisição
*/
// URL base da API - pode ser alterada por variável de ambiente
export const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || 'http://api.localhost';
/**
* Endpoints da API
*/
export const API_ENDPOINTS = {
// Auth
register: `${API_BASE_URL}/api/auth/register`,
login: `${API_BASE_URL}/api/auth/login`,
logout: `${API_BASE_URL}/api/auth/logout`,
refresh: `${API_BASE_URL}/api/auth/refresh`,
me: `${API_BASE_URL}/api/me`,
// Health
health: `${API_BASE_URL}/health`,
apiHealth: `${API_BASE_URL}/api/health`,
} as const;
/**
* Wrapper para fetch com tratamento de erros
*/
export async function apiRequest<T = any>(
url: string,
options?: RequestInit
): Promise<T> {
try {
const response = await fetch(url, {
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers,
},
});
const data = await response.json();
if (!response.ok) {
throw new Error(data.message || `Erro ${response.status}`);
}
return data;
} catch (error) {
if (error instanceof Error) {
throw error;
}
throw new Error('Erro desconhecido na requisição');
}
}