Skip to content

Commit 8303b66

Browse files
authored
Merge pull request #1 from topcoder-platform/develop
README update
2 parents 3814e86 + 90e6df4 commit 8303b66

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

README.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Topcoder Billing Accounts & Clients API (NestJS + Prisma, CommonJS)
1+
# Topcoder Billing Accounts & Clients API (NestJS + Prisma)
22

3-
**What you get:**
4-
- NestJS project with CommonJS `tsconfig.json`
3+
**Project structure:**
4+
- NestJS project
55
- Prisma schema for Clients, Billing Accounts, Locked & Consumed amounts
66
- Endpoints:
7-
- `GET /billing-accounts` (filter, sort, pagination, userId + clientId filters)
8-
- `POST /billing-accounts` (Admin role or M2M scopes)
7+
- `GET /billing-accounts`
8+
- `POST /billing-accounts`
99
- `GET /billing-accounts/:billingAccountId` (includes locked/consumed arrays + budget totals)
1010
- `PATCH /billing-accounts/:billingAccountId`
1111
- `PATCH /billing-accounts/:billingAccountId/lock-amount` (0 amount = unlock)
@@ -14,9 +14,9 @@
1414
- `GET /clients/:clientId`
1515
- `PATCH /clients/:clientId`
1616

17-
**Auth**
18-
- Express-style JWT middleware via `tc-core-library-js` attaches `req.authUser`
19-
- Guards for Roles (e.g., `Administrator`) and Scopes (M2M) are provided.
17+
**Authorization**
18+
- JWT middleware via `tc-core-library-js` attaches `req.authUser`
19+
- Guards for Roles (e.g., `Administrator`) and M2M Scopes are provided.
2020
- Configure env: `AUTH_SECRET` or `AUTH0_URL/AUDIENCE/ISSUER` as needed.
2121

2222
## Quickstart
@@ -25,13 +25,11 @@
2525
cp .env.example .env
2626
# edit .env and set DATABASE_URL, auth vars, etc.
2727

28-
npm i
29-
npm run prisma:generate
30-
npm run prisma:migrate
28+
pnpm i
29+
pnpm run prisma:generate
30+
pnpm run prisma:migrate
3131

32-
npm run dev
32+
pnpm run dev
3333
# or
34-
npm run build && npm start
34+
pnpm run build && pnpm start
3535
```
36-
37-
> If you need integer IDs for billing accounts/clients, switch `id` fields in `prisma/schema.prisma` to `BigInt` and adjust DTOs accordingly.

0 commit comments

Comments
 (0)