You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`apiId` (optional): filters to one API (must belong to authenticated developer)
38
+
-`includeTop` (optional): set to `true` to include `topEndpoints` and anonymized `topUsers`
39
+
=======
23
40
- Enforces one vault per user per network.
24
41
-`balanceSnapshot` is stored in smallest units using non-negative integer `bigint` values.
25
42
-`findByUserId` is network-aware and returns the vault for a specific user/network pair.
43
+
>>>>>>> main
26
44
27
45
## Local setup
28
46
@@ -34,8 +52,21 @@ API gateway, usage metering, and billing services for the Callora API marketplac
34
52
npm install
35
53
npm run dev
36
54
```
55
+
<<<<<<< HEAD
56
+
57
+
3. API base: `http://localhost:3000`
58
+
### Docker Setup
59
+
60
+
You can run the entire stack (API and PostgreSQL) locally using Docker Compose:
61
+
62
+
```bash
63
+
docker compose up --build
64
+
```
65
+
The API will be available at http://localhost:3000, and the PostgreSQL database will be mapped to local port 5432.
66
+
=======
37
67
38
68
3. API base: [http://localhost:3000](http://localhost:3000). Example: [http://localhost:3000/api/health](http://localhost:3000/api/health).
69
+
>>>>>>> main
39
70
40
71
## Scripts
41
72
@@ -47,6 +78,15 @@ API gateway, usage metering, and billing services for the Callora API marketplac
47
78
|`npm test`| Run unit tests |
48
79
|`npm run test:coverage`| Run unit tests with coverage |
49
80
81
+
### Observability (Prometheus Metrics)
82
+
83
+
The application exposes a standard Prometheus text-format metrics endpoint at `GET /api/metrics`.
84
+
It automatically tracks `http_requests_total`, `http_request_duration_seconds`, and default Node.js system metrics.
85
+
86
+
#### Production Security:
87
+
In production (NODE_ENV=production), this endpoint is protected. You must configure the METRICS_API_KEY environment variable and scrape the endpoint using an authorization header:
88
+
Authorization: Bearer <YOUR_METRICS_API_KEY>
89
+
50
90
## Project layout
51
91
52
92
```text
@@ -62,6 +102,12 @@ callora-backend/
62
102
63
103
## Environment
64
104
105
+
<<<<<<< HEAD
106
+
-`PORT` — HTTP port (default: 3000). Optional for local dev.
107
+
108
+
This repo is part of [Callora](https://github.com/your-org/callora). Frontend: `callora-frontend`. Contracts: `callora-contracts`.
109
+
=======
65
110
-`PORT` - HTTP port (default: 3000). Optional for local dev.
66
111
67
112
This repo is part of [Callora](https://github.com/your-org/callora). Frontend: `callora-frontend`. Contracts: `callora-contracts`.
0 commit comments