Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
.env
.env.*
!.env.example
!.env.template
.dev.vars
.dev.vars.*
!.dev.vars.example
*.log
4 changes: 4 additions & 0 deletions app/.dev.vars.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ APP_ORIGIN=""

# Connector token for TigerInbox's MCP (inbox.tigerapps.org/api/mcp); matches TIGERINBOX_MCP_TOKEN there.
TIGERINBOX_MCP_TOKEN=""

# TigerDraw companion: set the URL for local development. Token matches MCP_ACCESS_TOKEN there.
TIGERDRAW_MCP_URL="http://127.0.0.1:3333/mcp"
TIGERDRAW_MCP_TOKEN=""
5 changes: 5 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ dist
.dev.vars
.wrangler
worker-configuration.d.ts
.env
.env.*
!.env.example
*.log
*.tsbuildinfo
15 changes: 15 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ browser (React + useAgentChat over WebSocket)

## Develop

TigerDraw uses its own read-only MCP companion in the TigerDraw repository.
Enable it in My apps after starting that service. Set `TIGERDRAW_MCP_URL` to
`http://127.0.0.1:3333/mcp` for local development, and `TIGERDRAW_MCP_TOKEN` to
its `MCP_ACCESS_TOKEN` if authentication is enabled. Production defaults to
`https://draw.tigerapps.org/mcp`. PI forwards only this dedicated token, without
Junction credentials or student identity. The endpoint must be deployed before
hosted PI can reach it. No new database credentials are required.

```bash
npm install
cp .dev.vars.example .dev.vars # fill in secrets as needed
Expand Down Expand Up @@ -124,3 +132,10 @@ token.
matches the production transform.
- `useAgentChat` suspends while loading history — keep chat pages under a
`<Suspense>` boundary.

### Floor-plan previews

TigerDraw owns and hosts floor-plan previews. MCP results supply `preview_url`
alongside each original PDF URL. PI renders that URL with an original-document
link and a compact fallback if the preview is unavailable. PI contains no
TigerDraw document assets, manifest, PDF renderer, or preview-generation step.
Binary file added app/public/logos/tigerdraw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions app/src/client/components/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,50 @@ export function PiMark({ size = 16, title, ...rest }: IconProps) {
</svg>
);
}

/** Room facts, matching the shared outline icon set. */
export function IconPeople(props: IconProps) {
return (
<Icon {...props}>
<circle cx="9" cy="7" r="3" />
<path d="M3 20v-2a6 6 0 0 1 12 0v2M17 4a3 3 0 0 1 0 6M18 14a5 5 0 0 1 3 4v2" />
</Icon>
);
}
export function IconArea(props: IconProps) {
return (
<Icon {...props}>
<rect x="4" y="4" width="16" height="16" rx="2" />
<path d="m8 16 8-8M8 12v4h4M12 8h4v4" />
</Icon>
);
}
export function IconFloors(props: IconProps) {
return (
<Icon {...props}>
<path d="m3 8 9-5 9 5-9 5-9-5ZM3 12l9 5 9-5M3 16l9 5 9-5" />
</Icon>
);
}
export function IconCooling(props: IconProps) {
return (
<Icon {...props}>
<path d="M12 3v18M4.2 7.5l15.6 9M4.2 16.5l15.6-9M9 5l3 3 3-3M9 19l3-3 3 3M5 11l4-1-1-4M19 13l-4 1 1 4M8 18l1-4-4-1M16 6l-1 4 4 1" />
</Icon>
);
}
export function IconElevator(props: IconProps) {
return (
<Icon {...props}>
<rect x="4" y="3" width="16" height="18" rx="2" />
<path d="M12 10v11m-5-6 2-2 2 2M9 13v5m4-4 2 2 2-2M15 16v-5M9 6h6" />
</Icon>
);
}
export function IconRank(props: IconProps) {
return (
<Icon {...props}>
<path d="M3 21V11h6v10M9 21V4h6v17M15 21v-7h6v7" />
</Icon>
);
}
8 changes: 5 additions & 3 deletions app/src/client/components/Markdown.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Fragment, type ReactNode } from "react";
import { IconExternal } from "./Icons";
import { studentSourceLink } from "../../shared/source-links";

/**
* A deliberately small markdown renderer for chat prose: paragraphs, lists
Expand Down Expand Up @@ -36,10 +37,11 @@ function inline(text: string, keyBase: string): ReactNode[] {
} else if (tok.startsWith("[")) {
const lm = tok.match(/^\[([^\]]+)\]\(([^)\s]+)\)$/);
if (lm) {
const external = /^https?:\/\//i.test(lm[2]);
const link = studentSourceLink(lm[2]);
const external = /^https?:\/\//i.test(link.href);
out.push(
<a key={key} href={lm[2]} target="_blank" rel="noreferrer">
{lm[1]}
<a key={key} href={link.href} target="_blank" rel="noreferrer">
{link.label ?? lm[1]}
{external && <IconExternal size={12} />}
</a>
);
Expand Down
Loading
Loading