This repository contains the solution for the SwissBorg recruitment assignment for web developers.
The solution provides two main tables:
- A table that showcases transaction data along with the calculated euro equivalent of each transaction's amount.
- A summary table that aggregates deposits & withdrawals data grouped by currency.
- A running instance of the mock data HTTP server provided in the challenge description.
- node.js
- yarn (or npm)
Before running our application, ensure you have the mock data HTTP server up and running.
-
Clone this repository:
git clone https://github.com/Dayger666/web-challenge.git
-
Navigate to the project directory:
cd [project-directory] -
Install the dependencies:
yarn install
-
Start the application:
yarn start
The application should now be running on http://localhost:3000 or another available port, if specified.
-
Language: TypeScript
- Justification: TypeScript offers static typing which ensures better code quality, detectable errors during compile time, and enhances code readability. Additionally, with type inference and interfaces, TypeScript allows for more maintainable and scalable code, which is crucial for larger and growing projects.
-
UI Library: React, AntD
- Justification:
- React: One of the most widely used libraries for building user interfaces, React provides flexibility, efficiency, and a strong community backing. Its component-based architecture ensures code reusability and easier maintenance.
- AntD: Ant Design (AntD) is a comprehensive UI design system and React component library. By using AntD, we can ensure consistent design and behavior of components, speeding up development without compromising on user experience.
- Justification:
-
State Management: Redux
- Justification: Redux provides a predictable state container for JavaScript apps. By centralizing application state, it becomes easier to manage and debug. With its strict unidirectional data flow and middleware support, it's easier to implement features like logging, caching, and persisting state. Additionally, when integrated with TypeScript, it becomes even more powerful with type-safe actions and reducers.
-
Styling: SCSS
- Justification: SCSS (Sassy CSS) is a CSS preprocessor that adds power and elegance to the basic language. It allows for variables, nested rules, and mixins, which improves maintainability, produces cleaner code, and can significantly speed up styling. Moreover, SCSS's compatibility with all versions of CSS ensures that stylesheets will work in any browser environment.
-
Libraries: Decimal.js
- Justification: When dealing with financial transaction, precision is of utmost importance. JavaScript's native number handling has several quirks due to its IEEE 754 binary floating-point standard, which can lead to precision errors. These errors, although often tiny, can have significant consequences in financial calculations. Leveraging decimal.js ensures we provide the best user experience and maintain the integrity of our operations.
- If the euro rate is not available for a transaction, the 'eur equiv' column will show 'N/A'.
- Transactions that are not completed are categorized as pending.
- The second table computes total balance by subtracting completed withdrawals from completed deposits for each currency.
- Any external data fetching error or server-related error will be handled gracefully.
- API Security: Ensure API endpoints have measures like rate limiting, authentication, and data encryption.
- Data Integrity: Introduce checks to ensure data integrity and prevent tampering.
- Performance: Optimize for large datasets with techniques like database indexing and caching.
- Concurrent Transactions: Handle concurrent transactions in high-frequency trading environments.
- Real-time Updates: Implement real-time updates for dynamic data representation (e.g rates). Or button that will update the data when pressed.
- Advanced Filtering: Offer filtering options for users to sift through transactions.
- Error Handling: Implement robust error handling and failover mechanisms.
- Data Redundancy: Ensure continuous operation with backup systems.
- Logging: For error tracking and monitoring in production, connect firebase analytics, sentry or another analogue.
- Mobile Responsiveness: Optimize for mobile device accessibility.
- Load Testing: Ensure the system's capability to handle expected user volume.