From c93b3a2459154cccbfc4afcbb3f162f8d2611e53 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Tue, 4 Feb 2025 23:16:15 -0300 Subject: [PATCH] improvements and fixes: update Dockerfile and docker-compose for improved configuration; add FAQ component and enhance About section --- Dockerfile | 21 +++--- docker-compose.yml | 7 +- next.config.js | 1 + .../about/components/AboutNavbar.tsx | 13 ++-- .../about/components/AvailableFeatures.tsx | 2 +- src/components/about/components/Contacts.tsx | 2 +- .../components/FrequentlyAskedQuestions.tsx | 67 +++++++++++++++++++ src/components/about/index.tsx | 12 ++-- src/styles/globals.css | 4 +- 9 files changed, 100 insertions(+), 29 deletions(-) create mode 100644 src/components/about/components/FrequentlyAskedQuestions.tsx diff --git a/Dockerfile b/Dockerfile index 43ddeb2..17ddbb2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,24 @@ # syntax=docker.io/docker/dockerfile:1 -FROM node:23-alpine AS base +FROM node:21-alpine AS base FROM base AS deps +RUN apk add --no-cache libc6-compat WORKDIR /app COPY package.json package-lock.json* ./ -RUN npm ci --omit=dev +RUN npm ci --omit-dev -FROM node:23-alpine AS builder +FROM base AS builder WORKDIR /app - -COPY . . COPY --from=deps /app/node_modules ./node_modules +COPY . . ENV NEXT_TELEMETRY_DISABLED=1 RUN npm run build -RUN rm -rf /app/.next/diagnostics - -FROM node:23-alpine AS runner +FROM base AS runner WORKDIR /app ENV NODE_ENV=production @@ -29,9 +27,8 @@ ENV NEXT_TELEMETRY_DISABLED=1 RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs -COPY --from=builder /app/package.json ./ -COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules -COPY --from=builder --chown=nextjs:nodejs /app/public ./public -COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next +COPY --from=builder /app/public ./public +COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ +COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static USER nextjs diff --git a/docker-compose.yml b/docker-compose.yml index da4e27d..7acd0b2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,15 +9,18 @@ services: volumes: # - qualitylab_node_modules:/app/node_modules - qualitylab_public:/app/public + - quality_lab_images:/app/.next/static + stdin_open: true tty: true - command: ['npm', 'start'] - # command: ['node', 'server.js'] + # command: ['npm', 'start'] + command: ['node', 'server.js'] networks: - qualitylab-net volumes: qualitylab_node_modules: + quality_lab_images: qualitylab_public: networks: diff --git a/next.config.js b/next.config.js index be3a1c6..2a8c68b 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,7 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: process.env.NODE_ENV === 'development', + output: 'standalone', eslint: { ignoreDuringBuilds: true, }, diff --git a/src/components/about/components/AboutNavbar.tsx b/src/components/about/components/AboutNavbar.tsx index 6c2a1f0..3e4282a 100644 --- a/src/components/about/components/AboutNavbar.tsx +++ b/src/components/about/components/AboutNavbar.tsx @@ -8,6 +8,8 @@ const NAVIGATION_ITEMS: NavigationItem[] = [ { id: 'overview', label: 'OVERVIEW' }, { id: 'features', label: 'FEATURES' }, { id: 'contact', label: 'CONTACT' }, + { id: 'faq', label: 'FAQ' }, + { id: 'team', label: 'TEAM' }, ]; const AboutNavbar: React.FC = () => { @@ -24,10 +26,11 @@ const AboutNavbar: React.FC = () => {

- <LabGraph> ® + <LabGraph>{' '} + ®

-

- Quality Management Made Simple +

+ Quality Management System

