Initial scaffold: pnpm workspace monorepo with backend + frontend

- Backend: Express + WebSocket proxy (tsx watch, strict TS, ESM)
- Frontend: React 19 + Vite + Monaco + Tailwind v4 + Tauri v2
- pnpm workspace at root for single-install workflow
- AGENTS.md with architectural constraints and commands
- Removed Tauri greet demo, added minimal App shell
- No external database, Git-as-Database philosophy
This commit is contained in:
2026-07-01 13:23:24 +05:30
commit b00fe3ec9e
45 changed files with 8771 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
{
"name": "typst-leaf-backend",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc",
"start": "node dist/index.js",
"typecheck": "tsc --noEmit",
"test": "echo \"Error: no test specified\""
},
"dependencies": {
"cors": "^2.8.5",
"execa": "^9.6.1",
"express": "^4.22.2",
"simple-git": "^3.27.0",
"ws": "^8.18.2",
"zod": "^3.24.5"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/express": "^4.17.25",
"@types/node": "^22.15.17",
"@types/ws": "^8.18.1",
"tsx": "^4.19.4",
"typescript": "~5.8.3"
},
"packageManager": "pnpm@10.23.0"
}
+27
View File
@@ -0,0 +1,27 @@
import { createServer } from "http";
import { WebSocketServer } from "ws";
const PORT = Number(process.env.PORT) || 4000;
const server = createServer((_req, res) => {
res.writeHead(200, { "Content-Type": "application/json" });
res.end(JSON.stringify({ status: "ok", service: "typst-leaf-backend" }));
});
const wss = new WebSocketServer({ server });
wss.on("connection", (ws) => {
console.log("WebSocket client connected");
ws.on("message", (data) => {
console.log("Received:", data.toString());
});
ws.on("close", () => {
console.log("WebSocket client disconnected");
});
});
server.listen(PORT, () => {
console.log(`Backend running on http://localhost:${PORT}`);
});
+21
View File
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"outDir": "dist",
"rootDir": "src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"noUncheckedIndexedAccess": true,
"noEmit": false
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}