Skip to content

Commit 442c39c

Browse files
committed
Enable All HTML FIles and Front End With React, Still got Problems on the Button UI.
1 parent b40b478 commit 442c39c

35 files changed

+2952
-525
lines changed
344 Bytes
Binary file not shown.

backend/main.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pydantic import BaseModel
33
from azure.ai.inference import ChatCompletionsClient
44
from azure.core.credentials import AzureKeyCredential
5+
from fastapi.middleware.cors import CORSMiddleware
56
import os
67
import logging
78
from dotenv import load_dotenv
@@ -15,6 +16,14 @@
1516
# FastAPI app
1617
app = FastAPI(title="Phi-3.5 Mini Chatbot API")
1718

19+
# CORS middleware
20+
app.add_middleware(
21+
CORSMiddleware,
22+
allow_origins=["http://localhost:3000", "https://<frontend-domain>"],
23+
allow_methods=["*"],
24+
allow_headers=["*"],
25+
)
26+
1827
# Azure configuration
1928
AZURE_ENDPOINT = os.getenv("AZURE_ENDPOINT", "https://Phi-3-mini-4k-instruct-lqhmi.eastus2.models.ai.azure.com/v1/chat/completions")
2029
AZURE_API_KEY = os.getenv("AZURE_INFERENCE_CREDENTIAL")

build/aboutme.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ <h2 class="text-2xl font-semibold text-gray-800 mb-2">Hung Gia Hoang</h2>
5555
</main>
5656

5757
<script src="/src/scripts/script.js"></script>
58+
5859
</body>
5960
</html>

build/asset-manifest.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"files": {
3-
"main.css": "/static/css/main.76db638d.css",
4-
"main.js": "/static/js/main.22bece0e.js",
3+
"main.css": "/static/css/main.fbf3aec6.css",
4+
"main.js": "/static/js/main.abb27202.js",
55
"index.html": "/index.html",
6-
"main.76db638d.css.map": "/static/css/main.76db638d.css.map",
7-
"main.22bece0e.js.map": "/static/js/main.22bece0e.js.map"
6+
"static/media/_interop_require_wildcard.cjs": "/static/media/_interop_require_wildcard.27c5c3a655c2ad09bbd0.cjs",
7+
"static/media/_interop_require_default.cjs": "/static/media/_interop_require_default.66b466f601bfd91dbfa9.cjs",
8+
"main.fbf3aec6.css.map": "/static/css/main.fbf3aec6.css.map",
9+
"main.abb27202.js.map": "/static/js/main.abb27202.js.map"
810
},
911
"entrypoints": [
10-
"static/css/main.76db638d.css",
11-
"static/js/main.22bece0e.js"
12+
"static/css/main.fbf3aec6.css",
13+
"static/js/main.abb27202.js"
1214
]
1315
}

