Skip to content

Commit e8d4aa3

Browse files
committed
docs: add readme
1 parent df0bdee commit e8d4aa3

File tree

3 files changed

+69
-104
lines changed

3 files changed

+69
-104
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
actions: read
11+
contents: read
12+
13+
jobs:
14+
main:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
filter: tree:0
20+
fetch-depth: 0
21+
22+
- uses: pnpm/action-setup@v4
23+
name: Install pnpm
24+
with:
25+
version: 9.8.0
26+
run_install: false
27+
28+
# This enables task distribution via Nx Cloud
29+
# Run this command as early as possible, before dependencies are installed
30+
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
31+
# Connect your workspace by running "nx connect" and uncomment this line to enable task distribution
32+
# - run: pnpm dlx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
33+
34+
# Cache node_modules
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: 20
38+
cache: 'pnpm'
39+
40+
- run: pnpm install --frozen-lockfile
41+
- run: pnpm exec playwright install --with-deps
42+
- uses: nrwl/nx-set-shas@v4
43+
44+
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
45+
# - run: pnpm exec nx-cloud record -- echo Hello World
46+
# When you enable task distribution, run the e2e-ci task instead of e2e
47+
- run: pnpm exec nx affected -t lint test build typecheck e2e
48+
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
49+
- run: pnpm exec nx fix-ci
50+
if: always()

README.md

Lines changed: 18 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,24 @@
1-
# WebhookRouter
1+
# Webhook Router (WIP)
22

3-
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
3+
Webhook Router helps you unify webhook messages from different platforms, convert them into a standard Markdown format, and forward them to one or more targets. It aims to make “many webhook formats in, one normalized message out” simple and repeatable.
44

5-
✨ Your new, shiny [Nx workspace](https://nx.dev) is ready ✨.
5+
This project is currently **work in progress**. Core routing is being built; the console and full platform coverage are still evolving.
66

7-
[Learn more about this workspace setup and its capabilities](https://nx.dev/nx-api/js?utm_source=nx_project&amp;utm_medium=readme&amp;utm_campaign=nx_projects) or run `npx nx graph` to visually explore what was created. Now, let's get you up to speed!
7+
## What This Project Does
8+
- Accepts incoming webhooks from popular platforms.
9+
- Normalizes content to Markdown with minimal metadata.
10+
- Forwards to one or more downstream webhook targets.
811

9-
## Generate a library
12+
## Status
13+
- Backend routing: in active development.
14+
- Console UI: in progress.
15+
- Specs and formats: tracked under `docs/`.
1016

11-
```sh
12-
npx nx g @nx/js:lib packages/pkg1 --publishable --importPath=@my-org/pkg1
13-
```
17+
## Repo Layout
18+
- `apps/webhook_router`: backend service
19+
- `apps/console`: management console
20+
- `docs/`: specs and adapter formats
1421

15-
## Run tasks
16-
17-
To build the library use:
18-
19-
```sh
20-
npx nx build pkg1
21-
```
22-
23-
To run any task with Nx use:
24-
25-
```sh
26-
npx nx <target> <project-name>
27-
```
28-
29-
These targets are either [inferred automatically](https://nx.dev/concepts/inferred-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) or defined in the `project.json` or `package.json` files.
30-
31-
[More about running tasks in the docs &raquo;](https://nx.dev/features/run-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
32-
33-
## Versioning and releasing
34-
35-
To version and release the library use
36-
37-
```
38-
npx nx release
39-
```
40-
41-
Pass `--dry-run` to see what would happen without actually releasing the library.
42-
43-
[Learn more about Nx release &raquo;](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
44-
45-
## Keep TypeScript project references up to date
46-
47-
Nx automatically updates TypeScript [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) in `tsconfig.json` files to ensure they remain accurate based on your project dependencies (`import` or `require` statements). This sync is automatically done when running tasks such as `build` or `typecheck`, which require updated references to function correctly.
48-
49-
To manually trigger the process to sync the project graph dependencies information to the TypeScript project references, run the following command:
50-
51-
```sh
52-
npx nx sync
53-
```
54-
55-
You can enforce that the TypeScript project references are always in the correct state when running in CI by adding a step to your CI job configuration that runs the following command:
56-
57-
```sh
58-
npx nx sync:check
59-
```
60-
61-
[Learn more about nx sync](https://nx.dev/reference/nx-commands#sync)
62-
63-
## Set up CI!
64-
65-
### Step 1
66-
67-
To connect to Nx Cloud, run the following command:
68-
69-
```sh
70-
npx nx connect
71-
```
72-
73-
Connecting to Nx Cloud ensures a [fast and scalable CI](https://nx.dev/ci/intro/why-nx-cloud?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) pipeline. It includes features such as:
74-
75-
- [Remote caching](https://nx.dev/ci/features/remote-cache?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
76-
- [Task distribution across multiple machines](https://nx.dev/ci/features/distribute-task-execution?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
77-
- [Automated e2e test splitting](https://nx.dev/ci/features/split-e2e-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
78-
- [Task flakiness detection and rerunning](https://nx.dev/ci/features/flaky-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
79-
80-
### Step 2
81-
82-
Use the following command to configure a CI workflow for your workspace:
83-
84-
```sh
85-
npx nx g ci-workflow
86-
```
87-
88-
[Learn more about Nx on CI](https://nx.dev/ci/intro/ci-with-nx#ready-get-started-with-your-provider?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
89-
90-
## Install Nx Console
91-
92-
Nx Console is an editor extension that enriches your developer experience. It lets you run tasks, generate code, and improves code autocompletion in your IDE. It is available for VSCode and IntelliJ.
93-
94-
[Install Nx Console &raquo;](https://nx.dev/getting-started/editor-setup?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
95-
96-
## Useful links
97-
98-
Learn more:
99-
100-
- [Learn more about this workspace setup](https://nx.dev/nx-api/js?utm_source=nx_project&amp;utm_medium=readme&amp;utm_campaign=nx_projects)
101-
- [Learn about Nx on CI](https://nx.dev/ci/intro/ci-with-nx?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
102-
- [Releasing Packages with Nx release](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
103-
- [What are Nx plugins?](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
104-
105-
And join the Nx community:
106-
- [Discord](https://go.nx.dev/community)
107-
- [Follow us on X](https://twitter.com/nxdevtools) or [LinkedIn](https://www.linkedin.com/company/nrwl)
108-
- [Our Youtube channel](https://www.youtube.com/@nxdevtools)
109-
- [Our blog](https://nx.dev/blog?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
22+
## Docs
23+
- `docs/tech-plan.md`: architecture notes
24+
- `docs/adapters/`: platform webhook formats

nx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"!{projectRoot}/tsconfig.spec.json",
1111
"!{projectRoot}/src/test-setup.[jt]s"
1212
],
13-
"sharedGlobals": []
13+
"sharedGlobals": ["{workspaceRoot}/.github/workflows/ci.yml"]
1414
},
1515
"plugins": [
1616
{

0 commit comments

Comments
 (0)