Skip to content

Commit d623b9f

Browse files
authored
Merge pull request #128 from forestream/lfop-61
Lfop 61
2 parents 69025a4 + b39eb33 commit d623b9f

107 files changed

Lines changed: 6126 additions & 6 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-pages.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: pages-${{ github.ref }}
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v6
27+
28+
- name: Install bun
29+
uses: oven-sh/setup-bun@v2
30+
31+
- name: Cache bun dependencies
32+
uses: actions/cache@v5
33+
with:
34+
path: ~/.bun/install/cache
35+
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
36+
restore-keys: |
37+
bun-${{ runner.os }}-
38+
39+
- name: Install Node.js
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: 22
43+
44+
- name: Cache Next.js build
45+
uses: actions/cache@v5
46+
with:
47+
path: |
48+
apps/landing/.next/cache
49+
key: nextjs-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}-${{ hashFiles('apps/landing/**/*.{js,jsx,ts,tsx,md,mdx}') }}
50+
restore-keys: |
51+
nextjs-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}-
52+
53+
- name: Install dependencies
54+
run: bun install
55+
56+
- name: Build landing
57+
run: bun run --filter landing build
58+
59+
- name: Disable Jekyll
60+
run: touch apps/landing/out/.nojekyll
61+
62+
- name: Upload artifact
63+
uses: actions/upload-pages-artifact@v3
64+
with:
65+
path: ./apps/landing/out
66+
67+
deploy:
68+
needs: build
69+
runs-on: ubuntu-latest
70+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
71+
environment:
72+
name: github-pages
73+
url: ${{ steps.deployment.outputs.page_url }}
74+
steps:
75+
- name: Deploy to GitHub Pages
76+
id: deployment
77+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ bin/
2121
*.iml
2222
.idea/
2323
.omc
24+
node_modules

.oxlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["node_modules/eslint-plugin-devup/oxlintrc.json"]
3+
}

CLAUDE.md

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,77 @@
1-
@AGENTS.md
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
@AGENTS.md
6+
7+
## Repository Shape
8+
9+
Vespera is a **hybrid monorepo** with two workspaces living side-by-side at the repo root:
10+
11+
| Workspace | Manager | Members | Purpose |
12+
|-----------|---------|---------|---------|
13+
| Cargo (`Cargo.toml`) | cargo | `crates/*`, `examples/*` (excluding `examples/java-jni-demo`) | OpenAPI engine, proc-macros, JNI bridge |
14+
| Bun (`package.json`) | bun | `apps/*` | Marketing/docs site + admin panel (Next.js) |
15+
16+
Both live at the root — `bun run ...` operates on the Node side; `cargo ...` on the Rust side. Many root scripts deliberately cross the boundary (e.g., `prelint` runs `cargo clippy/fmt/check` **before** oxlint runs on JS). See `AGENTS.md` for crate-level detail.
17+
18+
## Common Commands (Root)
19+
20+
```bash
21+
# Rust side
22+
cargo build # Build all crates
23+
cargo test --workspace # All Rust tests
24+
cargo test -p vespera_macro # One crate
25+
cargo test --test <name> -- <filter> # Single integration test
26+
cargo tarpaulin --out stdout # Coverage (run via `bun run posttest`)
27+
28+
# Lint / format (order matters — `prelint` hook runs Rust FIRST)
29+
bun run lint # oxlint over JS/TS (runs after prelint → cargo clippy+fmt+check)
30+
bun run lint:fix # oxlint --fix (prelint:fix runs cargo clippy --fix + fmt first)
31+
32+
# Front-end workspace
33+
bun run dev # Runs `dev` in every apps/* (Next.js dev servers)
34+
bun run build # Builds apps/front and apps/admin
35+
cd apps/front && bun dev # Single-app dev (preferred over -F flag, per devfive-frontend skill)
36+
37+
# Tests (Bun side)
38+
bun test # Root runs bun test + tarpaulin via posttest hook
39+
40+
# Release tooling
41+
bun run changepacks # Version bumps via @changepacks/cli
42+
```
43+
44+
> **`prelint` gotcha:** `bun run lint` triggers `cargo clippy -- -D warnings && cargo fmt --check && cargo check` first. Any Rust warning fails the JS lint. Run `bun run lint:fix` (which chains `cargo clippy --fix && cargo fmt`) to auto-resolve both sides.
45+
46+
## Frontend (`apps/front`)
47+
48+
Next.js 16 App Router + React 19 + @devup-ui/react (build-time CSS-in-JS). Theme tokens live in `apps/front/devup.json` and use the `$token` syntax in JSX props only.
49+
50+
- `apps/front/src/app/` contains **only** `layout.tsx` and `page.tsx` — all other components belong in `src/components/` (per devfive-frontend conventions).
51+
- `src/api.ts` is generated/edited via `@devup-api/fetch`; it currently contains a placeholder `/users/users` call that fails typecheck — a known scaffolding leftover, not a regression.
52+
- Styling: use devup-ui shorthand props (`bg`, `p`, `w`, `_hover`, `[mobile,null,pc]` responsive arrays). Never `style={{...}}` or Tailwind. See `~/.claude/skills/devup-ui/SKILL.md` via the `/devup-ui` skill.
53+
54+
## Rust × Java Boundary
55+
56+
The JNI integration (`crates/vespera_jni``libs/vespera-bridge/` Java lib) is load-bearing for `examples/rust-jni-demo`. When touching:
57+
58+
- `vespera_inprocess` owns transport-agnostic dispatch (no JNI deps).
59+
- `vespera_jni` is a thin layer depending on `vespera_inprocess` + `jni` + `tokio/rt-multi-thread`.
60+
- User code depends on `vespera` only, with `features = ["jni"]` — never `vespera_jni` directly. Breaking this invariant is an AGENTS.md-listed anti-pattern.
61+
62+
The Java package `com.devfive.vespera.bridge` is **fixed** because the JNI symbol name is derived from it. Renaming it breaks the native load.
63+
64+
## Pre-Commit (Husky)
65+
66+
`bun run prepare` installs husky. Commits trigger whatever lives in `.husky/` — typically a `lint` pass. Never bypass with `--no-verify`; fix the underlying Rust or oxlint finding.
67+
68+
## Where Tests Live
69+
70+
| Concern | Location |
71+
|---------|----------|
72+
| Macro integration tests | `crates/vespera_macro/tests/` (+ `insta` snapshots) |
73+
| Core unit tests | `crates/vespera_core/src/**` inline `#[cfg(test)]` |
74+
| JNI end-to-end | `examples/rust-jni-demo` (Rust + Java + Gradle) |
75+
| Front tests | `apps/front/src/__tests__/` (bun test + bun-test-env-dom) |
76+
77+
Snapshot tests use `insta` — run `cargo insta review` to accept drifts.

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/landing/.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts

apps/landing/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20+
21+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.

0 commit comments

Comments
 (0)