Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
adfdb72
Update api_documentation.md
sofievargas Apr 1, 2026
6bcec0c
Added source_data so graph is created in a singular file
LW-ASU Jul 22, 2026
afa8ff2
Source loader has been tested to ensure it works
LW-ASU Jul 29, 2026
e50aa9e
Reorganization/clean up
LW-ASU Jul 29, 2026
5f7ed1c
Got UI working, struggling to get backend integrated unfortunately
LW-ASU Jul 29, 2026
fa0ecfa
Checkbox to load local sources and merge into database
LW-ASU Jul 29, 2026
3d9400f
Updated the README
LW-ASU Jul 29, 2026
1b0964a
Removed "update me" line from top
LW-ASU Jul 29, 2026
3a6be03
Added printouts for each database source (maxed at 10 entries per)
LW-ASU Jul 29, 2026
e348547
Trying to fix the search functionality, still needs work
LW-ASU Jul 29, 2026
8540e59
+ Database printout is in a .txt file now. Prints out all of the data.
LW-ASU Aug 12, 2026
239289e
+ Fixed ukrainian so it can be translated into now
LW-ASU Aug 19, 2026
6875e1d
Removed demo_load function for local import
loganwatersmith-gb Sep 1, 2026
dea7691
Added local language import functionality
loganwatersmith-gb Sep 1, 2026
e84d33b
Added UI languages for language import
loganwatersmith-gb Sep 1, 2026
39cf2ef
+ Can now search by brand, and brand info is returned (generic name, …
loganwatersmith-gb Sep 2, 2026
2866a54
+ Adds progress/status for database population, including number proc…
loganwatersmith-gb Sep 2, 2026
327f864
chore: update .gitignore, untrack pycache, and build configs
Coriannder Sep 16, 2026
318c7fb
feat(ui): add modular design system and reusable UI primitives
Coriannder Sep 16, 2026
7cdf252
feat(frontend): refactor domain components and responsive navigation
Coriannder Sep 16, 2026
e2be510
fix(backend): resolve canonical term in translate response and suppre…
Coriannder Sep 16, 2026
7c58469
style(frontend): update tailwind v4 class suggestions in components
Coriannder Sep 16, 2026
adf31d3
fix(i18n): connect TranslationPanel to useTranslation and add missing…
Coriannder Sep 17, 2026
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
Binary file modified .DS_Store
Binary file not shown.
16 changes: 14 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Project Codex — environment variables
# Copy this file to .env and fill in your values.

NEO4J_URI=bolt://127.0.0.1:7687
DRUGBANK_API_KEY=
DRUGBANK_API_BASE=https://api.drugbank.com/discovery/v1
DRUGBANK_RELEASE=API

ICD_CLIENT_ID=
ICD_CLIENT_SECRET=

NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=codexpassword
NEO4J_PASSWORD=changeme
NEO4J_DB=neo4j

RATE_LIMIT_RPM=100
LOG_LEVEL=INFO
FORCE=1
14 changes: 13 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Project Codex — environment variables
# Copy this file to .env and fill in your values.

DRUGBANK_API_KEY=
DRUGBANK_API_BASE=https://api.drugbank.com/discovery/v1
DRUGBANK_RELEASE=API

ICD_CLIENT_ID=
ICD_CLIENT_SECRET=

NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=codex-password
NEO4J_PASSWORD=changeme
NEO4J_DB=neo4j

RATE_LIMIT_RPM=100
LOG_LEVEL=INFO
FORCE=1
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Dependencies
node_modules/
.pnp
.pnp.js

# Build outputs
dist/
build/
*.egg-info/

# Python cache & virtual environments
__pycache__/
*.py[cod]
*$py.class
.venv/
venv/
ENV/

# Environment & local files
.env
.env.local
.env.*.local

# IDE & OS
.idea/
.vscode/
*.swp
*.swo
.DS_Store
Thumbs.db
75 changes: 7 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,23 @@
# codex-cli — Medical Translation Terminal

Test the backend translation engine directly from your terminal.
No frontend, no Flask, no middleware. Just Neo4j + Python.

---

## Setup (once)

### 1 — Start Neo4j
```bash
docker compose up -d
# Wait ~20 seconds for Neo4j to be ready
docker compose up --build
# Wait ~30 seconds for Neo4j, frontend, and api to be ready
# Optional: check http://localhost:7474 in a browser (login: neo4j / changeme)
```

### 2 — Install Python dependencies
```bash
pip install -r requirements.txt
```

### 3 — Run the CLI
```bash
python cli.py
```

---

## Usage

```
codex> demo ← load sample data first (run this once)
codex> ibuprofen ← type a drug name, then answer prompts
Target language code: es
Country code: MX
→ ibuprofeno (Spanish) brand: Advil [MX]

codex> paracetamol
Target language code: fr
Country code: FR
→ paracétamol (French) brand: Doliprane [FR]

codex> audit ibuprofen ← show missing translations / brands
codex> load /path/to/pack.json ← load a new language pack
codex> quit
```

### Language codes
Code - Language

`en` - English
`es` - Spanish
`fr` - French
`ru` - Russian
`uk` - Ukrainian

### Country codes
`US GB MX FR ES NG RU UA CA PL IN DE BR AU ZA`

---

## Language pack format

```json
{
"language": {"code": "pt", "name": "Portuguese"},
"terms": [
{
"canonical": "Ibuprofen",
"entries": [
{"translation": "ibuprofeno", "country": "BR", "brand": "Advil"},
{"translation": "ibuprofeno", "country": "PT", "brand": null}
]
}
]
}
```

Save as `portuguese_pack.json`, then:
```bash
codex> load portuguese_pack.json
Use http://localhost:9000 for the frontend
Use http://localhost:7474 for the Neo4j backend
Use http://localhost:8000/docs to view the API
```

---
Expand All @@ -95,7 +34,7 @@ And update `docker-compose.yml`:
NEO4J_AUTH: "neo4j/your_new_password"
```

Then restart: `docker compose down && docker compose up -d`
Then restart: `docker compose down && docker compose up -d && docker compose up --build`

---

Expand All @@ -104,5 +43,5 @@ Then restart: `docker compose down && docker compose up -d`
```bash
docker compose down -v # -v removes the data volume
docker compose up -d
# Then reload demo data: codex> demo
docker compose up --build
```
Binary file removed api/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file removed api/__pycache__/config.cpython-312.pyc
Binary file not shown.
Binary file removed api/__pycache__/db.cpython-312.pyc
Binary file not shown.
Binary file removed api/__pycache__/dependencies.cpython-312.pyc
Binary file not shown.
Binary file removed api/__pycache__/main.cpython-312.pyc
Binary file not shown.
17 changes: 0 additions & 17 deletions api/config.py

This file was deleted.

24 changes: 0 additions & 24 deletions api/models/condition.py

This file was deleted.

39 changes: 0 additions & 39 deletions api/models/drug.py

This file was deleted.

Binary file removed api/routers/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file removed api/routers/__pycache__/conditions.cpython-312.pyc
Binary file not shown.
Binary file removed api/routers/__pycache__/drugs.cpython-312.pyc
Binary file not shown.
Binary file removed api/routers/__pycache__/sources.cpython-312.pyc
Binary file not shown.
Binary file removed api/routers/__pycache__/translate.cpython-312.pyc
Binary file not shown.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions api_documentation.md → backend/api_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ Returns a list of all language codes currently stored in the system.
* **Method:** GET

* **Path:**/languages
Returns all language codes currently stored in Neo4j.

Response Example:
```json
{
"languages": ["en", "es", "fr", "pt"]
}
```

#### Error Handling
The API uses standard HTTP status codes.
Expand Down
13 changes: 13 additions & 0 deletions backend/codex_build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.10-slim

WORKDIR /app

COPY requirements.txt ./
RUN pip3 install --no-cache-dir -r requirements.txt
RUN pip3 install requests

COPY . .

EXPOSE 8000

CMD ["python3", "api.py"]
Loading