feat: add Layer 3 - API Gateway main app, WhatsApp routes, Frontend pages

API Gateway:
- main.py with FastAPI app, CORS, health endpoints
- WhatsApp routes: accounts CRUD, conversations, messages, internal events
- WhatsApp schemas for request/response validation

Frontend:
- Login page with register option for first admin
- MainLayout with sidebar navigation and user dropdown
- Dashboard with statistics cards (accounts, conversations)
- WhatsApp Accounts page with QR modal for connection
- Inbox page with conversation list and real-time chat

Full feature set for Fase 1 Foundation complete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude AI
2026-01-29 10:01:06 +00:00
parent 7042aa2061
commit dcb7fb5974
10 changed files with 1305 additions and 13 deletions

View File

@@ -1,10 +1,7 @@
import { Routes, Route, Navigate } from 'react-router-dom';
import { useAuthStore } from './store/auth';
// Placeholder components - will be replaced
const LoginPage = () => <div>Login Page</div>;
const DashboardPage = () => <div>Dashboard</div>;
const MainLayout = ({ children }: { children: React.ReactNode }) => <div>{children}</div>;
import Login from './pages/Login';
import MainLayout from './layouts/MainLayout';
function PrivateRoute({ children }: { children: React.ReactNode }) {
const isAuthenticated = useAuthStore((state) => state.isAuthenticated);
@@ -14,17 +11,12 @@ function PrivateRoute({ children }: { children: React.ReactNode }) {
export default function App() {
return (
<Routes>
<Route path="/login" element={<LoginPage />} />
<Route path="/login" element={<Login />} />
<Route
path="/*"
element={
<PrivateRoute>
<MainLayout>
<Routes>
<Route path="/" element={<Navigate to="/dashboard" replace />} />
<Route path="/dashboard" element={<DashboardPage />} />
</Routes>
</MainLayout>
<MainLayout />
</PrivateRoute>
}
/>