// src/web/App.tsx
import "@synthetiq/app-framework/web/styles";
import "./index.css";
import {
BaseBrowserApp, configureFramework, initTrpc,
systemRoutes, ProtectedRoute,
} from "@synthetiq/app-framework/web";
import { APP_ID, BASE_PATH, API_BASE } from "../constants";
import { DashboardPage } from "./pages/Dashboard";
import { TasksPage } from "./pages/Tasks";
import { TaskDetailPage } from "./pages/TaskDetail";
configureFramework({ basePath: BASE_PATH, appId: APP_ID, apiBase: API_BASE });
initTrpc();
class App extends BaseBrowserApp {
constructor() {
super({ basePath: BASE_PATH, displayName: "Task Tracker" });
this.useRouter({
...systemRoutes(BASE_PATH, "Task Tracker"),
"/": {
title: "Dashboard",
description: "Overview of tasks and recent activity.",
metaTitle: "Dashboard | Task Tracker",
metaDescription: "View your task dashboard",
render: () => (
<ProtectedRoute>
<DashboardPage />
</ProtectedRoute>
),
},
"/tasks": {
title: "Tasks",
description: "List of all tasks with filtering by status and priority.",
metaTitle: "Tasks | Task Tracker",
metaDescription: "View and manage your tasks",
render: () => (
<ProtectedRoute>
<TasksPage />
</ProtectedRoute>
),
},
"/tasks/:id": {
title: "Task Detail",
description: "Detailed view of a single task with edit and status actions.",
metaTitle: "Task | Task Tracker",
metaDescription: "View task details",
render: (routeParams) => (
<ProtectedRoute>
<TaskDetailPage id={routeParams?.id ?? ""} />
</ProtectedRoute>
),
},
});
}
}
new App();