diff --git a/README.md b/README.md
index b15a9ef64..0f5b73fb4 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+#Website : https://l4phs.github.io/starter_helpi/
+
# Getting Started with Helpi
Packages Included:
diff --git a/package-lock.json b/package-lock.json
index aa66f461c..be43a888e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,9 +15,10 @@
"@types/node": "^16.18.76",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
+ "axios": "^1.6.8",
"bootstrap": "^5.3.2",
"gh-pages": "^6.1.1",
- "openai": "^4.26.0",
+ "openai": "^4.38.3",
"react": "^18.2.0",
"react-bootstrap": "^2.10.1",
"react-dom": "^18.2.0",
@@ -5004,6 +5005,16 @@
"node": ">=4"
}
},
+ "node_modules/axios": {
+ "version": "1.6.8",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz",
+ "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==",
+ "dependencies": {
+ "follow-redirects": "^1.15.6",
+ "form-data": "^4.0.0",
+ "proxy-from-env": "^1.1.0"
+ }
+ },
"node_modules/axobject-query": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz",
@@ -5225,11 +5236,6 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
- "node_modules/base-64": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz",
- "integrity": "sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA=="
- },
"node_modules/batch": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
@@ -5561,14 +5567,6 @@
"node": ">=10"
}
},
- "node_modules/charenc": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
- "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==",
- "engines": {
- "node": "*"
- }
- },
"node_modules/check-types": {
"version": "11.2.3",
"resolved": "https://registry.npmjs.org/check-types/-/check-types-11.2.3.tgz",
@@ -5989,14 +5987,6 @@
"node": ">= 8"
}
},
- "node_modules/crypt": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
- "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==",
- "engines": {
- "node": "*"
- }
- },
"node_modules/crypto-random-string": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
@@ -6695,15 +6685,6 @@
"node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
}
},
- "node_modules/digest-fetch": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/digest-fetch/-/digest-fetch-1.3.0.tgz",
- "integrity": "sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA==",
- "dependencies": {
- "base-64": "^0.1.0",
- "md5": "^2.3.0"
- }
- },
"node_modules/dir-glob": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@@ -8178,9 +8159,9 @@
"integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw=="
},
"node_modules/follow-redirects": {
- "version": "1.15.5",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
- "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
+ "version": "1.15.6",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
+ "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
"funding": [
{
"type": "individual",
@@ -9323,11 +9304,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-buffer": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
- "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
- },
"node_modules/is-callable": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
@@ -11139,16 +11115,6 @@
"tmpl": "1.0.5"
}
},
- "node_modules/md5": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
- "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
- "dependencies": {
- "charenc": "0.0.2",
- "crypt": "0.0.2",
- "is-buffer": "~1.1.6"
- }
- },
"node_modules/mdn-data": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz",
@@ -11767,15 +11733,14 @@
}
},
"node_modules/openai": {
- "version": "4.28.4",
- "resolved": "https://registry.npmjs.org/openai/-/openai-4.28.4.tgz",
- "integrity": "sha512-RNIwx4MT/F0zyizGcwS+bXKLzJ8QE9IOyigDG/ttnwB220d58bYjYFp0qjvGwEFBO6+pvFVIDABZPGDl46RFsg==",
+ "version": "4.38.3",
+ "resolved": "https://registry.npmjs.org/openai/-/openai-4.38.3.tgz",
+ "integrity": "sha512-mIL9WtrFNOanpx98mJ+X/wkoepcxdqqu0noWFoNQHl/yODQ47YM7NEYda7qp8JfjqpLFVxY9mQhshoS/Fqac0A==",
"dependencies": {
"@types/node": "^18.11.18",
"@types/node-fetch": "^2.6.4",
"abort-controller": "^3.0.0",
"agentkeepalive": "^4.2.1",
- "digest-fetch": "^1.3.0",
"form-data-encoder": "1.7.2",
"formdata-node": "^4.3.2",
"node-fetch": "^2.6.7",
@@ -13464,6 +13429,11 @@
"node": ">= 0.10"
}
},
+ "node_modules/proxy-from-env": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
+ },
"node_modules/psl": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
diff --git a/package.json b/package.json
index d2189d12e..6d716a2aa 100644
--- a/package.json
+++ b/package.json
@@ -10,9 +10,10 @@
"@types/node": "^16.18.76",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
+ "axios": "^1.6.8",
"bootstrap": "^5.3.2",
"gh-pages": "^6.1.1",
- "openai": "^4.26.0",
+ "openai": "^4.38.3",
"react": "^18.2.0",
"react-bootstrap": "^2.10.1",
"react-dom": "^18.2.0",
diff --git a/public/index.html b/public/index.html
index b5db6414a..590cb813d 100644
--- a/public/index.html
+++ b/public/index.html
@@ -26,6 +26,7 @@
-->
React App
+ @import
+ url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap')
+;
+
+//Lauren Pham
+//Mantra Yang
+//David Bui
+//Neil Irungu
//local storage and API Key: key should be entered in by the user and will be stored in local storage (NOT session storage)
let keyData = "";
@@ -11,43 +24,68 @@ if (prevKey !== null) {
keyData = JSON.parse(prevKey);
}
-function App() {
+function App(): JSX.Element {
const [key, setKey] = useState(keyData); //for api key input
-
+ //setting states for each page
+
+
//sets the local storage item to the api key the user inputed
function handleSubmit() {
localStorage.setItem(saveKeyData, JSON.stringify(key));
window.location.reload(); //when making a mistake and changing the key again, I found that I have to reload the whole site before openai refreshes what it has stores for the local storage variable
}
+ //adding a comment
//whenever there's a change it'll store the api key in a local state called key but it won't be set in the local storage until the user clicks the submit button
function changeKey(event: React.ChangeEvent) {
setKey(event.target.value);
}
+
+ const [page, setPage] = useState("HomePage");
+
return (
-
-
-
API Key:
-
-
-
Submit
-
-
+
+
+
+
+ {/*
Sign In */}
+ setPage("DQPage")}>
+ {" "}
+ Detailed Questions{" "}
+
+ setPage("BQPage")}>
+ {" "}
+ Basic Questions{" "}
+
+ setPage("HomePage")}>
+ {" "}
+ Home{" "}
+
+
+
+
+
+
+ Submit
+
+
+ setPage("HomePage")}> Jobspresso
+
+
+
+
+ {page === "HomePage" && }
+
+ {page === "BQPage" && }
+
+ {page === "DQPage" && }
+
);
}
-export default App;
+export default App;
\ No newline at end of file
diff --git a/src/CoffeeShopBKG.jpg b/src/CoffeeShopBKG.jpg
new file mode 100644
index 000000000..70a614bcb
Binary files /dev/null and b/src/CoffeeShopBKG.jpg differ
diff --git a/src/DCoffeeShop.jpeg b/src/DCoffeeShop.jpeg
new file mode 100644
index 000000000..35b592ec8
Binary files /dev/null and b/src/DCoffeeShop.jpeg differ
diff --git a/src/Pages/BASE.png b/src/Pages/BASE.png
new file mode 100644
index 000000000..fc7bb0fb1
Binary files /dev/null and b/src/Pages/BASE.png differ
diff --git a/src/Pages/BQPage.css b/src/Pages/BQPage.css
new file mode 100644
index 000000000..a93a9e0da
--- /dev/null
+++ b/src/Pages/BQPage.css
@@ -0,0 +1,307 @@
+.Bbody {
+ height: 100vh;
+ width: 100vw;
+ /* background-image: url("BKGBase.png"); */
+}
+
+.Bbody .text {
+ display: block;
+ position: absolute;
+ font-family: "Lilita One";
+ text-align: center;
+ top: 10vh;
+ font-size: 30px;
+ left: 11vw;
+}
+
+.Background{
+ height: 125vh;
+ background-image: url(MatchaBQ.jpg);
+ filter: blur(5px);
+ background-size: cover;
+ z-index: 10;
+}
+
+
+.BasicQuestions-List {
+ top: 15vw;
+ width: 100%;
+ position: absolute;
+ text-align: center;
+ list-style-type: none;
+ background-color: #3c2918;
+ left: -1vw;
+}
+.Ul-BQ{
+ text-align: left;
+ display: table;
+ margin-right: auto;
+ margin-left: auto;
+}
+
+.BQH {
+ position: absolute;
+ top: 10vh;
+ font-size: 30px;
+ font-weight: 600;
+ letter-spacing: 0.5px;
+ width: 100vw;
+ margin: auto;
+ text-align: center;
+ color: #3c2918;
+ text-shadow:1px 1px 10px #fee4c3, 1px 1px 10px #fee4c3;
+ /* background-color: red; */
+}
+
+.BQB {
+ position: absolute;
+ top: 18vh;
+ left: 28vw;
+ text-align: center;
+}
+
+.BQQuestionNum {
+ position: relative;
+ padding: 0px;
+ margin-bottom: 0px;
+ font-family: "Lilita One";
+ font-size: 25px;
+ color: #3c2918;
+ top: 30vh;
+ width: 100vw;
+ text-align: center;
+}
+
+.BQQuestion {
+ position: absolute;
+ margin-top: 0vh;
+ font-size: 25px;
+ color: #3c2918;
+ top: 37vh;
+ left: auto;
+ width: 100vw;
+ margin: auto;
+ text-align: center;
+}
+
+.NextButton {
+ margin-top: 20vh;
+ height: 8vh;
+ bottom: 20px;
+ width: 100px;
+ padding: 10px;
+ background-color: #3c2918;
+ color: #fee4c3;
+ border: none;
+ border-radius: 5px;
+ cursor: pointer;
+ z-index: 3;
+}
+.NextButton:hover {
+ background-color: #fee4c3;
+ color: #3c2918;
+}
+.NextButton:visted {
+ background-color: #fee4c3;
+ color: #3c2918;
+}
+.NextButton:focus {
+ background-color: #fee4c3;
+ color: #3c2918;
+}
+
+.PrevButton {
+ margin-top: 20vh;
+ height: 8vh;
+ bottom: 0px; /* Adjust the vertical position from the bottom */
+ width: 100px; /* Adjust the width as needed */
+ padding: 2px;
+ background-color: #3c2918;
+ color: #fee4c3;
+ border: none;
+ border-radius: 5px;
+ cursor: pointer;
+ z-index: 3;
+}
+.PrevButton:hover {
+ background-color: #fee4c3;
+ color: #3c2918;
+}
+.PrevButton:visited {
+ background-color: #fee4c3;
+ color: #3c2918;
+}
+.PrevButton:focus {
+ background-color: #fee4c3;
+ color: #3c2918;
+}
+
+.PrevButton:disabled {
+ background-color: #fee4c3;
+ color: #3c2918;
+}
+
+.BasicSubmitButton {
+ position: absolute;
+ height: 55px;
+ left: 55vw;
+ top: 83.5vh;
+ margin-top: 12vh;
+ bottom: 20px; /* Adjust the vertical position from the bottom */
+ width: 30vh; /* Adjust the width as needed */
+ padding: 10px;
+ background-color: #3c2918;
+ color: #fee4c3;
+ border: none;
+ border-radius: 5px;
+ cursor: pointer;
+}
+
+.BasicSubmitButton:hover {
+ background-color: #fee4c3;
+ color: #3c2918;
+}
+.BasicSubmitButton:visted {
+ background-color: #fee4c3;
+ color: #3c2918;
+}
+.BasicSubmitButton:focus {
+ background-color: #fee4c3;
+ color: #3c2918;
+}
+
+.textboxclassBQ {
+ position: absolute;
+ margin-top: 10px;
+ top: 41vh;
+ height: 40px;
+ width: 60vh;
+ font-size: 20px;
+ font-family: "Josefin Sans";
+ left: 35vw;
+ background-color: #3c2918;
+ color: #fee4c3;
+ text-align: center;
+}
+
+.ProgressBarBQ {
+ position: absolute;
+ border-radius: 1.5em;
+
+ left: 5vw;
+ top: 42vh;
+ height: 6vh;
+ width: 90vw;
+ background-color: #3c2918;
+}
+
+.ActiveProgressBQ {
+ position: absolute;
+ align-self: center;
+ border-radius: 1.5em;
+ transition: width 0.3s ease-in-out; /* Adjust the duration and timing function as needed */
+ left: 0.6vw;
+ top: 1vh;
+ height: 4vh;
+ max-width: 98.5%;
+ min-width: 0.5%;
+ background-color: #fee4c3;
+}
+
+/*
+//putting in styalizing things and will edit later
+*/
+
+.Bbody {
+ height: 100vh;
+ width: 100vw;
+ background-color: #fee4c3;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+.QuestionHeader {
+ position: absolute;
+ border-radius: 1.5em;
+ /* height: ; */
+ top: 50vh;
+ font-size: 25px;
+ font-weight: 600;
+ letter-spacing: 0.5px;
+ width: 100vw;
+ margin: auto;
+ text-align: center;
+ font-family: "Josefin Sans";
+ color: #3c2918;
+ text-shadow:1px 1px 10px #fee4c3, 1px 1px 10px #fee4c3;
+
+}
+
+.QuestionContainer {
+ text-align: center;
+ font-size: 20px;
+ font-family: "Lilita One";
+ position: absolute;
+ top: 55vh; /* Adjust this value to move the container downward */
+ left: 50%; /* Center horizontally */
+ transform: translateX(-50%);
+ width: 85%;
+ background-color: #fff3e4;
+ height: 50vh;
+ border-radius: 1.5em;
+ padding-top: 10px;
+ color: #3c2918;
+ /* margin: auto; */
+}
+
+.QuestionText {
+ font-size: 20px;
+}
+
+.AnswerInput {
+ width: 300px;
+ height: 30px;
+ margin-top: 10px;
+ padding: 5px;
+}
+
+.QCount {
+ position: absolute;
+ top: -5vh;
+ left: 42vw;
+}
+
+.BQH {
+ position: absolute;
+ border-radius: 1.5em;
+
+ top: 15vh;
+ font-size: 35px;
+ font-weight: 600;
+ letter-spacing: 0.5px;
+ width: 100vw;
+ margin: auto;
+ text-align: center;
+ font-family: "Lilita One";
+ color: #3c2918;
+}
+
+.Description {
+ position: absolute;
+ border-radius: 1.5em;
+
+ top: 23vh;
+ font-size: 20px;
+ font-weight: 600;
+ letter-spacing: 0.5px;
+ width: 100vw;
+ margin: auto;
+ text-align: center;
+ font-family: "Lilita One";
+ color: #000000;
+ text-shadow:1px 1px 10px #fee4c3, 1px 1px 10px #fee4c3;
+
+}
+
diff --git a/src/Pages/BQPage.tsx b/src/Pages/BQPage.tsx
new file mode 100644
index 000000000..976eee6ee
--- /dev/null
+++ b/src/Pages/BQPage.tsx
@@ -0,0 +1,324 @@
+/* eslint-disable @typescript-eslint/no-unused-vars */
+/* eslint-disable no-template-curly-in-string */
+//import { Button } from "react-bootstrap";
+import { useState } from "react";
+import "./BQPage.css";
+import OpenAI from "openai";
+import { Button } from "react-bootstrap";
+
+
+//Code written with the assistance of Gemini AI.
+
+interface Props {
+ setPage: (page: string) => void; // Define the type of setPage prop
+ apiKey: string; // Add apiKey as a prop
+}
+
+interface Question {
+ question: string;
+ answers: string[] | null;
+ type: "short answer" | "multiple choice";
+}
+
+function BQPage(props: Props): JSX.Element {
+ console.log("API Key:", props.apiKey);
+
+ const questions: Question[] = [
+ //25 questions total
+ {
+ question:
+ "Would you prefer working from home, in an office / on site, or hybrid? (pick one)",
+ answers: ["Working from home", "In an office / on site", "Hybrid"],
+ type: "multiple choice",
+ },
+ {
+ question:
+ "What salary would you not feel comfortable earning less than? (pick one)",
+ answers: ["50K", "70K","100K", "160K", "200K"],
+ type: "multiple choice",
+ },
+ {
+ question:
+ "Do you prefer to do work individually, in a small group (2-4 people), or a team (more than 4 people)?",
+ answers: [
+ "Individually",
+ "Small group (2-4 people)",
+ "Team (more than 4 people)",
+ ],
+ type: "multiple choice",
+ },
+ {
+ question:
+ "How would you describe your ideal work environment in one word?",
+ answers: null,
+ type: "short answer",
+ },
+ {
+ question: "How can you describe yourself in one word?",
+ answers: null,
+ type: "short answer",
+ },
+ {
+ question: "What subject are you the best at?",
+ answers: ["english", "math", "science", "physical activity"],
+ type: "multiple choice",
+ },
+ {
+ question:
+ "Please select your response to the following statement: I work well in fast paced environments",
+ answers: ["Yes", "No"],
+ type: "multiple choice",
+ },
+ {
+ question: "Would you enjoy traveling for work?",
+ answers: ["Yes", "No"],
+ type: "multiple choice",
+ },
+ {
+ question: "What is the maximum amount of hours you would prefer to work?",
+ answers: [
+ "30 Hrs",
+ "40 Hrs",
+ "60 Hrs",
+ "As many hours as needed",
+ ],
+ type: "multiple choice",
+ },
+ {
+ question: "What is your ideal shift time?",
+ answers: [
+ "Early Bird (7am - 3pm)",
+ "Regular Hours (9am - 5pm)",
+ "Overnight (7pm - 7am)",
+ "I want to work when I want.",
+ ],
+ type: "multiple choice",
+ },
+ {
+ question:
+ "Would you prefer to be relatively sedentary or active at work?",
+ answers: ["Sedentary", "Active"],
+ type: "multiple choice",
+ },
+ {
+ question: "Would you prefer to dress formally at work or casually?",
+ answers: ["Formal", "Casual"],
+ type: "multiple choice",
+ },
+ {
+ question: "Favorite activity? (one word answer)",
+ answers: null,
+ type: "short answer",
+ },
+ {
+ question: "What is your dreamjob? (one to two word answer)",
+ answers: null,
+ type: "short answer",
+ },
+ {
+ question: "Do you enjoy helping others?",
+ answers: ["Yes", "No"],
+ type: "multiple choice",
+ },
+ {
+ question:
+ "Please select your level of agreement with the following statement: I prefer jobs that require a lot of attention to detail",
+ answers: ["True", "False"],
+ type: "multiple choice",
+ },
+ {
+ question: "Do you enjoy working in high-pressure situations?",
+ answers: ["Yes", "No"],
+ type: "multiple choice",
+ },
+ {
+ question:
+ "Please select your level of agreement with the following statement: I prefer consistent work hours over a flexible schedule.",
+ answers: ["True", "False"],
+ type: "multiple choice",
+ },
+ ];
+
+ const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0);
+ const [answers, setAnswers] = useState<(string | null)[]>(
+ Array(questions.length).fill(null)
+ );
+ const [progress, setProgress] = useState(0);
+ const [submitted, setSubmitted] = useState(false); // State to track if answers have been submitted
+ const [check, setCheck] = useState(false);
+ const [gptReport, setGptReport] = useState("");
+
+ const openai = new OpenAI({
+ apiKey: props.apiKey,
+ dangerouslyAllowBrowser: true,
+ });
+
+ const handleNext = () => {
+ if (currentQuestionIndex < questions.length - 1) {
+ setCurrentQuestionIndex(currentQuestionIndex + 1);
+ }
+ };
+
+ const handlePrevious = () => {
+ if (currentQuestionIndex > 0) {
+ setCurrentQuestionIndex(currentQuestionIndex - 1);
+ }
+ };
+
+ const handleAnswerChange = (selectedAnswer: string) => {
+ const updatedAnswers = [...answers];
+ updatedAnswers[currentQuestionIndex] = selectedAnswer;
+ setAnswers(updatedAnswers);
+
+ const answeredCount = updatedAnswers.filter((answer) => answer !== null)
+ .length;
+ const totalQuestions = questions.length;
+ const percentage = (answeredCount / totalQuestions) * 100;
+ setProgress(percentage);
+ };
+
+ const handleReturn = () => {
+ setSubmitted(false);
+ }
+
+ const handleResponseCheck = () => {
+ setSubmitted(true);
+ }
+
+ const handleSubmitBasicAnswers = async () => {
+ const userContent = answers
+ .map((answer, index) => `${questions[index].question}: ${answer}`)
+ .join("\n");
+
+ try {
+ const response = await openai.chat.completions.create({
+ model: "gpt-4-turbo",
+ messages: [
+ {
+ role: "system",
+ content:
+ "You are a career genie helping lead to the greatest career choices while implementing your love for coffee. Give a detailed paragraph analysis of the answers given and then the top 3 job choices formatted as follows: job name,pay rate, description, and why matched. Then generate a short list of jobs that did not match the answers provided. Have a sweet closer about coffee", },
+ {
+ role: "user",
+ content: userContent,
+ },
+ ],
+ temperature: 1,
+ max_tokens: 1000,
+ top_p: 1,
+ frequency_penalty: 0,
+ presence_penalty: 0,
+ });
+
+ const careerReport = response.choices[0].message.content || "";
+ console.log("Career Report:", careerReport);
+ setGptReport(careerReport);
+
+ // Update state to indicate answers have been submitted
+ setCheck(true);
+ } catch (error) {
+ console.error("Error generating career insights:", error);
+ // Handle error or display error message
+ }
+ };
+
+ return (
+
+
+ {submitted ? (
+ // Display submitted answers if submitted is true
+
+
Submitted Answers
+
+ {questions.map((question, index) => (
+
+ {question.question}
+
+ {answers[index]}
+
+
+ ))}
+
+
+
+
{gptReport}
+
Return to Quiz
+
Get My Results
+
+
+ ) : (
+
+
Basic Questions
+
+ Welcome to the Basic Questions! There are 18 total questions but you can answer as many or as few as you would like!
+
The more questions you answer, the more accurate your results will be!
+
You will be able to review your answers and go back and change any of them before you submit your results.
+
+
+ Question {currentQuestionIndex + 1} of {questions.length}
+
+
+
{questions[currentQuestionIndex].question}
+ {questions[currentQuestionIndex].type === "multiple choice" ? (
+
+ ) : (
+
+
+
+ Previous
+
+ {currentQuestionIndex < questions.length - 1 ? (
+
+ Next
+
+ ) : (
+ Submit Basic Answers
+
+ )}
+
+
+ )}
+
+
+ );
+}
+
+export default BQPage;
\ No newline at end of file
diff --git a/src/Pages/DQPage.css b/src/Pages/DQPage.css
new file mode 100644
index 000000000..4e9057a27
--- /dev/null
+++ b/src/Pages/DQPage.css
@@ -0,0 +1,197 @@
+.Dbody {
+ height: 100vh;
+ width: 100vw;
+ /* background-color: red; */
+
+}
+
+.background{
+ height: 125vh;
+ background-image: url("SageCoffee.png");
+ filter:blur(5px);
+}
+
+.Dbody .text {
+ display: block;
+ position: absolute;
+ font-family: "Lilita One";
+ /* text-align: center; */
+ top: 10vh;
+ font-size: 30px;
+ left: 11vw;
+ color: #3c2918;
+}
+
+.Ul-DQ{
+ text-align: left;
+ display: table;
+ margin-right: auto;
+ margin-left: auto;
+}
+
+.DetailedQuestions-List {
+ margin-top: 45vh;
+ width: 100%;
+ position: absolute;
+}
+
+.Det-Question {
+ position: relative;
+ padding: 0px;
+ margin-bottom: 0px;
+ font-family: "Lilita One";
+ font-size: 25px;
+ color: #3c2918;
+ top: 29vh;
+ width: 100vw;
+ text-align: center;
+}
+
+.det-body {
+ position: absolute;
+ margin-top: 0vh;
+ font-size: 25px;
+ color: #3c2918;
+ top: 38vh;
+ left: auto;
+ width: 100vw;
+ margin: auto;
+ /* text-align: center; */
+}
+
+.textboxclassDQ {
+ position: absolute;
+ top: 43vh;
+ height: 40px;
+ width: 60vh;
+ font-size: 20px;
+ font-family: "Josefin Sans";
+ left: 50vw;
+ background-color: #3c2918;
+ color: #fee4c3;
+ /* text-align: center; */
+}
+
+.QuestionHeader {
+ position: absolute;
+ border-radius: 1.5em;
+
+ top: 40vh;
+ font-size: 25px;
+ font-weight: 625;
+ letter-spacing: 0.5px;
+ width: 100vw;
+ margin: auto;
+ /* text-align: center; */
+ font-family: "Josefin Sans";
+ color: #3c2918;
+
+}
+
+.DQH {
+
+ position: absolute;
+ border-radius: 1.5em;
+
+ top: 15vh;
+ font-size: 30px;
+ font-weight: 600;
+ letter-spacing: 0.5px;
+ width: 100vw;
+ margin: auto;
+ text-align: center; /*Dont Touch */
+ font-family: "Lilita One";
+ color: #3c2918;
+ text-shadow:1px 1px 10px #fee4c3, 1px 1px 10px #fee4c3;
+
+}
+
+
+.DQB {
+ position: absolute;
+ top: 18vh;
+ left: 28vw;
+ /* text-align: center; */
+}
+
+.NextButton {
+ position: absolute;
+ top: 75vh;
+ background-color: #3c2918;
+ color: #fee4c3;
+ left: 55vw;
+ transition: all 0.3s ease;
+
+}
+.NextButton:hover {
+ background-color: #fee4c3;
+ color: #3c2918;
+ transform: scale(1.1);
+}
+
+.PrevButton {
+ position: absolute;
+ top: 75vh;
+ background-color: #3c2918;
+ color: #fee4c3;
+ right: 55vw;
+ transition: all 0.3s ease;
+}
+.PrevButton:hover {
+ background-color: #fee4c3;
+ color: #3c2918;
+ transform: scale(1.1);
+}
+
+.options {
+ position: absolute;
+ top: 43vh;
+ width: 100vw;
+ /* text-align: center; */
+ font-size: 20px;
+}
+
+.Submit-Button {
+ position: absolute;
+ top: 95vh;
+ width: auto; /* Adjust the width as needed */
+ height: 61px;
+ background-color: #3c2918;
+ color: #fee4c3;
+ left: 55vw;
+ transition: all 0.3s ease;
+}
+.Submit-Button:hover {
+ background-color: #fee4c3;
+ color: #3c2918;
+ transform: scale(1.1);
+}
+
+.ProgressBar {
+ position: absolute;
+ border-radius: 1.5em;
+
+ left: 5vw;
+ top: 26vh;
+ height: 6vh;
+ width: 90vw;
+ background-color: #3c2918;
+}
+
+.ActiveProgress {
+ position: absolute;
+ align-self: center;
+ border-radius: 1.5em;
+ transition: width 0.3s ease-in-out; /* Adjust the duration and timing function as needed */
+ left: 0.6vw;
+ top: 1vh;
+ height: 4vh;
+ max-width: 98.5%;
+ min-width: 0.5%;
+ background-color: #dbc6b6;
+}
+
+label {
+ margin-left: 10px;
+}
+
diff --git a/src/Pages/DQPage.tsx b/src/Pages/DQPage.tsx
new file mode 100644
index 000000000..87a46b051
--- /dev/null
+++ b/src/Pages/DQPage.tsx
@@ -0,0 +1,250 @@
+/* eslint-disable @typescript-eslint/no-unused-vars */
+import React, { useState } from "react";
+import { Button } from "react-bootstrap";
+import "./DQPage.css";
+import OpenAI from "openai";
+//commiting all changes
+
+interface Props {
+ setPage: (page: string) => void; // Define the type of setPage prop
+ apiKey: string;
+}
+
+interface Question {
+ id: number;
+ question: string;
+ answers: string[] | null;
+ type: "short answer" | "multiple choice" | "checkbox";
+}
+
+function DQPage(props: Props): JSX.Element {
+ console.log("API Key:", props.apiKey);
+ const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0);
+ const [gptReport, setGptReport] = useState("");
+
+ const [progress, setProgress] = useState(0);
+ const [check, setCheck] = useState(false);
+
+const detailedQuestions: Question [] = [
+
+{
+ id: 1,
+ question: "What kind of work environment do you prefer? Describe your ideal workplace.",
+ answers: null,
+ type: "short answer"
+},
+{
+ id: 2,
+ question: "What values are most important to you in your career? (E.G., creativity, financial stability, work-life balance",
+ answers: null,
+ type: "short answer"
+},
+{
+ id: 3,
+ question: "How important is job stability to you?",
+ answers: ["Not at all", "Slighly important", "Neutral about it", "Somewhat important", "Extremely important"],
+ type: "multiple choice"
+},
+{
+ id: 4,
+ question: "What kind of roles or projects do you enjoy the most?",
+ answers: ["Creative roles", "Analytical roles", "Leadership roles", "Hands-on roles", "Customer Service roles"],
+ type: "multiple choice"
+},
+{
+ id: 5,
+ question: "How often do you rely on data and facts when making a decision?",
+ answers: ["Never", "Some of the time", "Half of the time", "Most of the time", "Almost exclusively"],
+ type: "multiple choice"
+},
+{
+ id: 6,
+ question: "How do you feel about presenting to groups?",
+ answers: ["Extremely uncomfortable", "Mostly uncomfortable", "Neutral about it", "Mostly comfortable ", "Extremely comfortable"],
+ type: "multiple choice"
+},
+{
+ id: 7,
+ question: "What skills do you enjoy using the most in your work?",
+ answers: ["Communication and Writing", "Critical Thinking and Analysis", "Time management and organization", "Technical skills (i.e, coding or engineering", "Creative skills (i.e, design, art, music)"],
+ type: "multiple choice"
+},
+{
+ id: 8,
+ question: "Describe a professional goal that you have set for yourself. What steps are you taking to achieve it?",
+ answers: null,
+ type: "short answer"
+},
+{
+ id: 9,
+ question: "What types of jobs or career fields interest you the most? Select all that apply",
+ answers: ["Working with animals", "Medical and healthcare fields", "Mathematics and analytics", "Engineering and technology", "Creative and artistic fields", "Science and research", "Businesss and finance", "Education and teaching", "Writing and communication", "Law and legal professions", "Social services and advocacy", "Trades and skilled labor", "Hospitality and tourism", "Sales and customer service"],
+ type: "checkbox"
+},
+{
+ id: 10,
+ question: "How open are you to trying new methods and approaches to your work?",
+ answers: ["Not open at all", "Slightly open", "Neutral about it", "Mostly open ", "Extremely open"],
+ type: "multiple choice"
+},
+{
+ id: 11,
+ question:
+ "How would you rate your ability to learn new skills? (pick one)",
+ answers: ["Excellent", "Good", "Average", "Below average", "Poor"],
+ type: "multiple choice",
+},
+{
+ id: 12,
+ question: "List three activities you enjoy:",
+ answers: null,
+ type: "short answer",
+},
+{
+ id: 13,
+ question: "How do you prefer to spend your workday?",
+ answers: [
+ "Solving problems",
+ "Meeting with colleagues",
+ "Creating new ideas",
+ "Following established procedures",
+ "Completing designated tasks"
+ ],
+ type: "multiple choice",
+},
+];
+
+const [answers, setAnswers] = useState<(string | null)[]>(
+ Array(detailedQuestions.length).fill(null)
+);
+ const openai = new OpenAI({ apiKey: "key", dangerouslyAllowBrowser: true });
+
+ const handleNext = () => {
+ if (currentQuestionIndex < detailedQuestions.length - 1) {
+ setCurrentQuestionIndex(currentQuestionIndex + 1);
+ }
+ };
+
+ const handlePrevious = () => {
+ if (currentQuestionIndex > 0) {
+ setCurrentQuestionIndex(currentQuestionIndex - 1);
+ }
+ };
+
+ const handleAnswerChange = (selectedAnswer: string) => {
+ const updatedAnswers = [...answers];
+ updatedAnswers[currentQuestionIndex] = selectedAnswer;
+ setAnswers(updatedAnswers);
+
+ const answeredCount = updatedAnswers.filter((answer) => answer !== null)
+ .length;
+ const totalQuestions = detailedQuestions.length;
+ const percentage = (answeredCount / totalQuestions) * 100;
+ setProgress(percentage);
+ };
+
+ const handleSubmitDetailAnswers = async () => {
+ const userContent = answers
+ .map((answer, index) => `${detailedQuestions[index].question}: ${answer}`)
+ .join("\n");
+
+ try {
+ const response = await openai.chat.completions.create({
+ model: "gpt-4-turbo",
+ messages: [
+ {
+ role: "system",
+ content:
+ "You are a career genie helping lead to the greatest career choices while implementing your love for coffee. Give a detailed paragraph analysis of the answers given and then the top 3 job choices formatted as follows: job name,pay rate, description, and why matched. Then generate a short list of jobs that did not match the answers provided. Have a sweet closer about coffee", },
+ {
+ role: "user",
+ content: userContent,
+ },
+ ],
+ temperature: 1,
+ max_tokens: 1000,
+ top_p: 1,
+ frequency_penalty: 0,
+ presence_penalty: 0,
+ });
+
+ const careerReport = response.choices[0].message.content || "";
+ console.log("Career Report:", careerReport);
+ setGptReport(careerReport);
+
+ // Update state to indicate answers have been submitted
+ setCheck(true);
+ } catch (error) {
+ console.error("Error generating career insights:", error);
+ // Handle error or display error message
+ }
+ };
+
+ return (
+
+
+
Detailed Questions
+
+ Welcome to the Detailed Questions! There are 13 total questions but you can answer as many or as few as you would like!
+
The more questions you answer, the more accurate your results will be!
+
You will be able to review your answers and go back and change any of them before you submit your results.
+
+
+
+ Question {currentQuestionIndex + 1} of {detailedQuestions.length}
+
+
+
+
{detailedQuestions[currentQuestionIndex].question}
+ {detailedQuestions[currentQuestionIndex].type === "multiple choice" ? (
+
+ {detailedQuestions[currentQuestionIndex].answers?.map((answer) => (
+
+ ))}
+
+ ) : (
+
+
+
+ Previous
+
+ {currentQuestionIndex < detailedQuestions.length - 1 ? (
+
+ Next
+
+ ) : (
+
+ Submit Answers
+
+ )}
+
+
+ );
+}
+
+export default DQPage;
diff --git a/src/Pages/HomePage.css b/src/Pages/HomePage.css
new file mode 100644
index 000000000..c7f7b9612
--- /dev/null
+++ b/src/Pages/HomePage.css
@@ -0,0 +1,160 @@
+.parallax-scrolling {
+ position: relative;
+ overflow: hidden;
+ overflow-x: hidden;
+ height: 550vh;
+ z-index: 1;
+}
+
+.parallax-coffee-layer {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 3000px;
+ z-index: 0;
+ background-attachment: scroll;
+ background-repeat: no-repeat;
+ background-size: contain;
+ background-position: center;
+ pointer-events: none;
+}
+
+#coffee1 {
+ background-image: url("BASE.png");
+ animation: movecoffee 100s linear infinite;
+ z-index: 2;
+ transform: translateY(var(--coffee1-translateY));
+ filter: blur(2px);
+}
+
+#coffee2 {
+ background-image: url("MID.png");
+ animation: movecoffee 150s linear infinite;
+ z-index: 3;
+ transform: translateY(var(--coffee2-translateY));
+ filter: blur(1px);
+}
+
+#coffee3 {
+ perspective: 20px;
+ top: -200px;
+ background-image: url("TOP.png");
+ animation: movecoffee 2s linear infinite;
+ z-index: 3;
+ transform: translateY(var(--coffee3-translateY));
+}
+
+.parallax-coffee-layer {
+ background-size: 100% 100%;
+ /* Other properties remain the same */
+}
+
+.Hbody {
+ height: 100vh;
+ width: 100vw;
+ z-index: 8;
+ overflow-x: hidden;
+}
+
+.Hbody .text {
+ display: block;
+ position: absolute;
+ font-family: "Lilita One";
+ text-align: center;
+ top: 403vh;
+ overflow-x: hidden;
+ font-size: 30px;
+ background-color: #3d2a19;
+ width: 100vw;
+ border: 15px;
+ padding: 5px 15px;
+ position: absolute;
+ color: #fee4c3;
+ transform: none;
+
+ z-index: 8;
+ height: 120vh;
+}
+
+.BQDiscriptions {
+ display: block;
+ position: absolute;
+ width: 70vh;
+ height: 64vh;
+ top: 420vh;
+
+ left: 14vw;
+ text-align: center;
+ background-color: #fee4c3;
+ border: 5px solid transparent;
+ border-radius: 8px;
+ padding: 5px 15px;
+ color: #3d2a19;
+
+ z-index: 8;
+}
+.BQDiscriptionBox {
+ text-align: left;
+ z-index: 8;
+}
+
+.DQDiscriptions {
+ display: block;
+ position: absolute;
+ width: 64vh;
+ height: 64vh;
+ top: 420vh;
+ right: 14vw;
+
+ text-align: center;
+ background-color: #fee4c3;
+ border: 5px solid transparent;
+ border-radius: 8px;
+ padding: 5px 15px;
+ color: #3d2a19;
+
+ z-index: 8;
+}
+
+.BQButton{
+ display: block;
+ position: absolute;
+ top: 549vh;
+ /* top: 0vh; */
+ left: auto;
+ left: 25.5vw;
+ background-color: #fee4c3;
+ color: #3d2a19;
+ border: 1px transparent;
+ z-index: 9;
+ transition: all 0.3s ease;
+
+}
+.BQButton:hover {
+ background-color: #3d2a19;
+ color: #fee4c3;
+ z-index: 9;
+ transform: scale(1.1);
+
+
+}
+
+.DQButton{
+ display: block;
+ position: absolute;
+ top: 549vh;
+ z-index: 8;
+
+ right: 23.5vw;
+ background-color: #fee4c3;
+ color: #3d2a19;
+ border: 1px transparent;
+ transition: all 0.3s ease;
+}
+.DQButton:hover {
+ background-color: #3d2a19;
+ /* color: #3d2a19; */
+ color: #fee4c3;
+ transform: scale(1.1);
+}
diff --git a/src/Pages/HomePage.tsx b/src/Pages/HomePage.tsx
new file mode 100644
index 000000000..8ec992ca0
--- /dev/null
+++ b/src/Pages/HomePage.tsx
@@ -0,0 +1,129 @@
+/* eslint-disable jsx-a11y/alt-text */
+import { Button, Form } from "react-bootstrap";
+import React, { useEffect } from "react";
+import "./HomePage.css";
+
+interface Props {
+ setPage: (page: string) => void; // Define the type of setPage prop
+}
+
+function HomePage({ setPage }: Props): JSX.Element {
+ useEffect(() => {
+ const handleScroll = () => {
+ const yPos = window.scrollY;
+
+ const coffee1 = document.getElementById("coffee1");
+ const coffee2 = document.getElementById("coffee2");
+ const coffee3 = document.getElementById("coffee3");
+
+ if (coffee1) coffee1.style.transform = `translateY(-${yPos * 0.1}px)`;
+ if (coffee2) coffee2.style.transform = `translateY(-${yPos * 0.3}px)`;
+ if (coffee3) coffee3.style.transform = `translateY(-${yPos * 0.8}px)`;
+ };
+
+ window.addEventListener("scroll", handleScroll);
+
+ return () => {
+ window.removeEventListener("scroll", handleScroll);
+ };
+ }, []);
+
+ return (
+ <>
+
+
Shoot for the moon!!!
+
+
+
+ {/* Buttons to navigate to Basic and Detailed question pages */}
+
+
+
+
+
+
+
+ Struggling to decide what to do with your life?
+ Take a career path quiz!
+
+
+
+
Basic Quiz!
+ Discover your ideal career path with our basic career path quiz!
+
+ This quiz helps you lightly
+ explore your interests, strengths, and preferences.
+
+ Start your exploration today and take the first step toward a fulfilling career!
+
+
+ An example of a question you may see:
+
+ What location would you prefer to live in?
+
+
+ Suburban
+
+ Urban
+
+
+ City
+
+ Coastal Town
+
+
+
+
Detailed Quiz!
+ Take your career exploration to new heights with our Advanced
+ Career Path Quiz!
+
+ Designed for those seeking in-depth insights, this quiz
+ assesses your skills, values, and goals.
+
+ Start navigating your future today!
+
+
+
+
An example of a question you may see:
+
+ What kind of work environment do you prefer?
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setPage("BQPage")}>
+ {" "}
+ Basic Questions
+
+ setPage("DQPage")}>
+ {" "}
+ Detailed Questions
+
+ >
+ );
+}
+
+export default HomePage;
diff --git a/src/Pages/MID.png b/src/Pages/MID.png
new file mode 100644
index 000000000..1c0ccad2d
Binary files /dev/null and b/src/Pages/MID.png differ
diff --git a/src/Pages/MatchaBQ.jpg b/src/Pages/MatchaBQ.jpg
new file mode 100644
index 000000000..2de15c1f6
Binary files /dev/null and b/src/Pages/MatchaBQ.jpg differ
diff --git a/src/Pages/ResultPage.css b/src/Pages/ResultPage.css
new file mode 100644
index 000000000..c0db38ad5
--- /dev/null
+++ b/src/Pages/ResultPage.css
@@ -0,0 +1,4 @@
+
+.ResultBody {
+ font-family: "Lilita One";
+}
\ No newline at end of file
diff --git a/src/Pages/ResultPage.tsx b/src/Pages/ResultPage.tsx
new file mode 100644
index 000000000..95d91df17
--- /dev/null
+++ b/src/Pages/ResultPage.tsx
@@ -0,0 +1,44 @@
+import React from "react";
+import BQPage from "./BQPage";
+
+interface Props {
+ answers: Record;
+ careerReport: string;
+}
+
+/*const ResultsPage: React.FC = ({ answers }) => {
+ return (
+
+
Results
+
+
+ {Object.entries(answers).map(([question, answer]) => (
+
+
{question}
+ {Array.isArray(answer) ? (
+
+ {answer.map((item) => (
+ {item}
+ ))}
+
+ ) : (
+
{answer}
+ )}
+
+ ))}
+
+
+ );
+};*/
+
+function ResultsPage(props: Props): JSX.Element {
+ return (
+
+
Results
+
{props.careerReport}
+ {/* Render additional content based on careerReport */}
+
+ );
+}
+
+export default ResultsPage;
diff --git a/src/Pages/SageCoffee.png b/src/Pages/SageCoffee.png
new file mode 100644
index 000000000..57a73b22a
Binary files /dev/null and b/src/Pages/SageCoffee.png differ
diff --git a/src/Pages/TOP.png b/src/Pages/TOP.png
new file mode 100644
index 000000000..76a0a0146
Binary files /dev/null and b/src/Pages/TOP.png differ
diff --git a/src/Pages/Untitled_Artwork.gif b/src/Pages/Untitled_Artwork.gif
new file mode 100644
index 000000000..3e8d5256d
Binary files /dev/null and b/src/Pages/Untitled_Artwork.gif differ
diff --git a/src/Table - Copy.png b/src/Table - Copy.png
new file mode 100644
index 000000000..be4459e23
Binary files /dev/null and b/src/Table - Copy.png differ
diff --git a/src/Table.png b/src/Table.png
new file mode 100644
index 000000000..6f79b0b89
Binary files /dev/null and b/src/Table.png differ
diff --git a/src/meow.png b/src/meow.png
new file mode 100644
index 000000000..39bbf1ccd
Binary files /dev/null and b/src/meow.png differ
diff --git a/starter_helpi@0.1.0 b/starter_helpi@0.1.0
new file mode 100644
index 000000000..e69de29bb