Iamogeee / BusinessConnect

0 stars 0 forks source link

Feedback for initial commit + database and sign up page pull-request #2

Open jose-esquivel opened 3 months ago

jose-esquivel commented 3 months ago

This is the thread to provide feedback for the first couple of days of Ogenna's work for her capstone project.

Commits: https://github.com/Iamogeee/BusinessConnect/commits/main/

jose-esquivel commented 3 months ago

Great work landing code at such a fast pace. You are displaying pretty good velocity here.

Some feedback I saw for this early code:

Code style feedback on the server files:

For example:

const { PrismaClient } = require("@prisma/client");
const cors = require("cors");
const express = require("express");
const bcrypt = require("bcrypt");

require("dotenv").config();

const prisma = new PrismaClient();
const saltRounds = 14;

const app = express();
app.use(express.json());
app.use(cors());

Again, you're doing great! keep it up :)

sinap-fb commented 3 months ago

This looks good to me so far! Great organization, and the schema stuff looked good to me! Minor nit:

mylesdomingo commented 3 months ago

Looking good, the schema design is very clear and shows solid retional understanding between users, businesses, and reviews. Some suggestions:

mylesdomingo commented 3 months ago

There's a lot of CSS, I assumed copied over from one of the previous' weeks projects. If you have a different design in mind, it might not be worth investing the time into extracting the CSS rules you need.

I talked about this in our 1:1, but it would be a good time investment to work with some sort of component library (if possible) to save time and focus on product experience rather than just UI.

Iamogeee commented 3 months ago

Looking good, the schema design is very clear and shows solid retional understanding between users, businesses, and reviews. Some suggestions:

  • businessHours I think could be a string, but most business have variable hours. (ex: 9-5 M-F, 12-7 Sat/Sun). How can you adapt this type to accomodate?
  • servicesOffered - This is now a String, but multiple services indicate needing an array of some sort. Maybe this is even worth extracting into another table called "Services". It would be interesting to tag and group/organize business based on what services they offered. So maybe a better type would be Services[]?

Thank you for the feedback! I agree that storing business hours as a string may not be flexible enough. Instead of storing them in the database, I'll be fetching this information from the Google Places API, which provides detailed and structured business hours. This approach allows me to avoid redundancy and keep my local schema simpler. However, if the need arises, I can adapt the schema to store detailed business hours in the future. Also, I have extracted servicesOffered into a separate Service model and created a many-to-many relationship with the Business model. This allows for better organization and tagging of businesses based on the services they offer. I will be using the Google Places API to fetch detailed business information, such as business hours and services offered. The specific data I need will be saved to a JSON file within my project. This setup allows for dynamic and up-to-date business information while keeping the local database schema clean and focused on user-specific data.