Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [kukirin-ui]
custom: ["https://checkout.revolut.com/pay/d25ddfdd-7351-465b-afb6-c6238f65c575"]
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Bug Report
description: Report a bug in Nullcloud (server, Termux scripts, Web UI, or extension)
title: "[Bug]: "
labels: ["bug"]
body:
- type: textarea
id: problem
attributes:
label: What happened?
description: Describe the issue and which entry point you used (Share Sheet, Web UI, or Browser Extension).
validations:
required: true
- type: input
id: device
attributes:
label: Device, OS & RAM
placeholder: "e.g. Pixel 7a (8GB RAM, Termux F-Droid) or macOS 15 (Ollama)"
- type: textarea
id: logs
attributes:
label: Relevant logs
description: Paste output from `~/nullcloud-api.log` or `~/nullcloud-llm.log` (never include your token or license key).
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Feature Request
description: Suggest an improvement for Nullcloud Free Core or Pro Hub
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: textarea
id: summary
attributes:
label: Feature description
description: How does this improve the on-device, no cloud AI experience?
validations:
required: true
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Summary
Describe what changed and why.

## Checklist
- [ ] Preserves strict **"on-device, no cloud AI"** branding (never "air-gapped")
- [ ] Keeps unified `setup.sh` and all three entry points (Share Sheet, Web UI, Extension) working
- [ ] Automated tests (`pytest` and `bash tools/qa/verify-all.sh`) pass
- [ ] No secrets, tokens, or private keys committed
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI & QA Gate

on:
push:
branches: ["main", "cursor/**"]
pull_request:
workflow_dispatch:

jobs:
verify:
name: Verify Server, Scripts, Extension & Offline Licensing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r server/requirements.txt pytest

- name: Run QA Gate & Pytest Suite
run: bash tools/qa/verify-all.sh
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Python / Flask
__pycache__/
*.py[cod]
*$py.class
.venv/
venv/
.pytest_cache/

# Nullcloud local runtime & secrets
.nullcloud-token
.nullcloud-pro.key
.nullcloud-library.db
.nullcloud-presets.json
.nullcloud-compute.json
.nullcloud-last.txt
.nullcloud-last.json
nullcloud-models/
*.gguf
*.gguf.part
*.log
*.pid

# License private keys (NEVER commit private keys)
tools/license/keys/private.pem
*.pem
*.key

# OS / Editor
.DS_Store
Thumbs.db
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Changelog

All notable changes to this project are documented here.

## [1.2.0] - 2026-10-13

### Changed
- Product name is **Nullcloud** everywhere (UI, extension, scripts, docs, license prefix `NULLCLOUD-`, and local paths such as `~/.nullcloud-pro.key` and `~/nullcloud-models`).
- Pro, remote setup, and the Pro + setup bundle are sold only through fixed Revolut checkout links (€19, €30, and €45). Tailscale private cloud (€60-80) and team consulting (from €250) are quoted by email. The buyer pays, then emails the payment confirmation; the license key is sent manually.

## [1.1.0] - 2026-10-13