build/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>StudiWell</title><link rel="stylesheet" href="styles/styles.css"><script defer="defer" src="/static/js/main.22bece0e.js"></script><link href="/static/css/main.76db638d.css" rel="stylesheet"></head><body class="bg-custom-green"><header class="bg-white shadow-md"><div class="container mx-auto px-4 py-2 flex items-center justify-between"><div class="flex items-center"><img src="images/Untitled 1.png" alt="StudiWell Logo" class="w-24 h-20"><h1 class="text-2xl font-bold text-gray-800 ml-4">StudiWell</h1></div><div class="flex items-center space-x-6"><nav><ul class="flex space-x-4"><li><a href="index.html" class="text-gray-700 hover:text-gray-900">Home</a></li><li><a href="aboutme.html" class="text-gray-700 hover:text-gray-900">About</a></li><li><a href="students.html" class="text-gray-700 hover:text-gray-900">Student</a></li><li><a href="features.html" class="text-gray-700 hover:text-gray-900">Feature</a></li></ul></nav><div class="account-menu relative"><button id="accountBtn" class="account-button bg-blue-500 text-white px-4 py-2 rounded">My Account</button><div id="accountSlideout" class="account-slideout fixed right-0 top-0 h-full w-64 bg-white shadow-lg transform translate-x-full transition-transform duration-300 ease-in-out"><div class="p-4"><h2 class="text-xl font-bold mb-4">Account</h2><a href="login.html" id="signInBtn" class="block w-full text-center bg-blue-500 text-white px-4 py-2 rounded mb-2">Sign In</a> <a href="#" id="signOutBtn" class="block w-full text-center bg-red-500 text-white px-4 py-2 rounded mb-2 hidden">Sign Out</a> <button id="closeSlideout" class="mt-4 text-gray-600 hover:text-gray-800">Close</button></div></div></div></div></div></header><main class="main-section bg-gray-100 py-16"><div class="hero-content text-center"><h1 class="text-4xl font-bold text-gray-900 mb-4">Welcome to Studiwell</h1><p class="text-xl text-gray-700 mb-8">A Study Companion With Mental Health Tracking Functionality,<br>Powered by Azure software with AI integration.</p><a href="login.html" class="btn bg-blue-500 text-white px-6 py-3 rounded-lg hover:bg-blue-600 transition duration-300">Try out now</a></div></main><footer class="footer bg-gray-800 text-white py-4 text-center"><p>&copy; 2024 Studiwell. All rights reserved.</p></footer><script src="/src/scripts/script.js"></script></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>StudiWell</title><link rel="stylesheet" href="styles/styles.css"><script defer="defer" src="/static/js/main.abb27202.js"></script><link href="/static/css/main.fbf3aec6.css" rel="stylesheet"></head><body class="bg-custom-green"><header class="bg-white shadow-md"><div class="container mx-auto px-4 py-2 flex items-center justify-between"><div class="flex items-center"><img src="images/Untitled 1.png" alt="StudiWell Logo" class="w-24 h-20"><h1 class="text-2xl font-bold text-gray-800 ml-4">StudiWell</h1></div><div class="flex items-center space-x-6"><nav><ul class="flex space-x-4"><li><a href="index.html" class="text-gray-700 hover:text-gray-900">Home</a></li><li><a href="aboutme.html" class="text-gray-700 hover:text-gray-900">About</a></li><li><a href="students.html" class="text-gray-700 hover:text-gray-900">Student</a></li><li><a href="features.html" class="text-gray-700 hover:text-gray-900">Feature</a></li></ul></nav><div class="account-menu relative"><button id="accountBtn" class="account-button bg-blue-500 text-white px-4 py-2 rounded">My Account</button><div id="accountSlideout" class="account-slideout fixed right-0 top-0 h-full w-64 bg-white shadow-lg transform translate-x-full transition-transform duration-300 ease-in-out"><div class="p-4"><h2 class="text-xl font-bold mb-4">Account</h2><a href="login.html" id="signInBtn" class="block w-full text-center bg-blue-500 text-white px-4 py-2 rounded mb-2">Sign In</a> <a href="#" id="signOutBtn" class="block w-full text-center bg-red-500 text-white px-4 py-2 rounded mb-2 hidden">Sign Out</a> <button id="closeSlideout" class="mt-4 text-gray-600 hover:text-gray-800">Close</button></div></div></div></div></div></header><main class="main-section bg-gray-100 py-16"><div class="hero-content text-center"><h1 class="text-4xl font-bold text-gray-900 mb-4">Welcome to Studiwell</h1><p class="text-xl text-gray-700 mb-8">A Study Companion With Mental Health Tracking Functionality,<br>Powered by Azure software with AI integration.</p><a href="login.html" class="btn bg-blue-500 text-white px-6 py-3 rounded-lg hover:bg-blue-600 transition duration-300">Try out now</a></div></main><footer class="footer bg-gray-800 text-white py-4 text-center"><p>&copy; 2024 Studiwell. All rights reserved.</p></footer><script src="/src/scripts/script.js"></script></body></html>

build/login.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ <h2 class="text-2xl font-bold text-center mb-4">Login</h2>
7272
<footer class="footer bg-gray-800 text-white py-4 text-center">
7373
<p>&copy; 2024 StudiWell. All rights reserved.</p>
7474
</footer>
75+
7576

76-
\</body>
77+
</body>
7778
</html>

build/students.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ <h1 class="text-3xl font-bold text-gray-900 mb-8 text-center">Student Testimonia
5959
</main>
6060

6161
<script src="/src/scripts/script.js"></script>
62+
63+
6264
</body>
6365
</html>
6466

