Automated application enrollment and verification flow for Boom Screen platform.
- Prerequisites
- Installation
- Configuration
- Usage
- Project Structure
- Environment Variables
- Scripts
- Dependencies
- Node.js (v18 or higher recommended)
- npm or yarn package manager
- Access to Boom Screen API endpoints
-
Clone the repository:
git clone https://github.com/boompay/app-factory.git cd app-factory -
Install dependencies:
npm install
-
Set up environment files (see Configuration section)
The application uses environment-specific configuration files. Create environment files in the root directory:
.env.stg1- Staging environment 1.env.stg2- Staging environment 2.env.production- Production environment (if needed)
Each environment file must contain at minimum:
BASE_URL=https://api.staging.boompay.appAdditional environment variables may be required depending on your setup.
The default environment and other settings can be configured in config/app.config.ts:
export const APP_CONFIG = {
ENV: "stg1", // Default environment
// ... other settings
}- Application enrollment link should be copied from the chosen unit page.
- Important! verification template for property must be "AppFactory - DO NOT TOUCH!!!". Working with any template is not implemented yet.
The application accepts one command-line argument:
- Magic Link (required) - The application enrollment link
The environment is automatically detected from the magic link URL:
- Links containing
.staging2.→ usesstg2environment - Links containing
.staging.→ usesstg1environment - If no pattern matches → falls back to default from
APP_CONFIG.ENV
Using tsx directly:
# Environment is automatically detected from the link
tsx runner.ts "https://screen.staging.boompay.app/a/your-token"
tsx runner.ts "https://screen.staging2.boompay.app/a/your-token"Using npm scripts:
# With magic link (note the space after --)
npm start -- "https://screen.staging.boompay.app/a/your-token"
# Or using the run script
npm run run -- "https://screen.staging2.boompay.app/a/your-token"Important: Always include a space after
--when passing arguments to npm scripts. Without the space, npm will incorrectly parse the arguments.
Using npx:
npx tsx runner.ts "https://screen.staging.boompay.app/a/your-token"The runner performs the following automated steps:
- Enrollment - Enrolls a new application using the provided magic link
- Identity Verification - Creates and waits for identity verification (Fast-Track)
- Personal Details - Submits personal details information
- Housing History - Submits housing history
- Combined Income - Submits combined income information
- Move-in Date - Sets desired move-in date
- Submission Disclosure - Signs submission disclosure
- Verification Check - Waits for identity verification to complete
- Application Submission - Submits the completed application
All steps are logged, and application snapshots are saved to test data files after each major step.
boom-screen/
├── config/ # Application configuration
│ ├── app.config.ts # Main configuration file
│ └── index.ts
├── constants/ # Application constants
├── helpers/ # Helper functions (generators, utilities)
│ ├── address-generator.ts
│ ├── email-generator.ts
│ ├── name-generator.ts
│ ├── phone-generator.ts
│ └── wait-for.ts
├── models/ # Data models
│ └── app-info.model.ts
├── services/ # Core services
│ ├── api-client.ts
│ ├── auth-token-provider.ts
│ └── logger-provider.ts
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
│ ├── date-utils.ts
│ ├── errors.ts
│ ├── file-io.ts
│ ├── payload-transformer.ts
│ ├── retry.ts
│ └── validators.ts
├── workflows/ # Business logic workflows
│ ├── enrollment.service.ts
│ ├── personal-details.service.ts
│ └── verification.service.ts
├── test-data/ # Test data files (gitignored)
├── logs/ # Log files (gitignored)
├── runner.ts # Main entry point
├── env.ts # Environment loader
└── package.json
| Variable | Description | Example |
|---|---|---|
BASE_URL |
Base URL for the API | https://api.staging.boompay.app |
Additional environment variables may be required depending on your configuration.
Available npm scripts:
npm start- Run the application (same asnpm run dev)npm run dev- Run the application in development modenpm run run- Run the application
All scripts execute tsx runner.ts and can accept command-line arguments.
@faker-js/faker- Generate fake data for testingdotenv- Environment variable managementnode-fetch- HTTP clientplaywright- Browser automationwinston- Logging
@types/node- TypeScript types for Node.jstsx- TypeScript execution engine
The application uses Winston for logging. Log files are stored in the logs/ directory:
logs/auth-token-provider.log- Authentication token logslogs/boomscreen-api.log- API request/response logs
Log files are automatically cleared at the start of each run.
- Test data files (
test-data/) and log files (logs/) are gitignored - Environment files (
.env.*) are gitignored for security - The application automatically handles token refresh
- Application snapshots are saved after each major step for debugging
Ensure you have created the appropriate .env.{environment} file with the BASE_URL variable set.
Make sure you have:
- Accepted the GitHub repository invitation
- Created the repository on GitHub if it doesn't exist
- Verified your remote URL is correct:
git remote -v
Ensure the magic link is valid and contains a proper application token. The token is extracted from the last segment of the URL path.