29
30 <script type="module">
31 import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0";
32 import App from "/frontend/components/App.tsx";
33
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import type { Contact, NetworkingEvent } from "../../shared/types.ts";
4
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import Dashboard from "./Dashboard.tsx";
4import ContactList from "./ContactList.tsx";
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0,react-dom@18.2.0";
4import App from "./components/App.tsx";
5
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0,react-dom@18.2.0";
4import App from "./components/App.tsx";
5
23โโโ frontend/
24โ โโโ components/
25โ โ โโโ App.tsx # Main React component
26โ โ โโโ MachineryCard.tsx # Individual machinery item
27โ โ โโโ ReviewSection.tsx # Reviews display and form
36
371. The backend runs on Hono with SQLite database
382. Frontend uses React with TailwindCSS for styling
393. Database tables are created automatically on first run
404. Sample machinery data is seeded for demonstration
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import type { User } from "../../shared/types.ts";
4
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useRef } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3
4interface MessageInputProps {
11 const textareaRef = useRef<HTMLTextAreaElement>(null);
12
13 const handleSubmit = async (e: React.FormEvent) => {
14 e.preventDefault();
15
33 };
34
35 const handleKeyPress = (e: React.KeyboardEvent) => {
36 if (e.key === 'Enter' && !e.shiftKey) {
37 e.preventDefault();
40 };
41
42 const handleTextareaChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
43 setMessage(e.target.value);
44
33โ โ โโโ Dashboard.tsx # Overview dashboard
34โ โโโ index.html # Main HTML template
35โ โโโ index.tsx # React entry point
36โ โโโ style.css # Custom styles
37โโโ shared/
49
50- Backend: Hono + SQLite
51- Frontend: React + TypeScript + TailwindCSS
52- Storage: Val Town SQLite
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import type { Submission } from "../../shared/types.ts";
4