Distributed Scientific Computing Platform — User Guide
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.
Manages users, distributes work units, verifies results, and tracks credits. You control it via the Admin API.
Runs as a background process. Users see a dashboard showing earnings, session time, and CPU usage.
Tasks generated from templates on the server. Credit value per task is set by the admin and can be changed any time.
Awarded automatically on task completion. Lifetime balance is visible in the dashboard, synced from the server.
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
# From the cashapp claude/ folder
python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements/server.txt
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"
# 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
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.
Download from python.org. Tick "Add Python to PATH" during install.
Open a terminal in the cashapp claude\ folder and run:
pip install -r requirements\client.txt
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
}
From the cashapp claude\ folder:
python run_client.py
See the Packaging section to build an installer. Once installed, users simply launch CashApp For You from the Start Menu. No Python required.
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.
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.
| Element | What 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.
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.
curl -H "Authorization: ApiKey YOUR_KEY" \
http://your-server:8000/admin/templates
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
curl -X PUT \
-H "Authorization: ApiKey YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": false}' \
http://your-server:8000/admin/templates/3
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
# 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"
curl -H "Authorization: ApiKey YOUR_KEY" \
http://your-server:8000/admin/stats
| Method | Endpoint | What 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 |
Follow these steps on a Windows machine to produce a single-file installer for end users.
# From cashapp claude\
pip install pyinstaller
pyinstaller --onefile --windowed --name cashapp run_client.py
# Output: dist\cashapp.exe
Open client\config.py and change server_url default to your live server address so users don't have to configure it themselves.
Install Inno Setup, open installer\setup.iss, and click Build → Compile. This produces installer\Output\CashAppForYou_Setup.exe.
Share CashAppForYou_Setup.exe with users. It installs the app, creates a Start Menu shortcut, and configures it to auto-start on Windows login.
| Problem | Solution |
|---|---|
| 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.