### Added
- **Unified One-Command Setup (`setup.sh`):** Auto-detects Android Termux vs Desktop (macOS/Linux) and deploys all three entry points (Android Share Sheet, Web UI, and Browser Extension).
- **Mobile & Desktop CPU + GPU Hyper-Optimization (`termux/setup.sh`, `termux/start.sh`, `desktop/start.sh`):** Automatically detects 4GB RAM (`Llama-3.2-1B-Instruct Q4_K_M`) vs 6GB+ RAM (`Llama-3.2-3B-Instruct Q4_K_M`), detects mobile/desktop GPUs (Snapdragon Adreno, Arm Mali/Immortalis, Apple Metal, NVIDIA CUDA, AMD ROCm, Vulkan/OpenCL), enables GPU layer offload (`-ngl`), Flash-Attention (`--flash-attn`), quantized KV cache (`q8_0`/`q4_0`), and caps CPU big.LITTLE performance threads for sustained 5–15+ tok/s on-device.
- **In-App CPU + GPU Tuning Controls (`server/server.py`, `server/ui.html`, `extension/`):** Added `/hardware` endpoint and live UI controls to switch between Full GPU Offload (`-ngl 99`), Balanced Hybrid CPU+GPU (`-ngl 16`), Light Mobile GPU Assist (`-ngl 8`), and CPU-Only (`-ngl 0`), plus CPU thread count tuning.
- **Airplane Mode & Offline Enhancements:** Cached/saved page lookup when offline in URL mode, direct text/PDF analysis in Airplane Mode, and full-page offline extraction from open browser tabs.
- **Enhanced Android Share Sheet (`termux/termux-url-opener`):** Supports shared links, selected text, and local PDF files; adds thermal safety guard (45°C pause) and interactive notification action buttons (**Copy** and **Open UI**).
- **Nullcloud Pro Productivity Hub & Private Cloud (`server/server.py`, `server/ui.html`, `extension/`):**
- Offline ECDSA P-256 license verification (`tools/license/keygen.mjs`, `sign.mjs`, `verify.mjs`).
- Saved-page library with SQLite FTS5 full-text search (`/library`).
- On-device PDF input extraction (`/analyze` with `pdf_base64`).
- Custom prompt presets (`/presets`) plus pre-built high-compliance templates for Law Firms, Journalists, and Medical Clinics.
- Tailscale Private Cloud mode (`TAILSCALE=1`) turning the phone into a private AI server accessible from a laptop.
- **Monetization & Compliance Docs:** Added `docs/CONSULTING.md`, `docs/MONETIZATION.md`, `.github/FUNDING.yml`, CI test suite, and QA gates.
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Contributing to Nullcloud

Thanks for your interest in Nullcloud!

## Core Principles

1. **On-Device, No Cloud AI:** Every analysis runs on the user's own phone or computer. Never describe the project as "air-gapped" (phones connect to the internet); always describe it accurately as **"on-device, no cloud AI"** with **Airplane Mode** support.
2. **Android Share Sheet First:** The Android Share Sheet -> Termux -> summary notification workflow is our primary unique wedge. Keep it fast, reliable, and extension-free.
3. **Unified Simplicity:** `bash setup.sh` must deploy all three entry points (Browser Extension backend, Web UI, and Android Share Sheet) cleanly.
4. **Mobile CPU + GPU Speed (5–15+ tok/s):** Keep default prompts, GPU layer offload (`-ngl`), and CPU thread/context budgets lean so Llama 3.2 1B (4GB RAM) and 3B (6GB+ RAM) run smoothly on real phones.

## Development & Testing

1. Install Python 3 and dependencies:
```bash
pip install -r server/requirements.txt pytest
```
2. Run the automated test suite and QA gate:
```bash
pytest
bash tools/qa/verify-all.sh
```
3. Do not commit secrets, private signing keys (`private.pem`), tokens, or model weights (`.gguf`).
4. By contributing, you agree that your work is released under the [MIT License](LICENSE).
62 changes: 62 additions & 0 deletions LAUNCH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Worldwide Launch & Monetization Playbook

## Positioning & Core Rules

1. **Own the "Airplane Mode" Niche:**
- Emphasize that the AI runs **100% offline on a phone**—a capability very few projects demonstrate live.
- **Strict Branding Rule:** Never call it "air-gapped" (because a phone connects to the internet). Brand it strictly and consistently as **"on-device, no cloud AI"**.
2. **Double Down on the Android Share Sheet:**
- The Android Share Sheet integration (`Share -> Termux -> summary notification`) that works in any app without needing a mobile browser extension is our primary unique wedge.
3. **Unified Simplicity:**
- Maintain the single `bash setup.sh` command that deploys all three entry points at once (Browser Extension backend, Web UI, and Android Share Sheet).
4. **Hyper-Optimize the Mobile Experience (CPU + GPU):**
- Pre-configure `Llama-3.2-1B-Instruct Q4_K_M` (4 GB RAM) and `Llama-3.2-3B-Instruct Q4_K_M` (6 GB+ RAM) with both **GPU layer offload (`-ngl`, Vulkan / OpenCL on Adreno & Mali)** and **CPU big.LITTLE thread capping + quantized KV cache (`q8_0`/`q4_0`) + Flash-Attention** so phones hit **5–15+ tokens/second** out of the box.

---

## Monetization Execution Plan

