feat(fullstack): implement observability and redesign frontend UI
Build & Push Docker Images / test-backend (push) Failing after 36s
Build & Push Docker Images / test-frontend (push) Successful in 29s
Build & Push Docker Images / build-backend (push) Has been skipped
Build & Push Docker Images / build-frontend (push) Has been skipped
Build & Push Docker Images / deploy (push) Successful in 7s
Build & Push Docker Images / test-backend (push) Failing after 36s
Build & Push Docker Images / test-frontend (push) Successful in 29s
Build & Push Docker Images / build-backend (push) Has been skipped
Build & Push Docker Images / build-frontend (push) Has been skipped
Build & Push Docker Images / deploy (push) Successful in 7s
This commit introduces comprehensive observability for both backend and frontend, alongside a major UI/UX overhaul to align with modern design standards (Material 3 inspired) and improve localization. Backend changes: - Integrated OpenTelemetry SDK for distributed tracing. - Added Pino for structured JSON logging with OTel instrumentation for trace/span correlation. - Configured OTLP exporters to route traces and logs to Grafana Alloy. - Updated docker-compose to include necessary environment variables for observability. Frontend changes: - Integrated Grafana Faro for Real User Monitoring (RUM), capturing Web Vitals, JS errors, and user interactions. - Redesigned the entire UI using a new color palette and Material 3 design principles. - Refactored component architecture (App, Home, Search, Scanner, Profile, Alerts views) for better state management and navigation. - Improved mobile UX with a redesigned Bottom Navigation bar and Top Bar. - Localized the interface to Spanish (es). - Updated assets, icons, and PWA configuration (manifest, icons). - Refactored CSS to use a centralized design token system (CSS variables). Observability enables better debugging and performance monitoring across the entire stack.
This commit is contained in:
+11
-401
@@ -1,419 +1,29 @@
|
||||
.app {
|
||||
height: 100dvh;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
padding: 3rem 1.5rem;
|
||||
max-width: 1000px;
|
||||
max-width: 48rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.view-switcher {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background: var(--surface);
|
||||
padding: 5px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--border);
|
||||
box-shadow: var(--glass-shadow);
|
||||
width: fit-content;
|
||||
margin: 0 auto 3rem auto;
|
||||
}
|
||||
|
||||
.view-switcher button {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--text-muted);
|
||||
padding: 0.8rem 2rem;
|
||||
border-radius: 999px;
|
||||
cursor: pointer;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 600;
|
||||
transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.view-switcher button:hover {
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.view-switcher button.active {
|
||||
background: var(--surface-muted);
|
||||
color: var(--primary);
|
||||
box-shadow: inset 0 0 0 1px var(--border);
|
||||
}
|
||||
|
||||
.auth-btn {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--primary);
|
||||
padding: 0.55rem 1rem;
|
||||
border-radius: 999px;
|
||||
cursor: pointer;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
transition: background 0.2s ease;
|
||||
white-space: nowrap;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.auth-btn:hover {
|
||||
background: var(--surface-muted);
|
||||
}
|
||||
|
||||
.app-header {
|
||||
text-align: center;
|
||||
margin-bottom: 4rem;
|
||||
animation: fadeInDown 0.8s ease-out;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.back-to-home-btn {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: var(--surface-muted);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text-muted);
|
||||
font-size: 0.88rem;
|
||||
font-weight: 600;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 999px;
|
||||
cursor: pointer;
|
||||
transition: color 0.2s, background 0.2s;
|
||||
}
|
||||
|
||||
.back-to-home-btn:hover {
|
||||
color: var(--text-main);
|
||||
background: var(--surface-card);
|
||||
}
|
||||
|
||||
.app-header h1 {
|
||||
font-size: 3.5rem;
|
||||
font-weight: 800;
|
||||
margin-bottom: 0.75rem;
|
||||
color: var(--text-main);
|
||||
letter-spacing: -0.03em;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.app-header h1::after {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 3rem;
|
||||
height: 4px;
|
||||
margin: 1rem auto 0;
|
||||
background: var(--primary);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.app-header p {
|
||||
font-size: 1.2rem;
|
||||
color: var(--text-muted);
|
||||
font-weight: 400;
|
||||
max-width: 28rem;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.app-main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.glass-card {
|
||||
background: var(--glass-bg);
|
||||
border: 1px solid var(--glass-border);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--glass-shadow);
|
||||
overflow: hidden;
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
.loading {
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
font-size: 1.05rem;
|
||||
font-weight: 500;
|
||||
margin: 3rem 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.loading::after {
|
||||
content: "";
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 3px solid var(--border);
|
||||
border-top-color: var(--primary);
|
||||
border-radius: 50%;
|
||||
animation: spin 0.75s linear infinite;
|
||||
}
|
||||
|
||||
.selected-medicine-section {
|
||||
margin-top: 2rem;
|
||||
max-height: 60vh;
|
||||
.app-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
padding: 0.5rem 0.5rem 0.5rem 0;
|
||||
animation: fadeInUp 0.6s ease-out;
|
||||
}
|
||||
|
||||
.medicine-info {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius);
|
||||
padding: 2.5rem;
|
||||
margin-bottom: 2rem;
|
||||
box-shadow: var(--glass-shadow);
|
||||
border: 1px solid var(--border);
|
||||
@media (max-width: 768px) {
|
||||
.app-content {
|
||||
padding-bottom: calc(6rem + env(safe-area-inset-bottom));
|
||||
}
|
||||
}
|
||||
|
||||
.medicine-info h2 {
|
||||
color: var(--text-main);
|
||||
margin-bottom: 1.2rem;
|
||||
font-size: 2.25rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.medicine-details {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
padding: 1.5rem;
|
||||
background: var(--surface-muted);
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.medicine-details span {
|
||||
font-size: 1rem;
|
||||
color: var(--text-muted);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.medicine-details strong {
|
||||
color: var(--text-main);
|
||||
font-size: 0.8rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.back-button {
|
||||
background: var(--surface-muted);
|
||||
color: var(--text-main);
|
||||
border: 1px solid var(--border);
|
||||
padding: 0.8rem 1.8rem;
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 600;
|
||||
transition: background 0.2s, border-color 0.2s, transform 0.2s;
|
||||
}
|
||||
|
||||
.back-button:hover {
|
||||
background: var(--surface-card);
|
||||
border-color: var(--border-strong);
|
||||
transform: translateX(-3px);
|
||||
}
|
||||
|
||||
.pharmacy-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.85rem;
|
||||
margin: 1.5rem 0 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.sort-distance-button {
|
||||
background: var(--surface);
|
||||
color: var(--text-main);
|
||||
border: 1px solid var(--border);
|
||||
padding: 0.65rem 1.2rem;
|
||||
border-radius: 999px;
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
transition: background 0.2s, border-color 0.2s, color 0.2s;
|
||||
}
|
||||
|
||||
.sort-distance-button:hover:not(:disabled) {
|
||||
border-color: var(--primary);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.sort-distance-button.active {
|
||||
background: var(--primary);
|
||||
border-color: var(--primary);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sort-distance-button:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: progress;
|
||||
}
|
||||
|
||||
.location-error {
|
||||
color: #b91c1c;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.location-source {
|
||||
color: var(--primary);
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
@keyframes fadeInUp {
|
||||
from { opacity: 0; transform: translateY(14px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
@keyframes fadeInDown {
|
||||
from { opacity: 0; transform: translateY(-16px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
from { opacity: 0; transform: translateY(16px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.app {
|
||||
padding: calc(3.55rem + env(safe-area-inset-top)) 1rem calc(7rem + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.app-header h1 {
|
||||
font-size: 2.35rem;
|
||||
}
|
||||
|
||||
.app-header p {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.medicine-info {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.medicine-info h2 {
|
||||
font-size: 1.65rem;
|
||||
}
|
||||
|
||||
.view-switcher {
|
||||
display: none; /* ponytail: replaced by BottomNav on mobile */
|
||||
}
|
||||
|
||||
.view-switcher button {
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 0.2rem;
|
||||
padding: 0.4rem 0.3rem 0.45rem;
|
||||
border-radius: 14px;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-muted);
|
||||
background: transparent;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.view-switcher button:hover {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.view-switcher button .nav-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 1.65rem;
|
||||
height: 1.65rem;
|
||||
border-radius: 999px;
|
||||
font-size: 1.05rem;
|
||||
line-height: 1;
|
||||
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
|
||||
background 0.2s ease,
|
||||
box-shadow 0.2s ease,
|
||||
width 0.2s ease,
|
||||
height 0.2s ease;
|
||||
}
|
||||
|
||||
.view-switcher button .nav-label {
|
||||
font-size: 0.7rem;
|
||||
line-height: 1;
|
||||
max-width: none;
|
||||
color: inherit;
|
||||
transition: color 0.2s ease, font-weight 0.2s ease;
|
||||
}
|
||||
|
||||
.view-switcher button.active {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.view-switcher button.active .nav-icon {
|
||||
width: 2.7rem;
|
||||
height: 2.7rem;
|
||||
background: var(--surface);
|
||||
color: var(--primary);
|
||||
font-size: 1.3rem;
|
||||
border: 1px solid var(--border);
|
||||
box-shadow:
|
||||
0 0 0 5px var(--surface),
|
||||
0 10px 22px rgba(15, 118, 110, 0.22),
|
||||
0 4px 8px rgba(28, 25, 23, 0.08);
|
||||
transform: translateY(-1.1rem);
|
||||
margin-bottom: -0.6rem;
|
||||
}
|
||||
|
||||
.view-switcher button.active .nav-label {
|
||||
font-weight: 700;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.auth-btn {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 0.2rem;
|
||||
padding: 0.4rem 0.3rem 0.45rem;
|
||||
border-radius: 14px;
|
||||
color: var(--text-muted);
|
||||
font-size: 0.72rem;
|
||||
font-weight: 500;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.auth-btn:hover {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.auth-btn .nav-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 1.65rem;
|
||||
height: 1.65rem;
|
||||
font-size: 1.05rem;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.auth-btn .nav-label {
|
||||
font-size: 0.7rem;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user