Skip to content

paysera/qa-tech-interview-challenge

Repository files navigation

🚀 Quick Start

This project uses Docker Compose to run a local service on port 8888.

📋 Steps to Run

1. Install Docker and Docker Compose

Make sure you have the following installed:

Check the installation:

docker --version
docker compose version

2. Ensure Port 8888 Is Free

Make sure port 8888 is not being used by another application.

Linux/macOS:

lsof -i :8888

Windows (PowerShell):

netstat -ano | findstr :8888

If the port is in use, stop the conflicting application or change the port in docker-compose.yml.


3. Start the Service

Run the following command from the project root:

docker compose up -d

This will start the services in detached mode (in the background).


4. Check Availability

Open your browser and go to:

👉 http://localhost:8888/

You should see the application interface or a success message.


🛑 Stopping the Service

To stop and remove the containers, networks, and volumes defined in docker-compose.yml:

docker compose down

API Specification Summary

POST /auth/login

Request:

{
  "username": "string",
  "password": "string"
}

Response:

{
  "token": "string",
  "expiresIn": "integer"
}

Status Codes:

  • 200 OK – Successful authentication
  • 401 Unauthorized – Invalid credentials

GET /accounts/{accountId}

Headers:

Authorization: Bearer {token}

Response:

{
  "accountId": "string",
  "balance": "number",
  "currency": "string"
}

Status Codes:

  • 200 OK – Account found and balance retrieved
  • 401 Unauthorized – Missing or invalid token
  • 404 Not Found – Account ID not found

POST /transfers

Headers:

Authorization: Bearer {token}

Request:

{
  "fromAccount": "string",
  "toAccount": "string",
  "amount": "string",
  "currency": "string",
  "description": "string"
}

Response:

{
  "transferId": "integer",
  "status": "string",
  "timestamp": "string"
}

Status Codes:

  • 200 OK – Transfer completed successfully
  • 400 Bad Request – Validation errors (e.g. malformed fields)
  • 401 Unauthorized – Missing or invalid token
  • 402 Payment Required – Insufficient funds
  • 404 Not Found – Account not found

GET /accounts/{accountId}/transactions

Headers:

Authorization: Bearer {token}

Query Parameters:

  • from (ISO date)
  • to (ISO date)
  • limit (number)

Response:

{
  "transactions": [
    {
      "id": "integer",
      "type": "string",
      "amount": "number",
      "currency": "string",
      "otherParty": "string",
      "description": "string",
      "timestamp": "string"
    }
  ]
}

Status Codes:

  • 200 OK – Transaction history returned
  • 401 Unauthorized – Invalid or missing token
  • 404 Not Found – Account not found

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published