62 }
63
64 const response = await fetch('/api/properties', {
65 method: 'POST',
66 headers: {
7 const pinger = setInterval(async () => {
8 // check the boolean to see if a Glancer has enabled the link to start a cobrowsing session
9 const resp = await fetch("/api/cobrowse/" + window.__DEMO_ID__, {
10 method: "GET",
11 headers: {
9 <script src="https://cdn.tailwindcss.com"></script>
10 <link
11 href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap"
12 rel="stylesheet"
13 />
90}
91
92// API routes
93app.route("/api/jobs", jobsRouter);
94app.route("/api/chat", chatRouter);
95
96// Serve static files
41 const fetchMessages = async () => {
42 try {
43 const response = await fetch(`/api/chat/${jobId}`);
44 if (response.ok) {
45 const messagesData = await response.json();
73
74 try {
75 const response = await fetch('/api/chat', {
76 method: 'POST',
77 headers: {
197export type ApplicationStatus = 'pending' | 'approved' | 'rejected' | 'under_review';
198
199// API Response types
200export interface ApiResponse<T> {
201 success: boolean;
202 data?: T;
32 }
33
34 const response = await fetch(`/api/properties?${params}`);
35 const result = await response.json();
36
24 user_id = ?
25 AND timestamp > ?
26 AND our_api_token = 1
27 `,
28 [userId, new Date().getTime() - 24 * 60 * 60 * 1000],
113 branch_id,
114 model,
115 our_api_token,
116 num_images,
117}: {
120 branch_id: string;
121 model: string;
122 our_api_token: boolean;
123 num_images: number;
124}) {
132 branch_id,
133 model,
134 our_api_token,
135 num_images
136 ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
143 branch_id,
144 model,
145 our_api_token ? 1 : 0,
146 num_images,
147 ],
32โ โ โโโ users.ts # User profile endpoints
33โ โ โโโ static.ts # Static file serving
34โ โโโ index.ts # Main API server
35โโโ frontend/
36โ โโโ components/
61## Technology Stack
62
63- **Backend**: Hono.js API framework
64- **Database**: SQLite for data storage
65- **Frontend**: React with TypeScript
34
35 try {
36 const response = await fetch('/api/jobs', {
37 method: 'POST',
38 headers: {