34 lines
775 B
Markdown
34 lines
775 B
Markdown
# Fregat Backend
|
|
|
|
GraphQL backend for Fregat client cabinet and manager cabinet.
|
|
|
|
## Main capabilities
|
|
|
|
- Client self-registration requests and manager review flow.
|
|
- Invite-based registration flow.
|
|
- Catalog and stock by warehouses.
|
|
- Ready-order and calculation-order flows.
|
|
- Dual approval flow (client + manager), blocking and lifecycle statuses.
|
|
- Referral links, bonus transactions and withdrawal requests.
|
|
|
|
## Local run
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
npm ci
|
|
npm run prisma:generate
|
|
npm run prisma:push
|
|
npm run seed
|
|
npm run dev
|
|
```
|
|
|
|
GraphQL endpoint: `http://localhost:4000/graphql`
|
|
|
|
## Auth model (temporary)
|
|
|
|
Pass `x-user-id` header with an existing user id.
|
|
|
|
## Deploy
|
|
|
|
Container entrypoint loads env from Vault and then applies `prisma migrate deploy` before start.
|