feat: Initialize ComFi project with Vite

Setup project structure, dependencies, and basic configuration for the ComFi application. Includes initial setup for Vite, React, TypeScript, Tailwind CSS, and essential development tools. Defines core types and provides a basic README for local development.
This commit is contained in:
MMrp89
2026-02-09 20:28:37 -03:00
parent 1e6a56d866
commit 1a57ac7754
28 changed files with 6070 additions and 8 deletions

194
types.ts Normal file
View File

@@ -0,0 +1,194 @@
export type ViewState =
| 'dashboard'
| 'crm'
| 'kanban'
| 'invoicing'
| 'services'
| 'receivables'
| 'payables'
| 'proposals' // Novo módulo
| 'user'
| 'calendar'
| 'todolist'
| 'chat'
| 'activity'
| 'settings';
export type FinancialReportType = 'DRE' | 'BP' | 'DFC' | 'DLPA' | 'DMPL' | 'DRA' | 'DVA';
export interface FinancialSummary {
totalRevenue: number;
totalExpenses: number;
profit: number;
payablePending: number;
receivablePending: number;
}
export interface AppUser {
id: string;
name: string;
email: string;
role: 'super_admin' | 'user';
avatar?: string;
permissions: ViewState[];
active: boolean;
}
export interface TenantProfile {
name: string;
cnpj: string;
email: string;
phone: string;
address: string;
logo: string;
primaryColor: string;
}
export interface Category {
id: string;
name: string;
type: 'income' | 'expense';
color: string;
}
export interface ContactPerson {
id: string;
name: string;
role: string;
email: string;
phone: string;
avatar?: string;
}
export interface CompanyDocument {
id: string;
title: string;
type: 'contract' | 'briefing' | 'invoice' | 'other';
date: string;
size: string;
}
export interface Service {
id: string;
name: string;
category: string;
price: number;
active: boolean;
description?: string;
billingType: 'one-time' | 'recurring';
}
export interface Company {
id: string;
name: string;
fantasyName: string;
cnpj: string;
ie?: string;
city: string;
logo: string;
status: 'active' | 'inactive' | 'pending' | 'overdue';
industry: string;
email: string;
phone: string;
address: string;
website?: string;
since: string;
description?: string;
contacts: ContactPerson[];
documents: CompanyDocument[];
activeServices: Service[];
}
export interface Receivable {
id: string;
description: string;
companyName: string;
category: string;
value: number;
dueDate: string;
status: 'paid' | 'pending' | 'overdue';
type: 'recurring' | 'one-time';
}
export interface Expense {
id: string;
title: string;
category: string;
amount: number;
dueDate: string;
status: 'paid' | 'pending' | 'overdue';
type: 'fixed' | 'variable';
description?: string;
}
export interface ProposalItem {
id: string;
serviceId?: string; // Opcional, caso seja item avulso
description: string;
quantity: number;
unitPrice: number;
total: number;
}
export interface Proposal {
id: string;
number: string; // Ex: PROP-2024-001
clientId: string;
clientName: string;
clientEmail?: string;
issueDate: string;
validUntil: string;
status: 'draft' | 'sent' | 'accepted' | 'rejected';
items: ProposalItem[];
totalValue: number;
notes?: string;
}
export interface CalendarEvent {
id: string;
title: string;
date: string;
type: 'meeting' | 'deadline' | 'payment';
description?: string;
completed: boolean;
}
export interface KanbanTask {
id: string;
title: string;
priority: 'low' | 'medium' | 'high';
dueDate: string;
assignee?: string;
description?: string;
value?: number;
clientId?: string;
}
export interface KanbanColumn {
id: string;
title: string;
tasks: KanbanTask[];
}
export interface Client {
id: string;
name: string;
company: string;
email: string;
phone: string;
status?: 'active' | 'pending' | 'inactive';
lastActivity?: string;
value?: number;
address?: string;
role?: string;
avatar?: string;
}
export interface Toast {
id: string;
type: 'success' | 'error' | 'info' | 'warning';
title: string;
message?: string;
duration?: number;
}