Skip to content

Shaik-Aayan-Javed/MeetingScheduler_Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

MeetingScheduler_Java

This repo contains a Web app which displays a Schedule. It uses HTML, CSS, JavaScript and Java [API].

What is it?

This Web App basically displays if N meetings can happen in an NxN grid [N-Queens Algorithm {backtracking}]. The backend logic is written in Java, and using spring-boot it turns it into a REST API. The Frontend calls this API thourgh the "fetch()" method in JavaScript to access the raw JSON data. The JSON data is processed and displayed.

Flow Chart

                              User opens browser
                                      ↓
                              http://localhost:8080/index.html
                                      ↓
                              Spring Boot serves HTML
                                      ↓
                              User clicks button
                                      ↓
                              JS calls /schedule
                                      ↓
                              Java backend runs algorithm
                                      ↓
                              Returns JSON
                                      ↓
                              Frontend updates UI

How to Use it?

You type a number N which is greater than 0 in the input field, then it displays a NxN schedule Grid where the green cell containing "M "stands for Meeting, and the red cell containing nothing for empty. Since the main logic revolves around backtracking, the greater the number the longer it is going to take to display the output. For some cases of N, where getting the desired output is not possible, you will get an alert message stating that it is not possible to have N meetings in an NxN schedule grid.

Technologies Used

For Front-End : HTML, CSS, JavaScript DOM

For Back-End : Java API [Spring-Boot libraries] and JavaScript fetch() method.

AI Tools I Used

ChatGPT : I didnt know how to connect my backend to frontend, after prompting around, i found out that using spring-boot might be the simplest modern method without linking it to a Database Server. It walked me through everything. Ofcourse this goes without saying but, it usually took a couple of prompts for it to understand where my issues where, but thats expexcted.

How to Run?

Note: Please Install Apache Maven Binary Zip File and add the bin to system variables. link: https://maven.apache.org/download.cgi#CurrentMaven

Step 1: Download the folder

Step 2: Open the folder in desired IDE [I used VS Code]

Step 3: Step i: Open terminal in the demo folder Ex : {PS C:\Users\shaik\Downloads\MeetingScheduler_Java-main (1)\MeetingScheduler_Java- main\MeetingRoomProject_J\demo} Step ii: Then Run : mvn spring-boot:run , this force downloads everything required

Step 4: Then Open http://localhost:8080/ in your browser.

Godspeed

About

This repo contains a Web app which uses Spring-Boot to turn the Java Code into a REST API that returns a 2d array [in the form of a .JSON], which then is called by Front-End [through JS fetch()] and is displayed [not directly].

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors