Welcome to the Ledn frontend technical challenge! In this assessment, you'll embark on a unique journey that draws inspiration from the challenges our company has faced in the past and continues to address in the ever-evolving landscape of financial technology.
Our team has encountered scenarios that require a fine balance between technical prowess and creative problem-solving—qualities we believe define an exceptional frontend engineer. To make this experience both engaging and relevant, we've infused the challenge with a touch of creativity, drawing inspiration from an iconic theme.
While the scenario we present is influenced by the Star Wars universe, please note that this is merely a creative backdrop. You won't be navigating the galaxy far, far away, but rather addressing real challenges that our company has encountered or is currently grappling with.
npm install
.npm start
.ledn-reviewer
to your project once it is ready.Welcome to the Coruscant Bank's engineering department. In a galaxy far, far away, following the fall of the Empire, the financial landscape is in disarray, and you, esteemed engineer, have been entrusted with a crucial mission.
You are now responsible for managing the financial affairs of high-net-worth clients in the tumultuous aftermath of the Empire's collapse. Your role is pivotal as you navigate through the remnants of the Imperial financial system to bring order to the chaos left in its wake.
As the chosen engineer, you have access to critical information:
Clients: A roster of high-net-worth individuals whose fortunes are entwined with the fate of the galaxy.
Planets: The vast array of planets where Coruscant Bank operates, each with its unique economic challenges and opportunities.
Transactions: Detailed records of your clients' financial transactions, recorded in both the now obsolete "Imperial Crown Standard" and the widely accepted "Galactic Credit Standard".
Exchange rates: The fluctuating exchange rates between the "Imperial Crown Standard" and the "Galactic Credit Standard", adding an extra layer of complexity to financial reconciliation.
In the wake of the Empire's fall, the Republic has turned to Coruscant Bank to aid in rectifying the administrative chaos left behind. Your mission is to build the foundation of the administrative application, which will eventually ensure the seamless transition of high-net-worth clients into the new era.
Your task is to design the foundation of a user interface capable of identifying planets susceptible to uprisings and enabling proactive intervention. The objective is to build a software that assists administrators in analyzing transactions across various planets. To meet this goal, adhere to the following guidelines:
Transaction filtering:
inProgress
.Planetary ranking:
Cumulative transaction values:
Security measures:
inProgress
for a given planet to blocked
using a planet ID. This security measure is essential to prevent potential bad actors from exploiting the financial system and transferring funds to the Empire.To ensure the success of your mission, adhere to the following technical specifications:
Data format:
Technologies & languages:
React Query
to execute all the requests to the endpoints.Typescript
and React
.Testing and validation:
ExchangeRate:
rate
: Value of ICS in the GCS currencyPlanet:
id
: Unique ID of the planetresidents
: List of IDs belonging to usersUser:
id
: Unique ID of the userhomeworld
: ID of the homeworld of a userTransaction:
id
: Unique transaction IDuser
: ID of the user the transaction belongs toamount
: Amount of a given transactioncurrency
: Currency of the transaction (either ICS
or GCS
)date
: Date in ISO-8601 formatstatus
: Status of the transaction which can be inProgress
, completed
or blocked
/api/planets
{
"planets": [
{
"name": "Planet 1",
"rotation_period": "24",
"orbital_period": "365",
"diameter": "12742",
"climate": "temperate",
"gravity": "1",
"terrain": "grasslands",
"surface_water": "40",
"population": "1000000000",
"residents": [],
"films": [],
"created": "2024-01-18T12:00:00Z",
"edited": "2024-01-18T12:00:00Z",
"id": "1"
},
// ... other planets ...
]
}
/api/planets/:id
{
"name": "Planet 1",
"rotation_period": "24",
"orbital_period": "365",
"diameter": "12742",
"climate": "temperate",
"gravity": "1",
"terrain": "grasslands",
"surface_water": "40",
"population": "1000000000",
"residents": [],
"films": [],
"created": "2024-01-18T12:00:00Z",
"edited": "2024-01-18T12:00:00Z",
"id": "1"
}
/api/users
{
"users": [
{
"name": "User 1",
"height": "170",
"mass": "70",
// ... other user properties ...
"id": "1"
},
// ... other users ...
]
}
/api/users/:id
{
"name": "User 1",
"height": "170",
"mass": "70",
// ... other user properties ...
"id": "1"
}
/api/users/planet/:planetId
{
"users": [
{
"name": "User 1",
"height": "170",
"mass": "70",
// ... other user properties ...
"id": "1"
},
// ... other users ...
]
}
/api/transactions
{
"transactions": [
{
"id": "1",
"user": 1,
"amount": 100,
"currency": "GCS",
"date": "2024-01-18T12:00:00Z"
},
// ... other transactions ...
]
}
/api/transactions/:id
{
"id": "1",
"user": 1,
"amount": 100,
"currency": "GCS",
"date": "2024-01-18T12:00:00Z"
}
/api/transactions/user/:userId
{
"transactions": [
{
"id": "1",
"user": 1,
"amount": 100,
"currency": "ICS",
"date": "2024-01-18T12:00:00Z",
"status": "inProgress"
},
// ... other transactions ...
]
}
/api/transactions/users/:userIds
{
"transactions": [
{
"id": "1",
"user": 1,
"amount": 100,
"currency": "ICS",
"date": "2024-01-18T12:00:00Z",
"status": "inProgress"
},
// ... other transactions ...
]
}
Endpoint: /api/transactions/update-batch
Method: PUT
Description: Update a batch of transactions at once.
Request payload:
{
"transactions": [
{
"id": "1",
"user": 1,
"amount": 150,
"currency": "USD",
"date": "2024-01-18T12:00:00Z",
"status": "processed"
},
// ... other transactions in the batch
]
}
Response:
{
"message": "Batch of transactions updated successfully"
}
/api/exchange-rate
{
"rate": "1.123456"
}