Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .claude/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "web-ui",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "api"],
"port": 3010
}
]
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ note
.DS_Store
.playwright-chromium-installed
.stfolder/
.env
.env
scheduled_tasks.json
9 changes: 9 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ export default tseslint.config(
'preserve-caught-error': 'off'
}
},
// Browser-side dashboard code
{
files: ['public/**/*.js'],
languageOptions: {
globals: {
...globals.browser
}
}
},
// Must come last: disables ESLint rules that conflict with Prettier formatting
prettier
)
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"create-docker": "docker build -t microsoft-rewards-script-docker .",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "node --test scripts/api/logParser.test.js tests/*.test.mjs",
"test:log-parser": "node --test scripts/api/logParser.test.js",
"test:abort": "node --test tests/abort.test.mjs",
"format": "prettier --write .",
"format:check": "prettier --check .",
"clear-diagnostics": "rimraf diagnostics",
Expand Down
66 changes: 66 additions & 0 deletions public/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Web UI for Microsoft Rewards Script

A simplified, accessible web interface for managing Microsoft Rewards accounts.

## Features

- **Add accounts with email only** - no coding knowledge required
- **Real-time dashboard** - view server status and account statistics
- **Account queue** - see all accounts ready to execute
- **Live point balance** - track points for each account
- **Status tracking** - see which accounts are logged in, expired, or not logged in
- **Selective execution** - choose which accounts to run with checkboxes
- **Responsive design** - works on desktop, tablet, and mobile

## Setup

1. Start the API server:

```bash
npm run api
```

2. Open your browser to:

```
http://127.0.0.1:3010
```

3. Add accounts using the email form
4. Select accounts and click "Run Selected"

## Configuration

The Web UI connects to the Control API at `http://127.0.0.1:3010` by default.

To change the API URL, edit `public/app.js`:

```javascript
const API_BASE_URL = 'http://your-server:3010'
```

## How It Works

- Accounts are stored in browser localStorage for persistence
- The UI polls the API every 5 seconds for status updates
- Point balances and run history come from the Control API
- Account credentials remain in your `.env` file (not exposed to the UI)

## Adding Accounts to .env

After adding an account via the UI, you still need to add credentials to `.env`:

```env
ACCOUNT_1_EMAIL=email@example.com
ACCOUNT_1_PASSWORD=your_password
```

Then rebuild: `npm run build`

## Accessibility

- Keyboard navigable
- Screen reader compatible
- ARIA labels on interactive elements
- High contrast color scheme
- Focus indicators on all controls
Loading