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
|
||||
|
||||
Crypto users who hold or actively monitor addresses need a lightweight,
|
||||
reliable way to know when on-chain activity occurs without polling block
|
||||
explorers manually. Koin Ping fills that gap: it watches a set of Ethereum
|
||||
addresses, evaluates configurable alert rules (incoming transactions, outgoing
|
||||
Crypto users who hold or actively monitor addresses need a lightweight, reliable
|
||||
way to know when on-chain activity occurs without polling block explorers
|
||||
manually. Koin Ping fills that gap: it watches a set of Ethereum addresses,
|
||||
evaluates configurable alert rules (incoming transactions, outgoing
|
||||
transactions, large transfers, balance thresholds), and notifies the user
|
||||
through Discord webhooks.
|
||||
|
||||
@@ -91,9 +91,9 @@ koin_ping_0.2.0/
|
||||
authentication middleware. Exposes CRUD endpoints for addresses, alert rules,
|
||||
alert events, and notification configuration.
|
||||
|
||||
**Poller** (`cmd/poller`): long-running daemon that polls Ethereum via
|
||||
JSON-RPC, compares observed transactions against persisted alert rules, fires
|
||||
alert events to the database, and dispatches Discord notifications.
|
||||
**Poller** (`cmd/poller`): long-running daemon that polls Ethereum via JSON-RPC,
|
||||
compares observed transactions against persisted alert rules, fires alert events
|
||||
to the database, and dispatches Discord notifications.
|
||||
|
||||
**Frontend** (`frontend/`): React 19 SPA built with Vite. Authenticates with
|
||||
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)
|
||||
- [ ] Rename `go.mod` module path from `github.com/kjannette/koin-ping` to
|
||||
`sneak.berlin/go/koin-ping` (per repo policy)
|
||||
- [ ] Move database migrations to `internal/db/migrations/` and embed them
|
||||
in the binary
|
||||
- [ ] Move database migrations to `internal/db/migrations/` and embed them in
|
||||
the binary
|
||||
- [ ] Pin all Docker base images by `@sha256` in Dockerfile
|
||||
- [ ] Install `golangci-lint` locally and pass `make lint`
|
||||
- [ ] 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
|
||||
the binary.
|
||||
- `000_migration.sql` — contains ONLY the creation of the migrations tracking
|
||||
table itself. Nothing else.
|
||||
- `000_migration.sql` — contains ONLY the creation of the migrations
|
||||
tracking table itself. Nothing else.
|
||||
- `001_schema.sql` — the full application schema.
|
||||
- **Pre-1.0.0:** never add additional migration files (002, 003, etc.). There
|
||||
is no installed base to migrate. Edit `001_schema.sql` directly.
|
||||
- **Pre-1.0.0:** never add additional migration files (002, 003, etc.).
|
||||
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.
|
||||
Never edit existing migrations after release.
|
||||
|
||||
|
||||
@@ -37,16 +37,20 @@ cp ENV_TEMPLATE.md .env
|
||||
|
||||
## 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)**
|
||||
|
||||
- Just set `FIREBASE_PROJECT_ID` in .env
|
||||
- Firebase Admin will use Application Default Credentials
|
||||
|
||||
**Option 2: Use Service Account Key (production)**
|
||||
|
||||
1. Go to Firebase Console > Project Settings > Service Accounts
|
||||
2. Click "Generate new private key"
|
||||
3. Download the JSON file
|
||||
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
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
Start DB:
|
||||
|
||||
brew services start postgresql@15
|
||||
|
||||
Run Backend:
|
||||
|
||||
cd /Users/kjannette/workspace/koin_ping/backend-go
|
||||
go run ./cmd/api
|
||||
cd /Users/kjannette/workspace/koin_ping/backend-go go run ./cmd/api
|
||||
|
||||
@@ -5,16 +5,19 @@ React + Vite frontend for the on-chain monitoring and alerting system.
|
||||
## Getting Started
|
||||
|
||||
1. Install dependencies:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. Run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
3. Build for production:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
@@ -34,5 +37,5 @@ React + Vite frontend for the on-chain monitoring and alerting system.
|
||||
|
||||
## 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