CashApp For You

Distributed Scientific Computing Platform — User Guide

Client: Windows Server: Linux Python 3.11+

🌐 How It Works

CashApp For You is a distributed computing platform. Users install the Windows client, which uses their CPU to perform scientific calculations (prime number searches, Monte Carlo simulations, matrix factorisations). Each completed task earns credit points tracked on the server.

🖥️ Server (Linux)

Manages users, distributes work units, verifies results, and tracks credits. You control it via the Admin API.

💻 Client (Windows)

Runs as a background process. Users see a dashboard showing earnings, session time, and CPU usage.

📋 Work Units

Tasks generated from templates on the server. Credit value per task is set by the admin and can be changed any time.

🏆 Credits

Awarded automatically on task completion. Lifetime balance is visible in the dashboard, synced from the server.

🐧 Server Setup (Linux)

1 — Requirements

Python 3.11 or later. Install it on Ubuntu/Debian with:

sudo apt update && sudo apt install python3.11 python3.11-venv python3-pip -y

2 — Install dependencies

# From the cashapp claude/ folder
python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements/server.txt

3 — Set environment variables

⚠️

Change both values before going live. Anyone with ADMIN_API_KEY can modify rewards and view all stats.

export SECRET_KEY="replace-with-a-long-random-string"
export ADMIN_API_KEY="replace-with-your-admin-password"

4 — Start the server

# Development
uvicorn server.main:app --reload --host 0.0.0.0 --port 8000

# Production (4 worker processes)
uvicorn server.main:app --workers 4 --host 0.0.0.0 --port 8000

5 — Run as a systemd service (recommended)

Create /etc/systemd/system/cashapp.service:

[Unit]
Description=CashApp For You Server
After=network.target

[Service]
User=www-data
WorkingDirectory=/path/to/cashapp claude
Environment=SECRET_KEY=your-secret
Environment=ADMIN_API_KEY=your-admin-key
ExecStart=/path/to/cashapp claude/venv/bin/uvicorn server.main:app \
          --workers 4 --host 0.0.0.0 --port 8000
Restart=always

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now cashapp
sudo systemctl status cashapp
ℹ️

The first time the server starts it automatically seeds 10 default task templates in the database. You can change their credit values at any time via the Admin API.

🪟 Client Setup (Windows)

Option A — Run from source (development)

1

Install Python 3.11+

Download from python.org. Tick "Add Python to PATH" during install.

2

Install client dependencies

Open a terminal in the cashapp claude\ folder and run:

pip install -r requirements\client.txt
3

Point the client at your server

Edit client\config.json (created on first run) and set server_url:

{
  "server_url": "http://YOUR_SERVER_IP:8000",
  "cpu_limit_percent": 50,
  "poll_interval_seconds": 5
}
4

Launch the client

From the cashapp claude\ folder:

python run_client.py

Option B — Install from .exe (end users)

See the Packaging section to build an installer. Once installed, users simply launch CashApp For You from the Start Menu. No Python required.

First run — Login / Register

A sign-in window appears. New users choose Register; returning users choose Login. The session token is saved locally — you won't be asked again on subsequent starts.

📊 Using the Dashboard

The dashboard opens automatically when the app starts. If you close it, it hides to the system tray — right-click the green tray icon and choose Open Dashboard to bring it back.

ElementWhat it shows
Status indicator ● Running — computing tasks  |  ● Paused — worker paused  |  ● Idle — waiting for next task
Session time How long the client has been connected this session (resets when the app restarts).
Lifetime credits Total credits earned across all sessions, fetched from the server every 30 seconds.
This session Credits earned since the app last opened.
Units (lifetime / session) Number of tasks completed — all time and this session.
CPU usage bar Live CPU usage of the compute process. Turns orange above 65 %, red above 85 %.
Compute Intensity slider Sets the CPU limit (5 %–100 %). Drag right for more credits per hour; drag left to keep the PC responsive. Changes save automatically.
Pause / Resume button Temporarily stops the worker without closing the app. Credits stop accumulating while paused.
Hide to tray Closes the window but keeps the worker running in the background.
💡

