Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { app } from "./server";

const port = Number(process.env.PORT) || 4000;
app.listen(port, () => console.log(`API listening on :${port}`));
14 changes: 14 additions & 0 deletions api/src/server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import express from "express";

const app = express();

app.get("/contracts", async (_req, res) => {
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The /contracts route handler is marked async but contains no await expressions. This is unnecessary and may generate a TypeScript lint warning. Since there's no asynchronous operation, the async keyword should be removed.

Suggested change
app.get("/contracts", async (_req, res) => {
app.get("/contracts", (_req, res) => {

Copilot uses AI. Check for mistakes.
// minimal placeholder that returns an empty array
res.json([]);
});

app.get("/health", (_req, res) => {
res.json({ status: "ok" });
});

export { app };
9 changes: 9 additions & 0 deletions app/src/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from "react";
import { createRoot } from "react-dom/client";
import { AppRouter } from "./router";

createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<AppRouter />
</React.StrictMode>
);
Comment on lines +1 to +9
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tsconfig.json does not include app/src/**/*.tsx in its include array, and has no "jsx" compiler option set. Running npm run typecheck will not type-check these new files, and npm run build (tsc) will not compile them. The tsconfig needs both "jsx": "react-jsx" in compilerOptions and "app/src/**/*" in the include array for these files to be properly compiled.

Copilot uses AI. Check for mistakes.
5 changes: 5 additions & 0 deletions app/src/router.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from "react";

export function AppRouter() {
return <div>CyberAi</div>;
}
Loading
Loading