-
Notifications
You must be signed in to change notification settings - Fork 2
Add repository guidelines, update github actions to include lint-core and lint-dashboard, update node version requirement on all packages to 22+ and added .nvmrc for nvm to read node version #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
11327ed
4dcdee7
370d1f6
0bd731d
cadea55
e778e56
6366baa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 22 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Repository Guidelines | ||
|
|
||
| ## Project Structure & Module Organization | ||
| `src/` contains the TypeScript core service. HTTP routes live in `src/api/`, background execution in `src/workers/` and `src/processors/`, channel integrations in `src/plugins/`, and shared infrastructure in `src/config/`, `src/database/`, and `src/utils/`. | ||
|
|
||
| Tests are split between `tests/unit` and `tests/integration`, with helpers in `tests/testutil` and setup in `tests/setup.ts`. The Next.js admin UI lives in `dashboard/`. Docs and assets are in `api-docs/`, `architecture/`, and `assets/`. | ||
|
|
||
| ## Build, Test, and Development Commands | ||
| Install dependencies with `npm install` and `npm install --prefix dashboard`. | ||
|
|
||
| - `npm run dev` starts the core API with `tsx` and `nodemon`. | ||
| - `npm run worker:dev`, `npm run processor:dev`, `npm run delayed-processor:dev`, and `npm run recovery:dev` start background services. | ||
| - `npm run build` compiles `src/` to `dist/` and rewrites path aliases. | ||
| - `npm run start` runs the compiled API from `dist/api/server.js`. | ||
| - `npm run test`, `npm run test:unit`, `npm run test:integration`, and `npm run test:coverage` run tests. | ||
| - `npm run lint:core` checks the core codebase; `npm run lint:dashboard` checks the dashboard. | ||
| - `npm run dev --prefix dashboard` starts the dashboard on port `3002`. | ||
|
|
||
| ## Coding Style & Naming Conventions | ||
| Use TypeScript with strict typing and existing `@src/*` path aliases. Match current style: 2-space indentation, camelCase for variables and functions, PascalCase for types, classes, and React components, and filenames such as `notification.controller.test.ts`. | ||
|
|
||
| Plan changes before writing code. Follow low-level design principles: single responsibility, clear interfaces, useful dependency inversion, and explicit error handling. Do not duplicate logic; extract shared behavior into focused utilities, services, or test helpers. | ||
|
|
||
| ## Testing Guidelines | ||
| Vitest is the test runner. Integration tests also use `supertest`, `mongodb-memory-server`, and Redis mocks. Name test files with `.test.ts`, for example `tests/unit/plugins/loader.test.ts`. | ||
|
|
||
| Every new feature or code path must include matching tests in `tests/`. Add unit suites for isolated logic and integration suites for API, persistence, plugin, processor, or worker behavior. | ||
|
|
||
| ## Commit & Pull Request Guidelines | ||
| Use short Conventional Commit style messages such as `feat: add email retry policy`, `fix: handle missing template`, or `docs: update setup notes`. Keep commits focused. | ||
|
|
||
| PRs should include a summary, linked issue when applicable, test evidence, and screenshots or GIFs for `dashboard/` UI changes. Husky `pre-push` runs both lint commands. | ||
|
|
||
| ## Security & Configuration Tips | ||
| Do not commit secrets. Use `.env.example` as the template for `.env`, and update it when adding configuration. For local full-stack work, prefer `docker-compose.dev.yaml`; for core-only work, start infrastructure with `docker compose -f docker-compose.infra.yaml up -d`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,9 @@ | |
| "name": "dashboard", | ||
| "version": "1.2.1", | ||
| "private": true, | ||
| "engines": { | ||
| "node": ">=22.0.0" | ||
| }, | ||
|
Comment on lines
+5
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The dashboard package now declares Useful? React with 👍 / 👎. |
||
| "scripts": { | ||
| "dev": "next dev -p 3002", | ||
| "build": "NODE_ENV=production next build", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this repository still accepts pushes or PRs against the existing
mainbranch, this trigger no longer matches them: the workflow now only runs formasteranddevelopment, while the previous workflow includedmain. That would skip the added lint jobs, tests, and Docker image publishing for main-targeted changes, so keepmainin this list until that branch is actually retired.Useful? React with 👍 / 👎.