Open CarterN2000 opened 10 months ago
There is no grow section for client so im posting everything here. Glow: At first glance, code looks very clean and easy to read. The flow is also easy to understand because the file names are quite clear. The logo looks very nice and color scheme matches well with the topic of the project.
Grow: I see commented out code/console logs on multiple files. I also see a couple files with no working code inside. The delete button doesnt seem to work as intended. While on chat 7 and deleting chat 1 will still delete chat 7 no matter which chat's delete button i press. New chat only adds to the list AFTER i send a prompt(a little confusing) AND after refreshing the page.
I think tackling AI in the first place is an extremely impressive feat. I applaud both of you for taking on the challenge!
I love the sleek and modern design. It's really easy to navigate, even for a first-time visitor.
Your code is really clean and easy to follow. I think this will be really beneficial when potential employers review your project! (Example from pages/NewChatPrompt.jsx)
// 1- IMPORT USESTATE & SERVICE MODULE FUNCTION
import {useState} from "react";
import { createPrompt } from "../../utilities/chat-services"
import { createChat } from "../../utilities/chat-services"
export default function NewChat(props){
// 2- DEFINE LOCAL STATES AND VARIABLES
const [chatPrompt, setChatPrompt] = useState({
role: "user",
content: " "
})
// 3- DEFINE HANDLE REQUEST -> TO UPDATE LOCAL STATES
async function handleRequest(e){
setChatPrompt({...chatPrompt, [e.target.name]: e.target.value})
}
// 4- DEFINE HANDLE SUBMIT -> TO TAKE REQUEST TO BE/SERVICE MODULE
async function handleSubmit(e) {
e.preventDefault();
try{
//const newPrompt = await createPrompt(chatPrompt)
console.log("handle submit is working and passing data to service module")
}catch (error){
console.log(error)
}
Assuming you are in an already created chat, you are going to greatly enjoy talking to the AI chatbot. The design is simple and sleek, and you get fast responses to all your messages. I think making the chatbox function smoothly was one of the most difficult tasks in this project, so I am proud that at the end of the day, it now works! Here is a code snippet from our component.
https://github.com/CarterN2000/Project-3/blob/33f1eb7af1c01dc73952f99516b7edcc178779e2/frontend/src/components/Chat/index.jsx#L2-L137