build/styles/styles.css

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -795,18 +795,21 @@ select {
795795
.h-10 {
796796
height: 2.5rem;
797797
}
798+
.h-12 {
799+
height: 3rem;
800+
}
798801
.h-20 {
799802
height: 5rem;
800803
}
801-
.h-24 {
802-
height: 6rem;
803-
}
804804
.h-4 {
805805
height: 1rem;
806806
}
807807
.h-48 {
808808
height: 12rem;
809809
}
810+
.h-6 {
811+
height: 1.5rem;
812+
}
810813
.h-64 {
811814
height: 16rem;
812815
}
@@ -828,6 +831,9 @@ select {
828831
.w-10 {
829832
width: 2.5rem;
830833
}
834+
.w-12 {
835+
width: 3rem;
836+
}
831837
.w-24 {
832838
width: 6rem;
833839
}
@@ -837,6 +843,9 @@ select {
837843
.w-48 {
838844
width: 12rem;
839845
}
846+
.w-6 {
847+
width: 1.5rem;
848+
}
840849
.w-64 {
841850
width: 16rem;
842851
}
@@ -858,6 +867,10 @@ select {
858867
.flex-grow {
859868
flex-grow: 1;
860869
}
870+
.translate-x-0 {
871+
--tw-translate-x: 0px;
872+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
873+
}
861874
.translate-x-full {
862875
--tw-translate-x: 100%;
863876
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -901,6 +914,15 @@ select {
901914
.justify-between {
902915
justify-content: space-between;
903916
}
917+
.gap-2 {
918+
gap: 0.5rem;
919+
}
920+
.gap-3 {
921+
gap: 0.75rem;
922+
}
923+
.gap-4 {
924+
gap: 1rem;
925+
}
904926
.gap-6 {
905927
gap: 1.5rem;
906928
}
@@ -937,6 +959,11 @@ select {
937959
margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
938960
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
939961
}
962+
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
963+
--tw-space-y-reverse: 0;
964+
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
965+
margin-bottom: calc(1rem * var(--tw-space-y-reverse));
966+
}
940967
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
941968
--tw-space-y-reverse: 0;
942969
margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
@@ -984,6 +1011,13 @@ select {
9841011
.border {
9851012
border-width: 1px;
9861013
}
1014+
.border-b {
1015+
border-bottom-width: 1px;
1016+
}
1017+
.border-blue-500 {
1018+
--tw-border-opacity: 1;
1019+
border-color: rgb(59 130 246 / var(--tw-border-opacity, 1));
1020+
}
9871021
.border-gray-300 {
9881022
--tw-border-opacity: 1;
9891023
border-color: rgb(209 213 219 / var(--tw-border-opacity, 1));
@@ -1112,6 +1146,10 @@ select {
11121146
font-size: 2.25rem;
11131147
line-height: 2.5rem;
11141148
}
1149+
.text-lg {
1150+
font-size: 1.125rem;
1151+
line-height: 1.75rem;
1152+
}
11151153
.text-sm {
11161154
font-size: 0.875rem;
11171155
line-height: 1.25rem;
@@ -1186,6 +1224,9 @@ select {
11861224
--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
11871225
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
11881226
}
1227+
.outline {
1228+
outline-style: solid;
1229+
}
11891230
.transition {
11901231
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
11911232
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -1220,6 +1261,10 @@ select {
12201261
body {
12211262
font-family: 'Inter', sans-serif;
12221263
}
1264+
.hover\:bg-blue-50:hover {
1265+
--tw-bg-opacity: 1;
1266+
background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1));
1267+
}
12231268
.hover\:bg-blue-600:hover {
12241269
--tw-bg-opacity: 1;
12251270
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
@@ -1235,10 +1280,6 @@ select {
12351280
.hover\:bg-gray-900:hover {
12361281
--tw-bg-opacity: 1;
12371282
background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
1238-
}
1239-
.hover\:bg-green-600:hover {
1240-
--tw-bg-opacity: 1;
1241-
background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1));
12421283
}
12431284
.hover\:bg-red-600:hover {
12441285
--tw-bg-opacity: 1;

build/welcomePage.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ <h2 class="text-2xl font-semibold mb-4">Your Stats:</h2>
6262
<p>Study streak: 5 days</p>
6363
<p>Tasks completed this week: 12</p>
6464
<p>Next study session: Today at 3 PM</p>
65+
<p><strong>Current mood:</strong> Good</p>
66+
<p><strong>Stress level:</strong> 3/10</p>
67+
<p><strong>Mental health tip:</strong> Take a 10-minute break to practice mindfulness.</p>
6568
</div>
6669
</div>
6770

@@ -78,5 +81,6 @@ <h2 class="text-2xl font-semibold mb-4">Your Stats:</h2>
7881

7982

8083
<script src="/src/scripts/script.js"></script>
84+
8185
</body>
8286
</html>

craco.config.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const CracoAlias = require("craco-alias");
2+
3+
module.exports = {
4+
webpack: {
5+
configure: (webpackConfig) => {
6+
webpackConfig.module.rules.push({
7+
test: /\.js$/,
8+
enforce: 'pre',
9+
use: ['source-map-loader'],
10+
exclude: /node_modules\/lucide-react/
11+
});
12+
return webpackConfig;
13+
},
14+
},
15+
plugins: [
16+
{
17+
plugin: CracoAlias,
18+
options: {
19+
source: "tsconfig",
20+
baseUrl: "./src",
21+
tsConfigPath: "./tsconfig.paths.json"
22+
}
23+
}
24+
]
25+
};

0 commit comments

Comments
 (0)