Skip to content

Commit

Permalink
Fixed UI render issue, UI renders with uploadPDF component (#30)
Browse files Browse the repository at this point in the history
* Adding scrape.py file for extracting tests

* Fixed test measures exctraction to output the h3 tag text

* Scraper scrapes required data successfully

* Resolving merge conflicts

* Scraper scrapes required data successfully (#13)

* Adding scrape.py file for extracting tests

* Fixed test measures exctraction to output the h3 tag text

* Scraper scrapes required data successfully

* Resolving merge conflicts

* Added ability to scrape more than one URL

* Added ability to scrape more than one URL (#14)

* Added ability to scrape more than one URL

* Added 3 more URLs

* Added 3 more URLs (#15)

* Adding scrape.py file for extracting tests

* Fixed test measures exctraction to output the h3 tag text

* Scraper scrapes required data successfully

* Resolving merge conflicts

* Added ability to scrape more than one URL

* Added 3 more URLs

* clean up scraping and add comments to scrape.py about whats wrong

* Update README.md

Added app name

* Update README.md

Replaced placed holder text in tech stack, features

* Update README.md

Edited heading three - sub heading

* Delete requirements.txt

* Update scrape.py

* Added UI around uploadPDF component

* Updated docker-compose, Dockerfile and removed main.py

* Changed file name in app for index.js

* Added index.html to public folder

* Updated package.json

* Fixed UI render issue, UI renders with uploadPDF component

* Changed which text has the typewriter effect

* Centered uplPDF component

* Fixed typo in footer

---------

Co-authored-by: kleenkanteen <[email protected]>
  • Loading branch information
sandramsc and kleenkanteen authored Mar 7, 2024
1 parent 61a65dd commit a0bc97c
Show file tree
Hide file tree
Showing 41 changed files with 9,530 additions and 218 deletions.
36 changes: 24 additions & 12 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
name: publish

#on: [push]
# Trigger on push events to any branch
on:
push:
branches:
- '*'

jobs:
publish-leap24-image:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Login to GitHub Conatiner Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}

- name: Build the LEAP24 Docker image
run: |
docker build . --tag ghcr.io/sandramsc/leap-hackathon:latest
docker push ghcr.io/sandramsc/leap-hackathon:latest
- name: Build and push frontend Docker image
working-directory: ./frontend
run: |
docker build . --tag ghcr.io/sandramsc/leap-hackathon-frontend:latest
docker push ghcr.io/sandramsc/leap-hackathon-frontend:latest
- name: Build and push backend Docker image
working-directory: ./backend
run: |
docker build . --tag ghcr.io/sandramsc/leap-hackathon-backend:latest
docker push ghcr.io/sandramsc/leap-hackathon-backend:latest
49 changes: 34 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
# Minimal base image
#FROM alpine:latest
FROM python:latest
# Use a base image suitable for both frontend and backend requirements
FROM node:14-alpine AS frontend-builder

# Set working directory for frontend
WORKDIR /app/frontend

# Copy frontend source code
COPY frontend/package*.json ./
RUN yarn install
COPY frontend/ .

# Build frontend
RUN yarn build

# Container working directory
#WORKDIR /app
# Use another stage for the backend
FROM python:latest AS backend-builder

# Set working directory for backend
WORKDIR /app/backend

# Copy backend source code
COPY backend/requirements.txt ./
RUN pip install -r requirements.txt
COPY backend/ .

# Final stage
FROM python:latest

# Copy the application code into the container
COPY main.py /
# Copy files from frontend and backend stages
COPY --from=frontend-builder /app/frontend/build /app/frontend/build
COPY --from=backend-builder /app/backend /app/backend

# Install any dependencies or build the application
# Example commands:
# RUN npm install
# RUN pip install -r requirements.txt
# RUN mvn clean package
# Expose any necessary ports
# EXPOSE 3000

# Expose the port on which the app runs
#EXPOSE 3000
# Set working directory
WORKDIR /app/backend

# Commands to run the application
CMD ["python", "./main.py"]
CMD ["python", "scrape.py"]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
</div>
<h1 align="center">Dr. Dracula</h1>
<h3 align="center">Simplifying Blood Test Analysis for Personalized Health Insights</h3>
<<<<<<< HEAD

=======

>>>>>>> 61a65ddd59d89199bfcd3898b2f9f6f58c98f1d8
## Application Description

A web application that allows users to understand their blood test results quick easy using AI.
Expand All @@ -28,7 +32,11 @@ A web application that allows users to understand their blood test results quick

## Demo

<<<<<<< HEAD
[View Demo Video]([https://link.com](https://dr-dracula.vercel.app/))
=======
[View Demo Video](https://dr-dracula.vercel.app/)
>>>>>>> 61a65ddd59d89199bfcd3898b2f9f6f58c98f1d8

## Technology Stack
Expand Down
10 changes: 6 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ version: "3"

services:
web:
build: .
build:
context: .
dockerfile: Dockerfile
hostname: web
volumes:
- .:/app
- ./frontend:/app/frontend # Mount frontend directory
- ./backend:/app/backend # Mount backend directory
ports:
- "3000:3000"

- "3000:3000"
40 changes: 39 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"dev": "next dev",
"postinstall": "prisma generate",
"lint": "next lint",
"start": "next start"
"start": "next start",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"dependencies": {
"@hookform/resolvers": "^3.3.4",
Expand All @@ -19,17 +21,35 @@
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-slot": "^1.0.2",
"@t3-oss/env-nextjs": "^0.9.2",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"animate.css": "^4.1.1",
"bootstrap": "^5.1.3",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"cors": "^2.8.5",
"express": "^4.18.1",
"ky": "^1.2.2",
"markdown-it": "^14.0.0",
"next": "^14.1.0",
"next-themes": "^0.2.1",
"nodemailer": "^6.7.5",
"react": "18.2.0",
"react-bootstrap": "^2.4.0",
"react-bootstrap-icons": "^1.8.2",
"react-dom": "18.2.0",
"react-hook-form": "^7.51.0",
"react-mailchimp-subscribe": "^2.1.3",
"react-multi-carousel": "^2.8.1",
"react-on-screen": "^2.1.1",
"react-responsive-carousel": "^3.2.23",
"react-router-dom": "^6.3.0",
"react-router-hash-link": "^2.4.3",
"react-scripts": "5.0.1",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7",
"web-vitals": "^2.1.4",
"zod": "^3.22.4"
},
"devDependencies": {
Expand All @@ -48,6 +68,24 @@
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"ct3aMetadata": {
"initVersion": "7.28.0"
},
Expand Down
43 changes: 43 additions & 0 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Dr. Dracula</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Loading

0 comments on commit a0bc97c

Please sign in to comment.