### 1. Target High-Compliance Consulting First (Fastest Path to Early Revenue)
- **Who:** Law firms, investigative journalists/newsrooms, and medical clinics (`docs/CONSULTING.md`).
- **Why they pay:** Strict data-handling, attorney-client privilege, confidential source protection, and clinical privacy rules forbid pasting sensitive documents into cloud LLMs.
- **Offer:** Fixed-scope turn-key onboarding, hardware-tuned mobile + workstation installation, Tailscale Private Cloud fleet setup, and bespoke domain prompt presets.

### 2. Ship the Premium Productivity Hub ("Nullcloud Pro")
- **Checkout (Revolut only):**
- Nullcloud Pro license, €19 one-time: https://checkout.revolut.com/pay/d25ddfdd-7351-465b-afb6-c6238f65c575
- Remote setup, €30: https://checkout.revolut.com/pay/ee0aad48-1ff6-452b-9470-01ae6db706a4
- Pro + setup bundle, €45: https://checkout.revolut.com/pay/c60fa94d-e094-4c1f-aac4-ae04c4776c52
- Tailscale private cloud (€60-80) and team consulting (from €250): email Pozun.alen96@gmail.com for a quote.
- **Flow:** The buyer pays via the link, then emails Pozun.alen96@gmail.com with the payment confirmation. The license key is sent manually.
- **Offline Cryptographic Key:** Issued with `node tools/license/sign.mjs --ref ORDER-ID --sku pro` and verified 100% offline in `server/server.py` (ECDSA P-256, zero phone-home).
- **Pro Features Locked Behind License:**
1. **Saved-Page Library with Search:** Local SQLite FTS5 index (`~/.nullcloud-library.db`) searching across titles, URLs, page text, and summaries offline.
2. **PDF Input Capabilities:** Upload or share any PDF for on-device extraction and summarization.
3. **Custom Prompt Presets:** Built-in Legal, Journalism, Clinical, and Executive templates plus user-defined presets.
4. **Private Cloud Server (`TAILSCALE=1`):** Turns the user's phone into an encrypted private AI server accessible from their laptop via Tailscale.

### 3. Leverage the Free MIT Core for Distribution
- Keep the core MIT-licensed with zero crippleware on standard single-page summarization so it spreads organically on Hacker News, `r/LocalLLaMA`, `r/termux`, `r/privacy`, and `r/selfhosted`.
- Enable community support via **GitHub Sponsors** (`.github/FUNDING.yml`). The custom funding link is the €19 Pro checkout.

---

## Hero Assets Before Posting

1. **20-Second "Airplane Mode" Video:**
- Show phone -> swipe down Quick Settings -> **Airplane Mode ON** -> tap Share -> Termux (or click Run in Web UI) -> summary streams in at 10+ tok/s -> notification pops up.
2. **Real Device Benchmarks (`bash termux/bench.sh 20`):**
- Run 20 iterations in Airplane Mode with charger unplugged and record tok/s, seconds/article, battery drop, and temperature delta.

---

## Launch Schedule

| Day | Channel | Angle |
|---|---|---|
| **Day 1** (Tue–Thu, 14:00–16:00 UTC) | **Hacker News (`Show HN`)** | *"Show HN: Nullcloud – Summarize any page with an LLM running on your phone (on-device, no cloud AI)"* |
| **Day 1** | **`r/LocalLLaMA`** | Benchmarks: Llama 3.2 1B & 3B tok/s on 4GB–6GB RAM phones (CPU big.LITTLE + Vulkan/OpenCL GPU `-ngl`), KV cache tuning, battery/thermal numbers |
| **Day 2** | **`r/termux`, `r/selfhosted`, `r/privacy`** | Tailored posts: `termux-url-opener` share sheet, Tailscale Private Cloud, zero telemetry |
| **Day 2** | **`r/androidapps`, XDA Forums** | Android Share Sheet -> private summary notification in any browser without extensions |
| **Day 3** | **X, Mastodon, Bluesky** | 20-second Airplane Mode video + benchmark table + repo link |
| **Days 4–7** | **Product Hunt, Dev.to** | *"How I turned my Android phone into a private Tailscale AI server running Llama 3.2"* |
9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2026 Alen Požun (kukirin-ui)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Binary file removed Nullcloud.zip
Binary file not shown.
Loading
Loading