The slider change is instant — no restart needed. Slide it to 100 % while you sleep to maximise earnings, then drop it back to 30–50 % during normal use.

🔑 Admin API — Managing Rewards

All admin endpoints are at /admin/ and require your ADMIN_API_KEY in the Authorization header. You can also use the interactive docs at http://your-server:8000/docs.

List all task templates (and their credit values)

curl -H "Authorization: ApiKey YOUR_KEY" \
     http://your-server:8000/admin/templates

Change the credit value of a template

Find the template's id from the list above, then:

curl -X PUT \
     -H "Authorization: ApiKey YOUR_KEY" \
     -H "Content-Type: application/json" \
     -d '{"credit_value": 5.0}' \
     http://your-server:8000/admin/templates/3

Disable a task type entirely

curl -X PUT \
     -H "Authorization: ApiKey YOUR_KEY" \
     -H "Content-Type: application/json" \
     -d '{"enabled": false}' \
     http://your-server:8000/admin/templates/3

Add a new task template

curl -X POST \
     -H "Authorization: ApiKey YOUR_KEY" \
     -H "Content-Type: application/json" \
     -d '{"label":"Big Monte Carlo","task_type":"monte_carlo_pi",
        "payload":"{\"samples\":5000000}","credit_value":8.0}' \
     http://your-server:8000/admin/templates

Manually push new work units into the queue

# Push 50 units from enabled templates
curl -X POST \
     -H "Authorization: ApiKey YOUR_KEY" \
     "http://your-server:8000/admin/work-units/generate?batch_size=50"

View platform statistics

curl -H "Authorization: ApiKey YOUR_KEY" \
     http://your-server:8000/admin/stats

Admin API reference

MethodEndpointWhat it does
GET /admin/templates List all task templates
POST /admin/templates Create a new template
PUT /admin/templates/{id} Update label, credit value, enabled state, or payload
DELETE/admin/templates/{id} Delete a template
POST /admin/work-units/generate Manually fill the work queue
GET /admin/stats Platform-wide statistics

📦 Packaging the Client (.exe Installer)

Follow these steps on a Windows machine to produce a single-file installer for end users.

1

Build the executable with PyInstaller

# From cashapp claude\
pip install pyinstaller
pyinstaller --onefile --windowed --name cashapp run_client.py
# Output: dist\cashapp.exe
2

Edit the server URL before building

Open client\config.py and change server_url default to your live server address so users don't have to configure it themselves.

3

Compile the installer with Inno Setup

Install Inno Setup, open installer\setup.iss, and click Build → Compile. This produces installer\Output\CashAppForYou_Setup.exe.

4

Distribute the installer

Share CashAppForYou_Setup.exe with users. It installs the app, creates a Start Menu shortcut, and configures it to auto-start on Windows login.

🔧 Troubleshooting

ProblemSolution
Login fails — "connection refused" Check the server is running and server_url in config.json matches the server IP and port.
Dashboard shows "—" for lifetime credits The balance fetch from the server failed. Check your network connection. It retries every 30 s.
CPU bar stays at 0 % The worker may be paused or waiting for a task. Check the status label below the bar.
No work units available (503 error) All templates may be disabled. Use the Admin API to enable templates or push new work units manually.
ADMIN_API_KEY not configured (500 error) Set the ADMIN_API_KEY environment variable on the server before starting uvicorn.
Tray icon does not appear On Windows 11 the icon may be hidden. Click the arrow in the taskbar corner to reveal hidden tray icons.
Client crashes on startup (import error) Run pip install -r requirements\client.txt again. A package may have failed to install.
Want to log out and use a different account Delete client\client.db and restart the app. The login dialog will appear again.
ℹ️

All server logs go to the terminal where uvicorn runs. Client logs print to stdout — if running from source, keep that terminal open during debugging.