From 73d4873546ca4ed1b668b25f8bd84e760dc3dade Mon Sep 17 00:00:00 2001 From: GamerBoss101 Date: Sat, 14 Sep 2024 22:47:36 -0400 Subject: [PATCH] Lots of Changes --- Backend/src/__pycache__/db.cpython-312.pyc | Bin 1906 -> 0 bytes html/index.html | 13 --- server/ai.js | 1 - server/api/users.js | 2 +- src/lib/components/Navbar.svelte | 14 +++ src/lib/components/form/QuestionSelect.svelte | 72 ++++++++++++ src/lib/components/form/Survey.svelte | 102 +++++++++++++++++ src/routes/+layout.js | 24 ++++ src/routes/+layout.svelte | 18 +++ src/routes/+page.svelte | 104 +++++++++++++++++- src/routes/contacts/+page.svelte | 43 ++++++++ src/routes/food/+page.svelte | 71 ++++++++++++ src/routes/survey/+page.svelte | 30 +++++ .../bootstrap/css/bootstrap.min.css | 0 {html/assets => static}/img/brands/apple.png | Bin .../assets => static}/img/brands/facebook.png | Bin {html/assets => static}/img/brands/google.png | Bin .../img/brands/microsoft.png | Bin .../assets => static}/img/brands/twitter.png | Bin {html/assets => static}/img/products/1.jpg | Bin {html/assets => static}/img/products/2.jpg | Bin {html/assets => static}/img/products/3.jpg | Bin {html/assets => static}/img/team/avatar2.jpg | Bin {html/assets => static}/img/team/avatar4.jpg | Bin {html/assets => static}/img/team/avatar5.jpg | Bin {html/assets => static}/js/bold-and-dark.js | 0 26 files changed, 477 insertions(+), 17 deletions(-) delete mode 100644 Backend/src/__pycache__/db.cpython-312.pyc create mode 100644 src/lib/components/Navbar.svelte create mode 100644 src/lib/components/form/QuestionSelect.svelte create mode 100644 src/lib/components/form/Survey.svelte create mode 100644 src/routes/+layout.js create mode 100644 src/routes/+layout.svelte create mode 100644 src/routes/contacts/+page.svelte create mode 100644 src/routes/food/+page.svelte create mode 100644 src/routes/survey/+page.svelte rename {html/assets => static}/bootstrap/css/bootstrap.min.css (100%) rename {html/assets => static}/img/brands/apple.png (100%) rename {html/assets => static}/img/brands/facebook.png (100%) rename {html/assets => static}/img/brands/google.png (100%) rename {html/assets => static}/img/brands/microsoft.png (100%) rename {html/assets => static}/img/brands/twitter.png (100%) rename {html/assets => static}/img/products/1.jpg (100%) rename {html/assets => static}/img/products/2.jpg (100%) rename {html/assets => static}/img/products/3.jpg (100%) rename {html/assets => static}/img/team/avatar2.jpg (100%) rename {html/assets => static}/img/team/avatar4.jpg (100%) rename {html/assets => static}/img/team/avatar5.jpg (100%) rename {html/assets => static}/js/bold-and-dark.js (100%) diff --git a/Backend/src/__pycache__/db.cpython-312.pyc b/Backend/src/__pycache__/db.cpython-312.pyc deleted file mode 100644 index 1aa74691ac8d837a09e5098547a86790f56df6d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1906 zcmcIk&2JM&6rcU_S3U?Ku5Ch_R47STA>IPLR4oNj+CU|Ygi0etl~&H~CfU?po0)Zy zkt5}hLk{J@$#8-bBI45jqbDnsVr_G)a^OblLnKbTH?zAq<)h-zC;7K;-@G^L_j|vY zKZb@f1nl|a{pEd`kiYRIGBtF1KZDaIHnF7&StK%kLpe;%~rb0}MV=|8= zAeM|{3Xi2AmX2d;Q_?ffahsBb7?~70y-{%5#DTBaWKp)IO|qyoWnBr9*K6KN?aE~< z{2ROg|Fiv(>Usx~d*X}6d|S)eueBYD%Y z+`7YpBo&S>2P$(a%R$1bdCTq!!=5H5Uw&usI)kmczn1GYYqeahmn)T~aiwN8s_+SB z%)9>8#**>Vk5|jqFKq7YIpZ=oj%OQ;T86z;tT%&{X}X^4o95k-Z~(<9f<&+{0XE29 zequL2+sV&9{r>l_I%h8KcCtFWXZCWRJn$c_KV09*&26do z275?LX?~o0;dfM0?mLY45l8reb2WkPw1{+Z(Iiy1q9NT?IoH9m%nez zbQt}U0O2e}yV(ETVLsG&1enPt05(W>bPOm?cC&@{!u^Ha>{KT^^?0R|EdtRQ&Pa)# zfJ~Z0c+DdA%o`s9CuULB43WbrftA>zBlhl-nh+ATw77=AH4+l}12}IGDFZdpzNDq} z6J;aiI09}h72a^L+ysfZwXOv!$|M+Yy%p-%c!XFm=z7ej4a;|H9t#q*?89oH;z80i z!7_43ClNkHI1Rw?e@~+I@qSG76ceAt#2Ek}ek>2fr@Q0RTk4;weD~C6_$+ik%0YO5 zuii_)X8<3=E)-!5_l#t$X$3I=T=_s54`K<@5?Rdt|082mj;?UU3LRsBjsv_Y;F0kD zikZaz{w3kuc>B)%JG;4=PHyIDx|2JHcg1@c#C|ElDcmb!P}a^125|-Ejd5{jaLIGp zdF9aq@iO(bxPZQ)(@=r3WS;}PP$WtEiwqyCs#H860Ec6WWE>EH!{LNfI3NIrBZ_qX JABc%>zXCAORo4Ij diff --git a/html/index.html b/html/index.html index a0ec7c4..a8de063 100644 --- a/html/index.html +++ b/html/index.html @@ -10,19 +10,6 @@ -
diff --git a/server/ai.js b/server/ai.js index 9fd6872..a2b1573 100644 --- a/server/ai.js +++ b/server/ai.js @@ -21,7 +21,6 @@ const response = await ollama.chat({ "Preheat oven to 350 degrees" ] } - ` }], }); diff --git a/server/api/users.js b/server/api/users.js index fea1ce1..37950cd 100644 --- a/server/api/users.js +++ b/server/api/users.js @@ -4,7 +4,7 @@ export default class UsersAPI extends APIRoute { constructor() { super('/users'); - this.addSubRoute('/create', 'post', createUser); + this.addSubRoute('/create', 'post', this.createUser); } async get(req, res) { diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte new file mode 100644 index 0000000..d643c24 --- /dev/null +++ b/src/lib/components/Navbar.svelte @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/src/lib/components/form/QuestionSelect.svelte b/src/lib/components/form/QuestionSelect.svelte new file mode 100644 index 0000000..a44d026 --- /dev/null +++ b/src/lib/components/form/QuestionSelect.svelte @@ -0,0 +1,72 @@ + + +
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+

The more questions you answer, the more personalized your recommendation will be!

diff --git a/src/lib/components/form/Survey.svelte b/src/lib/components/form/Survey.svelte new file mode 100644 index 0000000..3ab38d0 --- /dev/null +++ b/src/lib/components/form/Survey.svelte @@ -0,0 +1,102 @@ + + +
+
+
+

Question {$formData.currentQuestion} 

+

Question {$formData.currentQuestion} of {numQuestion}

+
+
+
+
+
+
+

+ + {questions[$formData.currentQuestion]} + +

+
+
+
+
+
+
+ +
+
+
+
+
+ {#if $formData.currentQuestion === numQuestion} + + {:else} + + {/if} +
+
+
+ + \ No newline at end of file diff --git a/src/routes/+layout.js b/src/routes/+layout.js new file mode 100644 index 0000000..cbce238 --- /dev/null +++ b/src/routes/+layout.js @@ -0,0 +1,24 @@ +import {createClient} from "@propelauth/javascript"; + + +export async function load() { + + /* + const authClient = createClient({ + authUrl: "https://auth.fooddecisive.co/", + enableBackgroundTokenRefresh: true, + }); + + const authInfo = await authClient.getAuthenticationInfoOrNull(); + console.log("authInfo", authInfo) + if (authInfo) { + console.log("User is logged in as", authInfo.user.email) + } else { + console.log("User is not logged in") + } + + return { + authInfo + }; + */ +} \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte new file mode 100644 index 0000000..d113670 --- /dev/null +++ b/src/routes/+layout.svelte @@ -0,0 +1,18 @@ + + + + + + Food Decisive + + + + +
+ + + + +
\ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 5982b0a..50dd19d 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,2 +1,102 @@ -

Welcome to SvelteKit

-

Visit kit.svelte.dev to read the documentation

+ + + +
+
+
+
+
+

Can't choose what to eat?

+

We've got you covered!

+
+
+
+
+

Here's How it works:

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
Create an Account
+

Create an Account, so we can save your recipes.

+
+
+
+
+
+
+
+ + +
+
Fill out the Form
+

Fill out the form and answer the questions. Make sure you provide any dietary restrictions.

+
+
+
+
+
+
+
+ +
+
View Your Generated Recipe
+

After filling out the form, we will generate a recipe!

+
+
+
+
+
+
+
+ + +
+
Rate The Recipe Generated
+

Rate the Generated Recipe to provide feedback for better generated recipes in the future. 

+
+
+
+
+
+
+
+
+
+
+
+

Get Started

+

Decide Your Next Bite!

+
+
+
+
+
+
+
+

Submitted for VTHacks-12

+
+
+
+ + \ No newline at end of file diff --git a/src/routes/contacts/+page.svelte b/src/routes/contacts/+page.svelte new file mode 100644 index 0000000..0c0e851 --- /dev/null +++ b/src/routes/contacts/+page.svelte @@ -0,0 +1,43 @@ +
+
+
+
+

Contact

+

How you can reach us

+
+
+
+
+
+
+
+ +
+
+
Phone Number
+

+1 3019006147

+
+
+
+
+ +
+
+
Email
+

ktumma06@gmail.com

+
+
+
+
+ +
+
+
Location
+

727 Prices Fork Road

+
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/routes/food/+page.svelte b/src/routes/food/+page.svelte new file mode 100644 index 0000000..28b60ea --- /dev/null +++ b/src/routes/food/+page.svelte @@ -0,0 +1,71 @@ + + + +
+
+
+
+

You Want

+
+
+
+
+
+
+

Butter Chicken

+
+
+

Butter Chicken is a delicious Indian Meal. It was made by the British after they colonized the country.

+
+
+
+
+
+
+
+
+

Nutrition Facts

+

Nullam id dolor id nibh ultricies vehicula ut id elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus.

+
+
+
+
+
+
+

Ingredients

+

Nullam id dolor id nibh ultricies vehicula ut id elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus.

+
+
+
+
+
+
+
+
+

Title

+

Nullam id dolor id nibh ultricies vehicula ut id elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus.

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Rate Your Generated Recipe!

+

Nullam id dolor id nibh ultricies vehicula ut id elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus.

+
+
+
+
\ No newline at end of file diff --git a/src/routes/survey/+page.svelte b/src/routes/survey/+page.svelte new file mode 100644 index 0000000..d931b99 --- /dev/null +++ b/src/routes/survey/+page.svelte @@ -0,0 +1,30 @@ + + +
+
+
+
+

How many questions do you want to answer?

+
+
+
+
+
+
+
\ No newline at end of file diff --git a/html/assets/bootstrap/css/bootstrap.min.css b/static/bootstrap/css/bootstrap.min.css similarity index 100% rename from html/assets/bootstrap/css/bootstrap.min.css rename to static/bootstrap/css/bootstrap.min.css diff --git a/html/assets/img/brands/apple.png b/static/img/brands/apple.png similarity index 100% rename from html/assets/img/brands/apple.png rename to static/img/brands/apple.png diff --git a/html/assets/img/brands/facebook.png b/static/img/brands/facebook.png similarity index 100% rename from html/assets/img/brands/facebook.png rename to static/img/brands/facebook.png diff --git a/html/assets/img/brands/google.png b/static/img/brands/google.png similarity index 100% rename from html/assets/img/brands/google.png rename to static/img/brands/google.png diff --git a/html/assets/img/brands/microsoft.png b/static/img/brands/microsoft.png similarity index 100% rename from html/assets/img/brands/microsoft.png rename to static/img/brands/microsoft.png diff --git a/html/assets/img/brands/twitter.png b/static/img/brands/twitter.png similarity index 100% rename from html/assets/img/brands/twitter.png rename to static/img/brands/twitter.png diff --git a/html/assets/img/products/1.jpg b/static/img/products/1.jpg similarity index 100% rename from html/assets/img/products/1.jpg rename to static/img/products/1.jpg diff --git a/html/assets/img/products/2.jpg b/static/img/products/2.jpg similarity index 100% rename from html/assets/img/products/2.jpg rename to static/img/products/2.jpg diff --git a/html/assets/img/products/3.jpg b/static/img/products/3.jpg similarity index 100% rename from html/assets/img/products/3.jpg rename to static/img/products/3.jpg diff --git a/html/assets/img/team/avatar2.jpg b/static/img/team/avatar2.jpg similarity index 100% rename from html/assets/img/team/avatar2.jpg rename to static/img/team/avatar2.jpg diff --git a/html/assets/img/team/avatar4.jpg b/static/img/team/avatar4.jpg similarity index 100% rename from html/assets/img/team/avatar4.jpg rename to static/img/team/avatar4.jpg diff --git a/html/assets/img/team/avatar5.jpg b/static/img/team/avatar5.jpg similarity index 100% rename from html/assets/img/team/avatar5.jpg rename to static/img/team/avatar5.jpg diff --git a/html/assets/js/bold-and-dark.js b/static/js/bold-and-dark.js similarity index 100% rename from html/assets/js/bold-and-dark.js rename to static/js/bold-and-dark.js