Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
516a337
initial commit, server connected to frontend and database
devinfiachra Jul 18, 2023
45c4127
added fluent ui component library
devinfiachra Jul 18, 2023
2991ca2
update config to connect client with the external live database
devinfiachra Jul 19, 2023
9d019ee
update hard coded server routes to point to external backend
devinfiachra Jul 19, 2023
4967a39
update config for vite frontend deployment on netlify
devinfiachra Jul 19, 2023
19ca406
update config for external deployment of vite app
devinfiachra Jul 19, 2023
589f3c9
update git ignore
devinfiachra Jul 19, 2023
aeebe55
new basic placeholder homepage elements for testing the API call
bienenbohnenbuhnen Jul 19, 2023
3d5cb78
basic-fluent-styled-homepage-elements
bienenbohnenbuhnen Jul 19, 2023
af5a7cb
Merge remote-tracking branch 'origin/add-basic-hompage-elements-to-ho…
devinfiachra Jul 19, 2023
699240d
Merge pull request #2 from devinfiachra/release-2023-1907-1
devinfiachra Jul 19, 2023
257d412
update directory structure for readability
devinfiachra Jul 20, 2023
8ffc7d8
Merge pull request #3 from devinfiachra/feature-update-login-routing
devinfiachra Jul 20, 2023
8332211
add button from fluent ui library to navbar
devinfiachra Jul 20, 2023
e252fb0
update styles signim page using ui-library
devinfiachra Jul 20, 2023
a2197cc
update styles login/registration page using ui-library
devinfiachra Jul 20, 2023
b416885
update login page ui
devinfiachra Jul 20, 2023
0e81955
update Signup function to generate token on login and route the user…
devinfiachra Jul 20, 2023
d094af3
Merge pull request #4 from devinfiachra/release-2023-20-07-1
devinfiachra Jul 20, 2023
da1fdd8
stuck on authorization
bienenbohnenbuhnen Jul 20, 2023
a10ac75
api response sent to console, rendering not complete
bienenbohnenbuhnen Jul 20, 2023
2564ccb
remove styles
devinfiachra Jul 20, 2023
e2d507f
therapist scaffolding creation, auth path not yet clarified
bienenbohnenbuhnen Jul 21, 2023
09a3e85
fully functional therapist login and signup
bienenbohnenbuhnen Jul 21, 2023
5cc9fd9
import assestes, create basic landing page, restructures nav componen…
devinfiachra Jul 21, 2023
dfdd3ea
adjust homepage css
devinfiachra Jul 21, 2023
500ed52
add basic hompepage and routes to therapist/login
devinfiachra Jul 21, 2023
f6ae4a4
Merge pull request #6 from devinfiachra/release-2023-21-07-21-1
devinfiachra Jul 21, 2023
ec16156
release ready for merge to master, moved chat gpt api function to own…
devinfiachra Jul 21, 2023
dfb5c78
minor routing updates to ui
devinfiachra Jul 21, 2023
b583a2b
Merge pull request #7 from devinfiachra/release-2023-21-07-2-frontend
devinfiachra Jul 21, 2023
f97427c
add basic styles for login, signup
devinfiachra Jul 21, 2023
4b04a66
add css files, update basic css structure, add welcome page frontend …
devinfiachra Jul 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
REACT_APP_SERVER_URL=http://localhost:5005
# VITE_LIVE_SERVER=https://bookworm-backend.adaptable.app
VITE_LIVE_SERVER=http://localhost:5005
DEV_SERVER=http://localhost:5005
4 changes: 3 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
REACT_APP_SERVER_URL=http://localhost:5005
REACT_APP_SERVER_URL=http://localhost:5005
# update live server string when working locally - change to localhost:5005
VITE_LIVE_SERVER=
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ dist
dist-ssr
*.local

.env

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
68 changes: 68 additions & 0 deletions chatgpt.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import * as React from "react";
import { Button, Input } from "@fluentui/react-components";
import { useState, useEffect } from "react";
import axios from "axios";

function HomePage() {
const [prompt, setPrompt] = useState("");
const [message, setMessage] = useState("");

const handlePostReq = () => {
const url = "http://localhost:5005/api/completions";
const storedToken = localStorage.getItem("authToken");
axios
.post(
url,
{
message: prompt,
},
{
headers: { Authorization: `Bearer ${storedToken}` },
}
)
.then((resp) => console.log(resp))
.catch((error) => console.log(error));
};

// const getMessages = async () => {
// const options = {
// method: "POST",
// body: JSON.stringify({
// message: prompt,
// }),
// headers: {
// "Content-Type": "application/json",
// },
// };
// try {
// const response = await fetch(
// "http://localhost:5005/api/completions",
// options
// );
// console.log("hello");
// const data = await response.json();
// console.log(response);
// console.log(data);
// setMessage(data.choices[0].message);
// } catch (error) {
// console.error(error);
// }
// };

return (
<div class="container homepage">
<div class="homepage-1">
<img src={logo} alt="HopeMe Logo" />
</div>
<div>
<Input
onChange={(e) => setPrompt(e.target.value)}
placeholder="Add some detail"
/>
<Button onClick={handlePostReq}>Let's Book!</Button>
</div>
</div>
);
}

export default HomePage;
Loading