Metadata-Version: 2.4
Name: assayflux
Version: 0.1.1
Summary: A cross-platform developer toolkit for generating projects, checking language toolchains, running code, validating websites, and orchestrating native and Android builds.
Author-email: Md Safarujjaman <assayflux@gmail.com>, Md Sahanujjaman <assayflux@gmail.com>
Maintainer-email: AssayFlux Scientific Systems <company@assayflux.com>
License-Expression: MIT
Project-URL: Homepage, https://www.assayflux.org
Project-URL: Official Website (.com), https://www.assayflux.com
Project-URL: Organization, https://www.assayflux.org
Project-URL: GitHub, https://github.com/AssayFlux
Keywords: AssayFlux,AssayFlux Scientific Systems,Md Safarujjaman,Md Sahanujjaman,India,West Bengal,Kolkata,build-tool,project-generator,website,android,apk,aab,multi-language,Python,C++,R,TypeScript,Go,Rust,SQL,scientific-computing,developer-tools
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=5.1; extra == "dev"
Dynamic: license-file

# AssayFlux

**Version:** 0.1.1  
**Authors:** Md Safarujjaman and Md Sahanujjaman  
**Company:** AssayFlux Scientific Systems · **Country:** India · **State:** West Bengal · **Region:** Kolkata  
**Author email:** assayflux@gmail.com · **Company email:** company@assayflux.com  
**GitHub:** [AssayFlux](https://github.com/AssayFlux)  
**Official websites:** [assayflux.org](https://www.assayflux.org) · [assayflux.com](https://www.assayflux.com)

**AssayFlux is a cross-platform developer toolkit for turning project ideas into organized, runnable software workspaces.** Its Python-powered CLI generates starter projects, checks language toolchains, plans tasks, runs supported code, validates website assets, packages source, and orchestrates Android APK/AAB builds when the required SDK and build tools are installed. It is designed to bring multiple development workflows under one consistent interface while preserving the role of each language's native runtime, compiler, and build system.

AssayFlux does not translate arbitrary source code between languages. A reported successful build means the requested build command and artifact checks succeeded; it does not replace runtime testing on a device or deployment environment.

## Project ownership and official links

- Authors: **Md Safarujjaman** and **Md Sahanujjaman**
- Author email: **assayflux@gmail.com**
- Company: **AssayFlux Scientific Systems**
- Company email: **company@assayflux.com**
- Country: **India**
- State: **West Bengal**
- Region: **Kolkata**
- GitHub: **AssayFlux** — https://github.com/AssayFlux
- Official websites: https://www.assayflux.org and https://www.assayflux.com

These details are included in package metadata and documentation where the packaging standards support them. PyPI does not provide dedicated author country, state, or region fields, so the location is documented here rather than represented as a verified package-index attribute.

## Install

```bash
python -m pip install --upgrade assayflux
assayflux --version
assayflux doctor
```

For local development:

```bash
python -m pip install -e '.[dev]'
python -m pytest -q
```

## Quick start

Create a starter website:

```bash
assayflux create MyWebsite --target website
assayflux run --project-dir MyWebsite --target website
```

Open `http://127.0.0.1:8000` in your browser. In another terminal, inspect the plan and test the project:

```bash
assayflux plan MyWebsite
assayflux test MyWebsite
assayflux build MyWebsite
```

Build output is placed in `deliverables/MyWebsite/`; the editable project remains in `MyWebsite/`.

## Wrap an existing static website into an Android APK project

AssayFlux can create an Android WebView wrapper and bundle local HTML, CSS, JavaScript, images, and other static assets into the Android project:

```bash
assayflux wrap-web MyMobileSite --source ./path/to/website --root ./mobile-projects
cd ./mobile-projects/MyMobileSite
assayflux build . --android-artifacts apk
```

The `--source` directory must contain `index.html`; a project containing `web/index.html` is also accepted. Website files are copied into `app/src/main/assets/site/`. The generated wrapper uses AndroidX WebKit's `WebViewAssetLoader`, disables direct file access, and opens external navigation in the device browser.

**Scope:** This wraps a static frontend. It does not automatically embed a Python/PHP backend, create a database server, add authentication, or integrate payment processing. Backend APIs need a separate deployment or explicit native integration. The generated Gradle project downloads its declared AndroidX WebKit dependency during a build, so the first build generally needs network access.

## Generate other project types

```bash
assayflux new DataTool --target python
assayflux new MultiTool --target python --target website --target backend
assayflux new NativeDemo --target android
```

Supported starter targets: `website`, `html`, `css`, `backend`, `cli`, `python`, `r`, `c`, `cpp`, `javascript`, `typescript`, `java`, `kotlin`, `php`, `bash`, `go`, `rust`, `sql`, and `android`. Engine detection is capability discovery; it does not imply every target is compiled by the generic `build` command.

## Scientific and multi-language starter workflows

AssayFlux 0.1.1 includes R, TypeScript, Go, Rust, and SQLite SQL starter workflows. R runtime execution still requires R and Rscript to be installed. Generate an R analysis workspace with:

```bash
assayflux new ResearchAnalysis --target r
assayflux doctor
assayflux run --project-dir ResearchAnalysis --target r
```

The generated `src/analysis.R` is a minimal working starter, not a full statistical-analysis framework. R must be installed separately and `Rscript` must be available on `PATH`. Package installation and advanced R/Python interoperability are not performed automatically.

Other added targets:

```bash
assayflux new TypeScriptDemo --target typescript  # requires tsc + Node.js
assayflux new GoDemo --target go                   # requires Go
assayflux new RustDemo --target rust               # requires rustc
assayflux new SQLDemo --target sql                 # Python standard-library SQLite, in-memory
assayflux run --project-dir SQLDemo --target sql
assayflux validate-web ./web                      # checks index.html and local referenced assets
```

`validate-web` is a lightweight sanity check; it is not a full HTML validator or security audit. TypeScript, Go, Rust, and R targets need their respective toolchains for execution.

## Toolchain setup and automatic requirements

AssayFlux's core CLI is written using the Python standard library, so a basic install does not need a separate third-party Python runtime dependency. Install the optional development tools with `python -m pip install --upgrade "assayflux[dev]"` when you need to run tests or build/publish a release.

**System toolchains are different from Python dependencies.** Java/JDK, Gradle, Android SDK/build-tools, Node.js, C/C++ compilers, PHP, and similar tools are OS-level programs with different installation methods, licenses, sizes, and permissions. `pip install assayflux` cannot safely and reliably install all of them on every Windows, macOS, Linux, Termux, and Colab environment. Run `assayflux doctor` to check what is available. For supported Android build environments, use the included setup guide/script; it installs the documented toolchain for its target environment and may download several gigabytes and request Android SDK license acceptance. Review scripts before running them and do not run them on systems where you lack administrator permission.

## Android build requirements

Android builds require a compatible JDK (17 recommended), Gradle compatible with Android Gradle Plugin 8.7.3, Android SDK platform 35 and build-tools 35.0.0, and `ANDROID_HOME` or `ANDROID_SDK_ROOT`. See [Google Colab Android setup](docs/GOOGLE_COLAB_ANDROID.md).

```bash
assayflux build . --android-artifacts apk    # debug APK
assayflux build . --android-artifacts aab    # release AAB
assayflux build . --android-artifacts both   # both
```

Release AAB signing is not configured automatically. Configure signing credentials securely before publishing. Test APKs on real devices or emulators.

## CLI commands

- `assayflux --version`, `assayflux info`
- `assayflux engines` — show registered engines and detected tools
- `assayflux doctor [--json]` — inspect local build prerequisites
- `assayflux new NAME` / `assayflux create NAME` — generate a starter workspace
- `assayflux wrap-web NAME --source DIR [--root DIR]` — bundle a static site into an Android WebView project
- `assayflux validate-web [WEBSITE_DIR]` — check `index.html` and referenced local assets
- `assayflux plan [PROJECT_DIR]` — print the task plan
- `assayflux test [PROJECT_DIR]` — run project tests
- `assayflux build [PROJECT_DIR] [--force] [--android-artifacts apk|aab|both|none]` — package source and run requested Android build tasks
- `assayflux run --project-dir DIR --target TARGET` — run a supported target

`--force` replaces only the existing delivery folder, not the editable project source. Review the destination before using it.

## Delivery report

`BUILD_REPORT.json` distinguishes `built` (requested Android artifact built and found), `source_packaged` (source snapshot packaged without a requested Android build), and `partial` (requested Android build was blocked or failed). Build stdout/stderr are retained under `logs/`; inspect them when a build fails.

## Python API

```python
from assayflux import Project

project = Project.create("ResearchPortal", root=".", targets=["website", "backend"])
project.generate()
result = project.build()
print(result.report["status"])
```

## Security and limitations

- Build, test, and run commands may execute project-local code. Do not run untrusted projects; AssayFlux is not a sandbox.
- Generated backend code is a minimal starter, not a hardened internet-facing API.
- Website-to-APK wrapping is for static frontends; server-side routes, local database services, login backends, and payments are not automatically ported.
- Generic non-Android `build` packages source; it does not claim to compile every language target.
- APK build success does not prove the app's full runtime behavior. Test the resulting app on a device/emulator.
- Release signing and store publication require separate configuration and credentials.

## Build and validate a release

```bash
python -m pip install --upgrade build twine
python -m pytest -q
python -m build
python -m twine check dist/*
```

Review [the publishing checklist](docs/PUBLISHING_CHECKLIST.md) before releasing. PyPI publishing is a separate authenticated action; building a wheel does not publish it.

## Runtime detection and setup (0.1.1)

Use `assayflux runtimes` to check Python, R/Rscript, Java, Gradle, Android SDK manager, Node.js/npm, TypeScript, PHP, Go, Rust and C/C++ compilers. `assayflux setup --target <target>` is detection-only by default. Add `--install` to display the proposed OS package-manager command without executing it; add both `--install --yes` only after reviewing that plan. Supported targets include `android`, `python`, `node`, `typescript`, `go`, `rust`, `java`, `php`, `c`, `cpp`, `r`, and `all`. Android SDK command-line tools, SDK platform/build-tools and licence acceptance may still require separate setup. See [`docs/RUNTIME_SETUP.md`](docs/RUNTIME_SETUP.md).
