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
NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
22
+
API_BASE_URL=https://api.staging.flowfi.io
22
23
```
23
24
25
+
-`API_BASE_URL`: Overrides the Swagger UI server URL for the deployed environment (e.g., staging or production). When set, Swagger UI targets `<API_BASE_URL>/v1` instead of the hardcoded defaults.
26
+
24
27
## Prisma Database
25
28
26
29
We use Prisma as our ORM to interact with PostgreSQL.
27
30
28
31
- Schema is located at `prisma/schema.prisma`.
32
+
- Configuration (schema path, migrations path, datasource URL) is defined in `prisma.config.ts`.
29
33
- Run `npx prisma studio` to view the database through a web UI.
30
34
35
+
### Seeding the database
36
+
37
+
`prisma/seed.ts` populates the database with demo fixtures for local development. Run it with:
38
+
39
+
```bash
40
+
npm run prisma:seed
41
+
```
42
+
43
+
(this runs `prisma db seed`, which in turn runs `tsx prisma/seed.ts` as configured under the `prisma.seed` key in `package.json`.)
44
+
45
+
The script is idempotent (it uses `upsert`/fixed IDs), so it's safe to run multiple times. It creates:
46
+
47
+
- Two demo users, keyed by fixed Stellar testnet public keys — a sender (`GCM5WPR4DDR24FSAX5LIEM4J7AI3KOWJYANSXEPKYXCSZOTAYXE75AFN`) and a recipient (`GBJCHUKZMTFSLOMNC7P4TS4VJJBTCYL3XKSOLXAUJSD56C4LHND5TWUC`).
48
+
- One demo `Stream` (`streamId: 101`) between those two users, using a fixed demo token address, with a sample rate/deposit amount and `isActive: true`.
49
+
- One demo `StreamEvent` (`eventType: 'CREATED'`) attached to that stream, with sample transaction hash, ledger sequence, and metadata.
50
+
51
+
These fixtures are intended purely for local development/demo purposes so the frontend has data to render out of the box; they are not used in automated tests.
52
+
31
53
## /v1 API
32
54
33
55
All REST API endpoints are prefixed with `/v1`. Refer to the API Documentation in the root `README.md` and the `docs/` folder for versioning and authentication details.
0 commit comments