Job Description
• *OVERVIEW**
We are seeking a highly skilled Node.js/TypeScript developer with deep experience in backend systems, particularly in the gaming or financial transactions space. Our project is an established gaming platform backend (GPB) built on an Express TypeScript framework. Recent code audits and test runs have revealed numerous issues—from complex bonus and transaction logic to outdated dependencies and potential race conditions. We need someone who can address these problems, improve code quality, and ensure that our integrations (Betsoft, Endorphina, SoftSwiss) operate reliably under high-volume conditions.
• *PROJECT BACKGROUND:**
Our GPB serves API requests for casino and online gaming websites. It leverages:
- Express.js and TypeScript
- TypeORM for database interactions
- TypeDI for dependency injection
- routing-controllers for API endpoints
The system implements controller-service-repository patterns along with Redis-based session management, and it integrates with multiple game providers.
• *KEY POINTS:**
An internal analysis highlights the following key points:
- Betsoft Integration: Complex bet distribution logic, potential race conditions, and inconsistent error handling.
- Endorphina & SoftSwiss Integrations: Duplicate decimal handling, excessive logging (using console.log), and convoluted rollback logic in SoftSwiss.
- Testing & Code Quality: A high number of linting errors and test failures (unit tests pass, but E2E and integration tests indicate numerous failures). There is also a need for comprehensive unit tests, improved error handling, and dependency updates.
• *RESPONSIBILITIES:**
Audit & Refactor Code:
- Simplify and clarify bonus redemption, playthrough, and rollover logic.
- Refactor complex methods into smaller, maintainable functions.
- Remove commented-out/dead code and replace console.log statements with proper logging solutions.
Enhance Transaction Handling:
- Implement transaction isolation to prevent race conditions—especially in bet/win operations, bonus handling, and balance updates.
Improve Test Infrastructure:
- Fix existing linting issues and update the test suite to ensure accurate reporting.
- Write additional unit tests to cover edge cases (e.g., partial refunds, session timeouts).
Update Dependencies:
- Review and update out-of-date packages (e.g., AWS SDK maintenance warnings).
Documentation:
- Improve inline documentation and provide clear setup instructions for future maintenance.
• *REQUIRED SKILLS AND EXPERIENCE:**
- 3+ years of experience with Node.js and TypeScript.
- Proficiency with Express.js, TypeORM, and dependency injection frameworks (e.g., TypeDI).
- Strong background in REST API development and familiarity with decorator-based routing (routing-controllers).
- Experience with Redis for session management and handling financial transactions.
- Prior experience in the gaming/gambling domain or similar transaction-heavy environments.
- Excellent debugging skills and ability to work on legacy codebases with existing tests.
• *PREFERRED QUALIFICATIONS:**
- Experience with integrating game provider APIs (e.g., Betsoft, Endorphina, SoftSwiss).
- Familiarity with automated testing frameworks (Jest, supertest) and continuous integration.
- Experience with updating and maintaining complex backend systems.
- Ability to communicate clearly and provide detailed documentation.
• *WORK ENVIRONMENT REQUIREMENTS**
- We will supply a Windows Server VM in the nearest region that our cloud provider has to your location. ALL WORK is required to be done within this VM, including code reviews and repository clones.
- We will supply licenses to use Claude 3.7 and GitHub Copilot in the IDE (code completions and chat feature)
• *TECHNICAL NOTES AND GUIDANCE**
- Evaluate logic of bonus redemption, bonus playthrough and bonus rollover (crediting of completed bonus funds to player’s real-money balance) to ensure that the math and results produce logically correct outcomes, even if the tests appear to be passing (as the tests themselves may be flawed.)
- Evaluate transaction code and ensure transaction isolation to eliminate possible race conditions, such as multiple actions coming in at the same time for the same user. This is especially important in operations that affect balances, such as spins (bet/win operations), tracking bonus playthrough progress, and rolling over of completed bonus funds into the user’s balance.
- Dependencies are out of date in many cases. For example, during runtime of tests, we see several warnings that the AWS SDK for Javascript has been in maintenance mode since 2023. A general review and update of dependencies will be required.
NOTES - BETSOFT INTEGRATION
- The code that decides how to distribute a bet across different sources (ledger, bonuses) appears complex and could be prone to edge cases
- Some operations might be vulnerable to race conditions if multiple requests come in for the same user simultaneously.
- Add more unit tests for edge cases (e.g., partial refunds, session timeouts)
- Code simplification, especially around balance tracking
- Better validation of inputs from the Betsoft provider
- Improved error handling throughout
- Additional logging for production troubleshooting
NOTES - ENDORPHINA AND SOFTWSWISS
- Replace console.log with proper logging
- Add transaction isolation
- Refactor complex methods into smaller, focused functions
- Add more comprehensive error handling
- Add more validation of incoming data
- Implement proper unit tests for edge cases
NOTES - SOFTSWISS SPECIFIC
- Refactor the rollback logic completely
- Remove commented-out / “dead” code
- Improve transaction tracking
NOTES - ENDORPHINA SPECIFIC
- Improve session management documentation
- Enhance bonus validation logic
NOTES - ABOUT TESTS
There are many linting errors that prevent the tests from running without overrides. All of these will need to be repaired for optimal code quality. Running the tests via `npm nps test.TYPE` produces the following figures for each test type:
Unit
Test Suites: 15 passed, 15 total
Tests: 64 passed, 64 total
E2E
Test Suites: 58 failed, 1 skipped, 1 passed, 59 of 61 total
Tests: 689 failed, 45 skipped, 4 passed, 738 total
Integration
Test Suites: 11 failed, 37 passed, 48 total
Tests: 22 failed, 8 skipped, 390 passed, 420 total
Factory
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Responsibilities
- We need someone who can address these problems, improve code quality, and ensure that our integrations (Betsoft, Endorphina, SoftSwiss) operate reliably under high-volume conditions
- Express.js and TypeScript
- TypeORM for database interactions
- TypeDI for dependency injection
- routing-controllers for API endpoints
- Betsoft Integration: Complex bet distribution logic, potential race conditions, and inconsistent error handling
- Endorphina & SoftSwiss Integrations: Duplicate decimal handling, excessive logging (using console.log), and convoluted rollback logic in SoftSwiss
- Testing & Code Quality: A high number of linting errors and test failures (unit tests pass, but E2E and integration tests indicate numerous failures)
- There is also a need for comprehensive unit tests, improved error handling, and dependency updates
- *RESPONSIBILITIES:**
- Audit & Refactor Code:
- Simplify and clarify bonus redemption, playthrough, and rollover logic
- Refactor complex methods into smaller, maintainable functions
- Remove commented-out/dead code and replace console.log statements with proper logging solutions
- Enhance Transaction Handling:
- Implement transaction isolation to prevent race conditions—especially in bet/win operations, bonus handling, and balance updates
- Improve Test Infrastructure:
- Fix existing linting issues and update the test suite to ensure accurate reporting
- Write additional unit tests to cover edge cases (e.g., partial refunds, session timeouts)
- Review and update out-of-date packages (e.g., AWS SDK maintenance warnings)
- Improve inline documentation and provide clear setup instructions for future maintenance
- Experience with updating and maintaining complex backend systems
- Ability to communicate clearly and provide detailed documentation
- We will supply a Windows Server VM in the nearest region that our cloud provider has to your location
- ALL WORK is required to be done within this VM, including code reviews and repository clones
- We will supply licenses to use Claude 3.7 and GitHub Copilot in the IDE (code completions and chat feature)
- *TECHNICAL NOTES AND GUIDANCE**
- Evaluate logic of bonus redemption, bonus playthrough and bonus rollover (crediting of completed bonus funds to player’s real-money balance) to ensure that the math and results produce logically correct outcomes, even if the tests appear to be passing (as the tests themselves may be flawed.)
- Evaluate transaction code and ensure transaction isolation to eliminate possible race conditions, such as multiple actions coming in at the same time for the same user
- This is especially important in operations that affect balances, such as spins (bet/win operations), tracking bonus playthrough progress, and rolling over of completed bonus funds into the user’s balance
- Dependencies are out of date in many cases
- A general review and update of dependencies will be required
- NOTES - BETSOFT INTEGRATION
- The code that decides how to distribute a bet across different sources (ledger, bonuses) appears complex and could be prone to edge cases
- Some operations might be vulnerable to race conditions if multiple requests come in for the same user simultaneously
- Add more unit tests for edge cases (e.g., partial refunds, session timeouts)
- Code simplification, especially around balance tracking
- Better validation of inputs from the Betsoft provider
- Improved error handling throughout
- Additional logging for production troubleshooting
- NOTES - ENDORPHINA AND SOFTWSWISS
- Replace console.log with proper logging
- Add transaction isolation
- Refactor complex methods into smaller, focused functions
- Add more comprehensive error handling
- Add more validation of incoming data
- Implement proper unit tests for edge cases
- NOTES - SOFTSWISS SPECIFIC
- Refactor the rollback logic completely
- Remove commented-out / “dead” code
- Improve transaction tracking
- NOTES - ENDORPHINA SPECIFIC
- Improve session management documentation
- Enhance bonus validation logic
- There are many linting errors that prevent the tests from running without overrides
- All of these will need to be repaired for optimal code quality
Requirements
- *REQUIRED SKILLS AND EXPERIENCE:**
- 3+ years of experience with Node.js and TypeScript
- Proficiency with Express.js, TypeORM, and dependency injection frameworks (e.g., TypeDI)
- Strong background in REST API development and familiarity with decorator-based routing (routing-controllers)
- Experience with Redis for session management and handling financial transactions
- Prior experience in the gaming/gambling domain or similar transaction-heavy environments
- Excellent debugging skills and ability to work on legacy codebases with existing tests
- Experience with integrating game provider APIs (e.g., Betsoft, Endorphina, SoftSwiss)
- Familiarity with automated testing frameworks (Jest, supertest) and continuous integration
- For example, during runtime of tests, we see several warnings that the AWS SDK for Javascript has been in maintenance mode since 2023
- Tests: 64 passed, 64 total