Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
30 changes: 30 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Repository Guidelines

## Project Structure & Module Organization

Hexon is a pnpm TypeScript monorepo. The Vue 3/Vite frontend lives in `client/`, with views, components, composables, and Jest tests under `client/src/`. The Koa/Node backend is in `server/`; application bootstrap, routes, middleware, services, and utilities are under `server/src/`. Shared types and constants are in `shared/src/` and `server-shared/src/`. Installation and maintenance CLI commands are implemented in `server-scripts/src/`, while reusable shell checks are in `scripts/`. Static screenshots and other project imagery belong in `images/`.

## Build, Test, and Development Commands

Run these commands from the repository root:

- `pnpm install` installs workspace dependencies.
- `pnpm build` builds every workspace package; the client also runs type-checking and tests first.
- `pnpm dev` starts the backend watcher and Vite development server together.
- `pnpm start` runs the built backend in production mode.
- `pnpm test:fresh-install` executes the clean-install smoke test in `scripts/`.
- `pnpm --filter client test` or `pnpm --filter server test` runs one package’s Jest suite.

For a first-time local setup, use `pnpm dev-init`; copy `.env.sample` to the appropriate environment file and review values before starting services.

## Coding Style & Naming Conventions

Use TypeScript with two-space indentation, semicolons, and the repository’s Prettier settings in `.prettierrc`. Run ESLint before submitting changes. Use PascalCase for Vue components and classes (for example, `HViewerToolbar.vue`), camelCase for functions and variables, and kebab-case for route or asset names. Keep frontend code in `client/src/` and backend code in the relevant `server/src/` layer.

## Testing Guidelines

Tests use Jest with `ts-jest`; frontend tests use the configured jsdom environment. Name tests with `.test.ts` or `.test.tsx` and place them near the code they cover. Add or update tests for behavior changes, and run the affected package tests before the full build.

## Commit & Pull Request Guidelines

Recent history follows Conventional Commit prefixes such as `feat:`, `fix:`, `chore:`, and `docs:`; use an imperative, focused subject and add `!` for breaking changes. Pull requests should explain the user-visible impact, link related issues, describe validation performed, and include screenshots for UI changes. Keep generated release commits and unrelated refactors out of feature changes.
1 change: 0 additions & 1 deletion client/dist/assets/HCreateArticleModal.079bef88.js

This file was deleted.

Binary file not shown.
1 change: 1 addition & 0 deletions client/dist/assets/HCreateArticleModal.38aea27e.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
1 change: 0 additions & 1 deletion client/dist/assets/HCreateArticleModal.3ac45e74.css

This file was deleted.

1 change: 1 addition & 0 deletions client/dist/assets/HCreateArticleModal.9c071e3b.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.h-create-article-form .label[data-v-03c03721]{line-height:30px}
1 change: 0 additions & 1 deletion client/dist/assets/HMonacoEditor.213cf05a.css

This file was deleted.

Binary file removed client/dist/assets/HMonacoEditor.213cf05a.css.br
Binary file not shown.
1,107 changes: 1,107 additions & 0 deletions client/dist/assets/HMonacoEditor.35b959e1.js

Large diffs are not rendered by default.

Binary file added client/dist/assets/HMonacoEditor.35b959e1.js.br
Binary file not shown.
1,294 changes: 0 additions & 1,294 deletions client/dist/assets/HMonacoEditor.4fbcd301.js

This file was deleted.

Binary file removed client/dist/assets/HMonacoEditor.4fbcd301.js.br
Binary file not shown.
1 change: 1 addition & 0 deletions client/dist/assets/HMonacoEditor.7f05fe6d.css

Large diffs are not rendered by default.

Binary file added client/dist/assets/HMonacoEditor.7f05fe6d.css.br
Binary file not shown.
1 change: 1 addition & 0 deletions client/dist/assets/HPopover.2c82eb6b.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.popover[data-v-23545df9]{position:fixed;left:0;top:0;display:flow-root}
1 change: 0 additions & 1 deletion client/dist/assets/HPopover.d0eeed1b.js

This file was deleted.

Binary file removed client/dist/assets/HPopover.d0eeed1b.js.br
Binary file not shown.
1 change: 0 additions & 1 deletion client/dist/assets/HPopover.f93dedac.css

This file was deleted.

Loading