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 CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ keywords:
- risk mitigation
- transparent reasoning

version: "2.4.1"
license: non-commercial
repository-code: https://github.com/dfeen87/CuraFrame
url: https://github.com/dfeen87/CuraFrame
Expand All @@ -39,5 +40,6 @@ preferred-citation:
- given-names: Don Michael
family-names: Feeney Jr.
title: CuraFrame
version: "2.4.1"
year: 2026
url: https://github.com/dfeen87/CuraFrame
44 changes: 19 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# CuraFrame: Constraint-Driven Therapeutic Design Reasoning

> **📣 Update — February 2025:** The AILEE pipeline has been reviewed and improved for greater cohesion with the CuraFrame application.

---

## Abstract
Expand Down Expand Up @@ -379,28 +377,31 @@ uvicorn apps.web.main:app --host 0.0.0.0 --port 8000

Or deploy to Render.com using the included `render.yaml`:

**Render.com deployment with persistent database**
**Render.com deployment with managed database**

CuraFrame stores users and evaluation logs in a SQLite database. On Render.com you **must** use a [Persistent Disk](https://render.com/docs/disks) so the database survives service restarts and redeploys. The included `render.yaml` already configures this automatically — here is what it does and how to set it up step-by-step:
CuraFrame stores users and evaluation logs in a managed PostgreSQL database. The included `render.yaml` provisions all services automatically — here is what it configures and how to deploy:

1. **Connect your repo to Render.com**
- Go to [render.com](https://render.com), sign in, and click **New → Blueprint**.
- Select the CuraFrame repository. Render will detect `render.yaml` and provision the services automatically.

2. **What `render.yaml` configures**
- A **web service** (`curaframe-web`) running on the **Starter plan** (required for persistent disk support).
- A **1 GB persistent disk** mounted at `/data` — the SQLite database is stored at `/data/curaframe.db` and survives restarts.
- `CURAFRAME_DB=/data/curaframe.db` — tells the app where to find/create the database.
- A **managed PostgreSQL database** (`curaframe-db`) on Render's free database plan (PostgreSQL 18).
- A **web service** (`curaframe-web`) on the **Starter plan**, with `DATABASE_URL` injected automatically from the managed database.
- `CURAFRAME_SECURE_COOKIES=1` — marks session cookies as `Secure` (required for HTTPS on Render).
- A second **web service** (`curaframe-console`) running the Streamlit console on the free plan (no database needed).
- A second **web service** (`curaframe-console`) running the Streamlit console on the free plan, also connected to the database.
Comment on lines +389 to +392
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README now states Render deploy uses a managed PostgreSQL DB via DATABASE_URL, but the FastAPI app’s SQL uses SQLite-style ? parameter placeholders (e.g., INSERT ... VALUES (?, ...)). Psycopg expects %s/pyformat placeholders, so the app will fail at runtime when pointed at Postgres. Either update the query/DB helper layer to use the correct placeholder style for Postgres (or translate ?%s when is_postgres), or adjust the deployment instructions/render.yaml to match the actually supported DB backend.

Copilot uses AI. Check for mistakes.

3. **Why the free plan is not enough for the web service**
- Render's free tier does **not** support persistent disks. A database file written to the default filesystem (`/opt/render/project/src/`) is **ephemeral** — it is wiped every time the service restarts, which means all registered users and logs would be lost. The Starter plan (~$7/month) is the minimum that supports a persistent disk.
3. **Required secret (set manually in Render dashboard)**
- `JWT_SECRET` — a cryptographically random secret used to sign authentication tokens. Generate one with:
```bash
python -c "import secrets; print(secrets.token_hex(32))"
```
Add it as an environment variable on the `curaframe-web` service before the first deploy.

4. **Manual setup (if you prefer not to use the Blueprint)**
- Create a **Web Service** with environment `Python`, build command `pip install -r requirements.txt && pip install -e .`, and start command `uvicorn apps.web.main:app --host 0.0.0.0 --port $PORT`.
- In the service settings, go to **Disks → Add Disk**, set the mount path to `/data` and size to `1 GB`.
- Add the environment variables `CURAFRAME_DB=/data/curaframe.db` and `CURAFRAME_SECURE_COOKIES=1`.
- Create a **PostgreSQL** database on Render and link it to the web service via `DATABASE_URL`.
- Add environment variables `CURAFRAME_SECURE_COOKIES=1` and `JWT_SECRET` (see above).

The database tables (`users`, `logs`, `form_submissions`) are created automatically on first startup — no manual schema migration is required.

Expand Down Expand Up @@ -794,11 +795,11 @@ See the `LICENSE` file for complete legal text.
If CuraFrame is used in research, publications, or technical reports, please cite:

```bibtex
@software{curaframe2025,
@software{curaframe2026,
title = {CuraFrame: Constraint-Driven Therapeutic Design Reasoning},
author = {Feeney, Don Michael},
year = {2025},
version = {0.1.0},
year = {2026},
version = {2.4.1},
Comment on lines +798 to +802
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citation metadata is inconsistent between CITATION.cff (family name includes "Feeney Jr.") and this BibTeX entry (author is "Feeney, Don Michael"). If the intended family name includes the suffix, consider updating the BibTeX author field to match so automated citation tooling doesn’t treat these as different authors.

Copilot uses AI. Check for mistakes.
url = {https://github.com/dfeen87/CuraFrame},
license = {Non-Commercial}
}
Expand All @@ -809,10 +810,10 @@ If CuraFrame is used in research, publications, or technical reports, please cit
For references to the constraint-based reasoning approach:

```bibtex
@misc{curaframe_methodology2025,
@misc{curaframe_methodology2026,
title = {Constraint-First Reasoning for Therapeutic Safety Assessment},
author = {Feeney, Don Michael},
year = {2025},
year = {2026},
howpublished = {GitHub Repository},
url = {https://github.com/dfeen87/CuraFrame/blob/main/docs/CONSTRAINT_REASONING.md}
}
Expand All @@ -836,7 +837,7 @@ CardiAnx-1 dual-domain therapeutic concept:

For informal references in documentation or presentations:

> "Constraint evaluation was performed using CuraFrame (Feeney, 2025), a falsification framework for therapeutic design safety assessment."
> "Constraint evaluation was performed using CuraFrame (Feeney, 2026), a falsification framework for therapeutic design safety assessment."

---

Expand Down Expand Up @@ -934,13 +935,6 @@ If you believe a design is worth pursuing, CuraFrame will tell you **where it fa

---

## License

This project is available for **non‑commercial use only** under the terms of the included LICENSE file.
Commercial use requires a separate paid license.

---

## Acknowledgments

CuraFrame's development has been informed by:
Expand Down
2 changes: 1 addition & 1 deletion cura_frame/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
See docs/PHILOSOPHY.md and docs/ETHICAL_USE.md for guiding principles.
"""

__version__ = "0.2.0"
__version__ = "2.4.1"

from .core import (
CuraFrame,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name="CuraFrame",
version="0.2.0",
version="2.4.1",
description="Constraint-driven therapeutic design reasoning framework.",
packages=find_packages(exclude=("tests", "docs", "apps")),
python_requires=">=3.9",
Expand Down
Loading