4 Commits

Author SHA1 Message Date
Ichitux 4429ec4c7f Merge pull request 'Frontend_Fixes' (#3) from Frontend_Fixes into main
Build & Push Docker Images / test-backend (push) Successful in 33s
Build & Push Docker Images / test-frontend (push) Successful in 28s
Build & Push Docker Images / deploy (push) Successful in 18s
Build & Push Docker Images / build-backend (push) Successful in 18s
Build & Push Docker Images / build-frontend (push) Successful in 31s
Reviewed-on: #3
2026-07-01 15:29:25 +00:00
Antoni Nuñez Romeu 71a34293a9 Views in frontend changed
Run Tests on Branches / Backend Tests (push) Successful in 3m28s
Run Tests on Branches / Frontend Tests (push) Successful in 3m26s
2026-07-01 17:08:15 +02:00
Ichitux 1b9494bce6 Merge pull request 'Testing steps to avoid wrong implementation' (#2) from testing into main
Build & Push Docker Images / test-backend (push) Successful in 32s
Build & Push Docker Images / test-frontend (push) Successful in 30s
Build & Push Docker Images / deploy (push) Successful in 6s
Build & Push Docker Images / build-backend (push) Successful in 19s
Build & Push Docker Images / build-frontend (push) Successful in 18s
Reviewed-on: #2
2026-07-01 14:40:47 +00:00
Ichitux 8578bac776 Merge pull request 'Rebranding app and naming' (#1) from Rebranding into main
Build & Push Docker Images / test-backend (push) Successful in 35s
Build & Push Docker Images / deploy (push) Successful in 7s
Build & Push Docker Images / build-backend (push) Successful in 2m10s
Build & Push Docker Images / build-frontend (push) Successful in 53s
Build & Push Docker Images / test-frontend (push) Successful in 30s
Reviewed-on: #1
2026-07-01 13:57:19 +00:00
8 changed files with 210 additions and 237 deletions
-20
View File
@@ -45,23 +45,3 @@ jobs:
- name: Run Frontend Tests - name: Run Frontend Tests
run: cd frontend && npm test -- --run --reporter=basic run: cd frontend && npm test -- --run --reporter=basic
test-pip:
name: PIP Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: pip-platform/package-lock.json
- name: Install PIP dependences
run: cd pip-platform && npm ci
- name: Run PIP Tests
run: cd pip-platform && npm test -- --run --reporter=basic
-5
View File
@@ -11,12 +11,7 @@
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
overscroll-behavior: contain; overscroll-behavior: contain;
}
@media (max-width: 768px) {
.app-content {
padding-bottom: calc(6rem + env(safe-area-inset-bottom)); padding-bottom: calc(6rem + env(safe-area-inset-bottom));
}
} }
@keyframes fadeInUp { @keyframes fadeInUp {
+34 -38
View File
@@ -1,25 +1,22 @@
.bottom-nav { .bottom-nav {
display: none;
}
@media (max-width: 768px) {
.bottom-nav {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: flex-end; align-items: flex-end;
position: fixed; position: fixed;
left: 0; left: 50%;
right: 0; transform: translateX(-50%);
bottom: 0; bottom: 0;
width: 100%;
max-width: 48rem;
z-index: 50; z-index: 50;
padding: 0.25rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom)); padding: 0.25rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
background: var(--surface-container-lowest); background: var(--surface-container-lowest);
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1); box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
height: 5.5rem; height: 5.5rem;
} }
.bottom-nav-item { .bottom-nav-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@@ -35,14 +32,14 @@
transition: color 0.15s; transition: color 0.15s;
position: relative; position: relative;
min-width: 3.5rem; min-width: 3.5rem;
} }
.bottom-nav-item.disabled { .bottom-nav-item.disabled {
opacity: 0.4; opacity: 0.4;
cursor: not-allowed; cursor: not-allowed;
} }
.nav-icon-wrap { .nav-icon-wrap {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -51,9 +48,9 @@
border-radius: var(--radius-full); border-radius: var(--radius-full);
color: inherit; color: inherit;
position: relative; position: relative;
} }
.nav-fab { .nav-fab {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -65,13 +62,13 @@
box-shadow: 0 4px 14px rgba(70, 0, 173, 0.35); box-shadow: 0 4px 14px rgba(70, 0, 173, 0.35);
margin-top: -1.5rem; margin-top: -1.5rem;
transition: transform 0.15s; transition: transform 0.15s;
} }
.nav-fab:active { .nav-fab:active {
transform: scale(0.92); transform: scale(0.92);
} }
.nav-badge { .nav-badge {
position: absolute; position: absolute;
top: 0; top: 0;
right: -2px; right: -2px;
@@ -87,37 +84,36 @@
border-radius: var(--radius-full); border-radius: var(--radius-full);
border: 2px solid var(--surface-container-lowest); border: 2px solid var(--surface-container-lowest);
line-height: 1; line-height: 1;
} }
.nav-label { .nav-label {
font-size: 0.7rem; font-size: 0.7rem;
font-weight: 500; font-weight: 500;
line-height: 1; line-height: 1;
color: var(--on-surface-variant); color: var(--on-surface-variant);
} }
.nav-label--active { .nav-label--active {
color: var(--primary); color: var(--primary);
font-weight: 700; font-weight: 700;
} }
.nav-indicator { .nav-indicator {
width: 0.375rem; width: 0.375rem;
height: 0.375rem; height: 0.375rem;
background: var(--primary); background: var(--primary);
border-radius: var(--radius-full); border-radius: var(--radius-full);
margin-top: 0.125rem; margin-top: 0.125rem;
} }
.bottom-nav-item.active .nav-icon-wrap { .bottom-nav-item.active .nav-icon-wrap {
color: var(--primary); color: var(--primary);
} }
.bottom-nav-item.active .nav-icon-wrap svg { .bottom-nav-item.active .nav-icon-wrap svg {
stroke-width: 2.5; stroke-width: 2.5;
} }
.nav-elevated.active .nav-label { .nav-elevated.active .nav-label {
color: var(--tertiary); color: var(--tertiary);
}
} }
+14 -20
View File
@@ -1,18 +1,13 @@
.top-bar { .top-bar {
display: none;
}
@media (max-width: 768px) {
.top-bar {
display: block; display: block;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 40; z-index: 40;
background: var(--surface); background: var(--surface);
box-shadow: 0 1px 3px rgba(0,0,0,0.06); box-shadow: 0 1px 3px rgba(0,0,0,0.06);
} }
.topbar-inner { .topbar-inner {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@@ -20,9 +15,9 @@
padding: 0 var(--margin-main); padding: 0 var(--margin-main);
max-width: 48rem; max-width: 48rem;
margin: 0 auto; margin: 0 auto;
} }
.topbar-back { .topbar-back {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -34,30 +29,29 @@
color: var(--primary); color: var(--primary);
cursor: pointer; cursor: pointer;
transition: background 0.15s; transition: background 0.15s;
} }
.topbar-back:hover { .topbar-back:hover {
background: var(--surface-container-high); background: var(--surface-container-high);
} }
.topbar-title { .topbar-title {
font-size: 1.15rem; font-size: 1.15rem;
font-weight: 700; font-weight: 700;
color: var(--primary); color: var(--primary);
letter-spacing: -0.01em; letter-spacing: -0.01em;
} }
.topbar-logo-img { .topbar-logo-img {
height: 2rem; height: 2rem;
width: auto; width: auto;
} }
.topbar-spacer { .topbar-spacer {
width: 2.5rem; width: 2.5rem;
} }
.topbar-right { .topbar-right {
display: flex; display: flex;
align-items: center; align-items: center;
}
} }
+1 -1
View File
@@ -15,4 +15,4 @@ COPY . .
EXPOSE 8000 EXPOSE 8000
CMD ["python", "entrypoint.py"] CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "4", "--loop", "uvloop", "--http", "httptools"]
@@ -19,8 +19,7 @@ class RateLimitMiddleware(BaseHTTPMiddleware):
return await call_next(request) return await call_next(request)
path = request.url.path path = request.url.path
exempt_prefixes = ("/docs", "/redoc", "/openapi", "/metrics", "/api/v1/system/health") if path.startswith("/docs") or path.startswith("/redoc") or path.startswith("/openapi") or path.startswith("/metrics"):
if any(path.startswith(p) for p in exempt_prefixes):
return await call_next(request) return await call_next(request)
client_key = self._get_client_key(request) client_key = self._get_client_key(request)
@@ -73,9 +73,7 @@ async def test_api_key_read_access():
r2 = await c.get("/api/v1/medications", headers=api_h) r2 = await c.get("/api/v1/medications", headers=api_h)
assert r2.status_code == 200 assert r2.status_code == 200
if r.json()["total"] > 0: r3 = await c.get("/api/v1/inventory", headers=api_h)
pharm_id = r.json()["items"][0]["id"]
r3 = await c.get(f"/api/v1/pharmacies/{pharm_id}/inventory", headers=api_h)
assert r3.status_code == 200 assert r3.status_code == 200
print(" PASS: test_api_key_read_access") print(" PASS: test_api_key_read_access")
@@ -75,8 +75,19 @@ async def test_rate_limit_exempt_paths():
async def test_rate_limit_per_client(): async def test_rate_limit_per_client():
async with httpx.AsyncClient(base_url=BASE_URL, timeout=30.0) as c: async with httpx.AsyncClient(base_url=BASE_URL, timeout=30.0) as c:
token = await get_admin_token(c)
h = bearer_headers(token)
r0 = await c.get("/api/v1/pharmacies", headers=h)
limit = int(r0.headers["x-ratelimit-limit"])
for _ in range(limit + 5):
r = await c.get("/api/v1/pharmacies", headers=h)
if r.status_code == 429:
break
r2 = await c.get("/api/v1/system/health") r2 = await c.get("/api/v1/system/health")
assert r2.status_code == 200, "Health endpoint should work regardless of rate limit on other paths (it is exempt)" assert r2.status_code == 200, "Health endpoint should work regardless of rate limit on other paths"
print(" PASS: test_rate_limit_per_client") print(" PASS: test_rate_limit_per_client")