Main Page is for User Who Wants To Create Schedule. Guest Page is For User Who Wants To Get A Meeting.
- Add Database String in .env ( PostgreSQL )
- pnpm db:migrate to create migration file
- pnpm db:push to push Migration Changes
- pnpm run dev to start the pplication
- Database => PostgreSQL with Neon
- ServerSide => NextJS Endpoints
The Meeting Length Per Each Meeting is Calculated By Finding The Time Difference First, and Calculating How Much There is Time Difference on Each Day. For More Info, you can read /api/route
The Meeting Systems Haven't Been Finalized, however, it allows the user to book the meeting time they want.
Example Of Implementation on Buffer Time Before And After The Meeting
const submitFunction = async () => {
//? If Starting Time Or Ending Time Doesn't Exist
if (timeState.startTime === 0 || timeState.endTime === 0) return;
//? Doesn't Allow Starting Time To Bigger Than
if (timeState.startTime > timeState.endTime) return;
//? Buffer Periods Before And After The Meetings * Number Of Meetings Shouldn't Be Smaller Than Difference Between End And Start Time, and Assume 3 Mins is Default Length
//? For Each Meeting
if (
2 * timeState.bufferPeriod * timeState.numberOfMeeting +
3 * timeState.numberOfMeeting >
timeState.endTime - timeState.startTime
)
return;
await axios.post("/api", { timeState }).then((res) => {
if (res.status === 200) setOpenState((prev) => !prev);
mutate(`/api?day=${selectedDate}`);
router.refresh();
});
};
- There Can Be Collision When Setting Up Multiple Meetings Time A Day
- Can Use React-Query Instead Of SWR For Data Fetching
- TRPC for More Type-Safe Query Call
- Data Validations Methods For Both Client and Server Side
- Amount Of Meeting Limit That Guest can have per day
- Can Change the Buffer Periods, and Schedule after setting up.