Skip to content
Merged
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
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,4 @@ jobs:
run: cargo install trunk --locked

- name: Build
working-directory: crates/app
run: trunk build --release
8 changes: 6 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,17 @@ Default to starting with Phase 1.
## 11. Common Commands

```bash
trunk serve # dev server + hot reload (run from crates/app)
trunk build --release # production build
trunk serve # dev server + hot reload (from workspace root)
trunk build --release # production build (from workspace root)
cargo check --workspace --target wasm32-unknown-unknown
cargo clippy --workspace --target wasm32-unknown-unknown -- -D warnings
cargo test --workspace --exclude app # test only models/github-api (no wasm target needed)
```

All commands run from the workspace root: the Trunk assets (`index.html`,
`Trunk.toml`, `favicon.svg`) live at the root and point at
`crates/app/Cargo.toml`, so no `cd crates/app` is ever needed.

---

## 12. Notes for AI Agents Continuing This Work
Expand Down
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ git clone https://github.com/anomalyco/lepo
cd lepo

# Start the dev server with HMR (http://127.0.0.1:3000)
cd crates/app
trunk serve --port 3000 --open
```

Expand All @@ -48,10 +47,10 @@ cargo fmt --all --check
cargo test --workspace --exclude app

# Start the dev server with HMR (http://127.0.0.1:3000)
cd crates/app && trunk serve --port 3000 --open
trunk serve --port 3000 --open

# Production build → crates/app/dist/
cd crates/app && trunk build --release
# Production build → dist/
trunk build --release
```

> CI (`.github/workflows/ci.yml`) runs `cargo check`, `cargo clippy`, `cargo fmt --check`,
Expand Down
50 changes: 0 additions & 50 deletions Makefile

This file was deleted.

12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,16 @@ crates/
### Development

```bash
cd crates/app
trunk serve --port 3000 --open
```

### Build (production)

```bash
cd crates/app
trunk build --release
```

Output is in `crates/app/dist/` — deploy the folder to any static host.
Output is in `dist/` — deploy the folder to any static host.

## Scripts

Expand All @@ -86,8 +84,8 @@ Output is in `crates/app/dist/` — deploy the folder to any static host.
| `cargo clippy --workspace --target wasm32-unknown-unknown -- -D clippy::correctness -D clippy::suspicious` | Lint |
| `cargo fmt --all --check` | Format check (2-space indent, edition 2024) |
| `cargo test --workspace --exclude app` | Run library unit tests |
| `cd crates/app && trunk serve --port 3000 --open` | Dev server with HMR |
| `cd crates/app && trunk build --release` | Production build |
| `trunk serve --port 3000 --open` | Dev server with HMR |
| `trunk build --release` | Production build |

## Security

Expand All @@ -111,8 +109,8 @@ To report a vulnerability privately, see [SECURITY.md](./SECURITY.md).
## Deployment (Vercel)

1. Connect the repository to Vercel.
2. Set build command: `cd crates/app && trunk build --release`
3. Set output directory: `crates/app/dist`
2. Set build command: `trunk build --release`
3. Set output directory: `dist`
4. The app calls `api.github.com` directly from the browser (CORS-enabled), so no backend
or proxy is required.

Expand Down
24 changes: 24 additions & 0 deletions Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Trunk config for the Lepo workspace.
#
# This file must exist at the workspace root: without it, Trunk auto-detects
# the workspace-root Cargo.toml as its config source and fails because a
# virtual manifest has no root package. The Rust app is wired up in
# index.html via `<link data-trunk rel="rust" href="crates/app/Cargo.toml"
# data-bin="app" .../>`, so `trunk serve` / `trunk build` run from the root.

[build]
target = "index.html"
dist = "dist"
public_url = "/"
release = true
inject_scripts = true
minify = "on_release"

[watch]
ignore = ["target", "dist"]

[serve]
addresses = ["127.0.0.1"]
port = 3000
open = false
no_spa = false
22 changes: 0 additions & 22 deletions crates/app/Trunk.toml

This file was deleted.

File renamed without changes
6 changes: 3 additions & 3 deletions crates/app/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<title>Lepo — GitHub Repo Monitor</title>

<!-- Favicon -->
<link data-trunk rel="icon" type="image/svg+xml" href="public/favicon.svg" />
<link data-trunk rel="icon" type="image/svg+xml" href="favicon.svg" />

<!-- Inter font (Pin Sans substitute per DESIGN.md) — loaded without blocking first paint -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
Expand All @@ -45,10 +45,10 @@
</noscript>

<!-- Application styles -->
<link data-trunk rel="css" href="src/style.css" />
<link data-trunk rel="css" href="crates/app/src/style.css" />

<!-- WASM entry point -->
<link data-trunk rel="rust" />
<link data-trunk rel="rust" href="crates/app/Cargo.toml" data-bin="app" />
</head>
<body></body>
</html>
4 changes: 2 additions & 2 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"$schema": "https://openapi.vercel.sh/vercel.json",
"trailingSlash": false,

"buildCommand": "cd crates/app && cargo install trunk --locked && rustup target add wasm32-unknown-unknown && trunk build --release",
"outputDirectory": "crates/app/dist",
"buildCommand": "cargo install trunk --locked && rustup target add wasm32-unknown-unknown && trunk build --release",
"outputDirectory": "dist",

"rewrites": [
{
Expand Down