fmt: apply prettier to Markdown and doc files
This commit is contained in:
18
README.md
18
README.md
@@ -49,10 +49,10 @@ The API listens on `http://localhost:3001` and the frontend on
|
|||||||
|
|
||||||
## Rationale
|
## Rationale
|
||||||
|
|
||||||
Crypto users who hold or actively monitor addresses need a lightweight,
|
Crypto users who hold or actively monitor addresses need a lightweight, reliable
|
||||||
reliable way to know when on-chain activity occurs without polling block
|
way to know when on-chain activity occurs without polling block explorers
|
||||||
explorers manually. Koin Ping fills that gap: it watches a set of Ethereum
|
manually. Koin Ping fills that gap: it watches a set of Ethereum addresses,
|
||||||
addresses, evaluates configurable alert rules (incoming transactions, outgoing
|
evaluates configurable alert rules (incoming transactions, outgoing
|
||||||
transactions, large transfers, balance thresholds), and notifies the user
|
transactions, large transfers, balance thresholds), and notifies the user
|
||||||
through Discord webhooks.
|
through Discord webhooks.
|
||||||
|
|
||||||
@@ -91,9 +91,9 @@ koin_ping_0.2.0/
|
|||||||
authentication middleware. Exposes CRUD endpoints for addresses, alert rules,
|
authentication middleware. Exposes CRUD endpoints for addresses, alert rules,
|
||||||
alert events, and notification configuration.
|
alert events, and notification configuration.
|
||||||
|
|
||||||
**Poller** (`cmd/poller`): long-running daemon that polls Ethereum via
|
**Poller** (`cmd/poller`): long-running daemon that polls Ethereum via JSON-RPC,
|
||||||
JSON-RPC, compares observed transactions against persisted alert rules, fires
|
compares observed transactions against persisted alert rules, fires alert events
|
||||||
alert events to the database, and dispatches Discord notifications.
|
to the database, and dispatches Discord notifications.
|
||||||
|
|
||||||
**Frontend** (`frontend/`): React 19 SPA built with Vite. Authenticates with
|
**Frontend** (`frontend/`): React 19 SPA built with Vite. Authenticates with
|
||||||
Firebase, communicates with the API via fetch, and renders the address/alert
|
Firebase, communicates with the API via fetch, and renders the address/alert
|
||||||
@@ -104,8 +104,8 @@ management UI.
|
|||||||
- [ ] Switch frontend package manager from npm to yarn (per repo policy)
|
- [ ] Switch frontend package manager from npm to yarn (per repo policy)
|
||||||
- [ ] Rename `go.mod` module path from `github.com/kjannette/koin-ping` to
|
- [ ] Rename `go.mod` module path from `github.com/kjannette/koin-ping` to
|
||||||
`sneak.berlin/go/koin-ping` (per repo policy)
|
`sneak.berlin/go/koin-ping` (per repo policy)
|
||||||
- [ ] Move database migrations to `internal/db/migrations/` and embed them
|
- [ ] Move database migrations to `internal/db/migrations/` and embed them in
|
||||||
in the binary
|
the binary
|
||||||
- [ ] Pin all Docker base images by `@sha256` in Dockerfile
|
- [ ] Pin all Docker base images by `@sha256` in Dockerfile
|
||||||
- [ ] Install `golangci-lint` locally and pass `make lint`
|
- [ ] Install `golangci-lint` locally and pass `make lint`
|
||||||
- [ ] Add vitest unit tests for the React frontend
|
- [ ] Add vitest unit tests for the React frontend
|
||||||
|
|||||||
@@ -145,11 +145,11 @@ style conventions are in separate documents:
|
|||||||
|
|
||||||
- Database migrations live in `internal/db/migrations/` and must be embedded in
|
- Database migrations live in `internal/db/migrations/` and must be embedded in
|
||||||
the binary.
|
the binary.
|
||||||
- `000_migration.sql` — contains ONLY the creation of the migrations tracking
|
- `000_migration.sql` — contains ONLY the creation of the migrations
|
||||||
table itself. Nothing else.
|
tracking table itself. Nothing else.
|
||||||
- `001_schema.sql` — the full application schema.
|
- `001_schema.sql` — the full application schema.
|
||||||
- **Pre-1.0.0:** never add additional migration files (002, 003, etc.). There
|
- **Pre-1.0.0:** never add additional migration files (002, 003, etc.).
|
||||||
is no installed base to migrate. Edit `001_schema.sql` directly.
|
There is no installed base to migrate. Edit `001_schema.sql` directly.
|
||||||
- **Post-1.0.0:** add new numbered migration files for each schema change.
|
- **Post-1.0.0:** add new numbered migration files for each schema change.
|
||||||
Never edit existing migrations after release.
|
Never edit existing migrations after release.
|
||||||
|
|
||||||
|
|||||||
@@ -37,16 +37,20 @@ cp ENV_TEMPLATE.md .env
|
|||||||
|
|
||||||
## Firebase Setup
|
## Firebase Setup
|
||||||
|
|
||||||
For Firebase Admin SDK to work, you need to set up Application Default Credentials:
|
For Firebase Admin SDK to work, you need to set up Application Default
|
||||||
|
Credentials:
|
||||||
|
|
||||||
**Option 1: Use Firebase Project ID (easiest for development)**
|
**Option 1: Use Firebase Project ID (easiest for development)**
|
||||||
|
|
||||||
- Just set `FIREBASE_PROJECT_ID` in .env
|
- Just set `FIREBASE_PROJECT_ID` in .env
|
||||||
- Firebase Admin will use Application Default Credentials
|
- Firebase Admin will use Application Default Credentials
|
||||||
|
|
||||||
**Option 2: Use Service Account Key (production)**
|
**Option 2: Use Service Account Key (production)**
|
||||||
|
|
||||||
1. Go to Firebase Console > Project Settings > Service Accounts
|
1. Go to Firebase Console > Project Settings > Service Accounts
|
||||||
2. Click "Generate new private key"
|
2. Click "Generate new private key"
|
||||||
3. Download the JSON file
|
3. Download the JSON file
|
||||||
4. Either:
|
4. Either:
|
||||||
- Set `GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceAccountKey.json` in .env
|
- Set `GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceAccountKey.json` in
|
||||||
|
.env
|
||||||
- Or keep it in backend/ and add to .gitignore
|
- Or keep it in backend/ and add to .gitignore
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
Start DB:
|
||||||
|
|
||||||
|
brew services start postgresql@15
|
||||||
|
|
||||||
Run Backend:
|
Run Backend:
|
||||||
|
|
||||||
cd /Users/kjannette/workspace/koin_ping/backend-go
|
cd /Users/kjannette/workspace/koin_ping/backend-go go run ./cmd/api
|
||||||
go run ./cmd/api
|
|
||||||
|
|||||||
@@ -5,16 +5,19 @@ React + Vite frontend for the on-chain monitoring and alerting system.
|
|||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
1. Install dependencies:
|
1. Install dependencies:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Run the development server:
|
2. Run the development server:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Build for production:
|
3. Build for production:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
@@ -34,5 +37,5 @@ React + Vite frontend for the on-chain monitoring and alerting system.
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
The frontend runs on port 3000 and proxies API requests to the backend running on port 5000.
|
The frontend runs on port 3000 and proxies API requests to the backend running
|
||||||
|
on port 5000.
|
||||||
|
|||||||
Reference in New Issue
Block a user