@@ -47,7 +50,7 @@ const AboutNavbar: React.FC = () => {
  • TRY DEMO @@ -62,7 +65,7 @@ const AboutNavbar: React.FC = () => {
    DEMO diff --git a/src/components/about/components/AvailableFeatures.tsx b/src/components/about/components/AvailableFeatures.tsx index 1ae395b..733b0c5 100644 --- a/src/components/about/components/AvailableFeatures.tsx +++ b/src/components/about/components/AvailableFeatures.tsx @@ -52,7 +52,7 @@ const FeatureCard: React.FC = ({ title, description, icon }) => ( ); const AvailableFeatures: React.FC = () => ( -
    +

    Available Features

    diff --git a/src/components/about/components/Contacts.tsx b/src/components/about/components/Contacts.tsx index b405d1c..1685196 100644 --- a/src/components/about/components/Contacts.tsx +++ b/src/components/about/components/Contacts.tsx @@ -21,7 +21,7 @@ const CONTACT_ITEMS = [ const Contacts: React.FC = () => { return ( -
    +

    Contacts

    {CONTACT_ITEMS.map((item, index) => ( diff --git a/src/components/about/components/FrequentlyAskedQuestions.tsx b/src/components/about/components/FrequentlyAskedQuestions.tsx new file mode 100644 index 0000000..a58718f --- /dev/null +++ b/src/components/about/components/FrequentlyAskedQuestions.tsx @@ -0,0 +1,67 @@ +import { FC } from 'react'; +import { BiHelpCircle } from 'react-icons/bi'; + +interface FAQItem { + question: string; + answer: string; +} + +const FAQS: FAQItem[] = [ + { + question: 'What is Quality Control in Laboratory?', + answer: + 'Laboratory Quality Control is a set of procedures designed to monitor and evaluate testing processes to ensure accurate and reliable test results.', + }, + { + question: 'What are Westgard Rules?', + answer: + 'Westgard Rules are a set of statistical rules used to validate quality control data in clinical laboratories, helping detect both random and systematic errors.', + }, + { + question: 'How often should QC be performed?', + answer: + 'QC should be performed at least once every 24 hours, before patient testing begins, after major maintenance, or when accuracy of results is questioned.', + }, + { + question: 'What is a Levey-Jennings chart?', + answer: + 'A Levey-Jennings chart is a graphical tool that plots quality control values over time, helping visualize trends and shifts in laboratory testing processes.', + }, + { + question: 'How do I interpret control limits?', + answer: + 'Control limits typically represent ±2SD and ±3SD from the mean. Values outside these limits may indicate problems with the testing process.', + }, + { + question: 'Can I export my QC data?', + answer: + 'Yes, our system allows you to export quality control data in various formats for further analysis or documentation purposes.', + }, +]; + +const FAQCard: FC = ({ question, answer }) => ( +
    +
    +
    + +
    +

    {question}

    +
    +

    {answer}

    +
    +); + +const FrequentlyAskedQuestions: FC = () => ( +
    +

    + Frequently Asked Questions +

    +
    + {FAQS.map((faq, index) => ( + + ))} +
    +
    +); + +export default FrequentlyAskedQuestions; diff --git a/src/components/about/index.tsx b/src/components/about/index.tsx index 0faa093..881b89c 100644 --- a/src/components/about/index.tsx +++ b/src/components/about/index.tsx @@ -3,6 +3,7 @@ import AboutNavbar from './components/AboutNavbar'; import AvailableFeatures from './components/AvailableFeatures'; import Carousel from './components/Carousel'; import Contacts from './components/Contacts'; +import FrequentlyAskedQuestions from './components/FrequentlyAskedQuestions'; const AboutUs = () => { const carouselImages = [ @@ -25,7 +26,7 @@ const AboutUs = () => { ]; return ( -
    +
    @@ -34,7 +35,7 @@ const AboutUs = () => {
    -

    +

    Welcome to our free and open source solution for laboratory quality control. We're here to simplify your daily lab operations and help you maintain high-quality standards. Together with our growing community, we're making quality @@ -42,12 +43,13 @@ const AboutUs = () => {

    - -
    +
    -
    + +
    +
    diff --git a/src/styles/globals.css b/src/styles/globals.css index 8be589d..60a8c8b 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -105,8 +105,6 @@ * { @apply m-0 p-0 no-underline outline-none; font-family: 'Inter', sans-serif; - padding: 0; - margin: 0; } body { @@ -114,7 +112,7 @@ } html { - @apply scroll-smooth bg-background; + @apply scroll-smooth bg-background text-xs; } }