fmt: apply prettier to Markdown and doc files

This commit is contained in:
KS Jannette
2026-02-28 20:07:47 -05:00
parent da8b45012a
commit 62e6c64ddb
5 changed files with 54 additions and 44 deletions

View File

@@ -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
@@ -101,17 +101,17 @@ management UI.
## TODO
- [ ] 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
- [ ] 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
- [ ] Add a `make db-reset` / `make migrate` target for schema management
- [ ] Set HTTP server read/write timeouts (currently unbounded)
- [ ] Replace `log.Printf` calls with structured `log/slog`
- [ ] 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
- [ ] 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
- [ ] Add a `make db-reset` / `make migrate` target for schema management
- [ ] Set HTTP server read/write timeouts (currently unbounded)
- [ ] Replace `log.Printf` calls with structured `log/slog`
## License

View File

@@ -145,13 +145,13 @@ 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.
- `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.
- **Post-1.0.0:** add new numbered migration files for each schema change.
Never edit existing migrations after release.
- `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.
- **Post-1.0.0:** add new numbered migration files for each schema change.
Never edit existing migrations after release.
- All repos should have an `.editorconfig` enforcing the project's indentation
settings.

View File

@@ -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
- Or keep it in backend/ and add to .gitignore
- Set `GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceAccountKey.json` in
.env
- Or keep it in backend/ and add to .gitignore

View File

@@ -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

View File

@@ -5,24 +5,27 @@ React + Vite frontend for the on-chain monitoring and alerting system.
## Getting Started
1. Install dependencies:
```bash
npm install
```
```bash
npm install
```
2. Run the development server:
```bash
npm run dev
```
```bash
npm run dev
```
3. Build for production:
```bash
npm run build
```
```bash
npm run build
```
4. Preview production build:
```bash
npm run preview
```
```bash
npm run preview
```
## Project Structure
@@ -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.