Skip to content

Fix/devex security platform improvements#459

Open
dami-005 wants to merge 4 commits into
Vatix-Protocol:mainfrom
dami-005:fix/devex-security-platform-improvements
Open

Fix/devex security platform improvements#459
dami-005 wants to merge 4 commits into
Vatix-Protocol:mainfrom
dami-005:fix/devex-security-platform-improvements

Conversation

@dami-005

Copy link
Copy Markdown

Summary

Related issue

Closes #369
closes #370
closes #371
closes #372

Type of change


FILES CHANGED

  • docker-compose.yml (new — root level)
  • apps/api/Dockerfile (new)
  • apps/web/Dockerfile (new)
  • .dockerignore (new)
  • .github/workflows/ci.yml
  • apps/api/src/transactions/transactions.controller.ts
  • apps/api/src/transactions/transactions.types.ts
  • apps/api/src/transactions/transactions.controller.spec.ts
  • package.json

What was done

  1. Docker Compose (api + web + redis + postgres)
    Created a root-level docker-compose.yml with all four services. Added apps/api/Dockerfile (multi-stage NestJS build) and apps/web/Dockerfile (Next.js standalone build), plus .dockerignore to exclude node_modules, .next, .git, etc. from the build context.

  2. CI e2e job with test database
    Added an e2e job to .github/workflows/ci.yml that spins up a dedicated swyft_e2e Postgres database and Redis, runs migrations against it, then executes pnpm --filter api test:e2e. Also added the missing db:migrate:deploy script to root package.json (referenced by existing CI jobs but never defined).

  3. Swagger document transactions endpoint
    Converted SubmitTransactionDto and TransactionResult from plain interfaces to decorated classes (@ApiProperty, @IsString, @isnotempty). Added @ApiBody, @apiresponse (200/400/401/422) decorators to the POST /transactions handler so the endpoint is fully documented in the generated OpenAPI spec.

  4. JWT guard on portfolio mutations
    Added @UseGuards(JwtAuthGuard) and @ApiBearerAuth() to TransactionsController — since submitting a signed XDR transaction is a portfolio-mutating operation (it creates/closes positions and executes swaps). The controller spec was updated to override the guard with a pass-through so unit tests continue working without a real JWT.

  • Bug fix
  • New feature
  • Docs update
  • Chore / refactor

Checklist

  • CI passes (lint + tests + build)
  • Self-reviewed the diff
  • Added or updated tests where relevant
  • Docs updated if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JWT guard on portfolio mutations Swagger document transactions endpoint CI e2e job with test database Docker compose for api web redis postgres

1 participant