Deployment of frontend on vercel has time issues as the vercel follows the utc timezone and not local. Thus, the code for development and production slightly differs however can be installed locally through the steps mentioned below in the docs.
This feature that allows students to submit weekly preferences for attending class in-person or remotely. The tool then assigns available seats to students who want to physically attend class and provides the faculty with a roster of who has been cleared to attend.
- Student is prompted on each Saturday to choose to opt between in-person or remote classes.
- A status of the student is as followed - remote, designated, attend, absent
- If a student chooses in-person classes for the week, a seat is assigned for the student and is given a particular seat_no and the status is changed to designate. The designated student name and seat_no are sent to the dashboard of each faculty of the student.
- For the in-person opted students, a student arrives at time t1 for a s ubject, and when arrives and moves to its respective seat, needs to scan a QR code on the seat. If this QR code seat_no matches with the respective student seat_no then the status in the dashboard of the subject faculty changes to attending for the student only if the time at which the request is sent and the starting time of the subject class is <= 10 min. In this manner, automatic attendance for the in-person student is done for each subject.
- For the remote opted students, a google meet link is provided once the student enters the meet, the time is recorded on the time of entering for the student and the status has been changed to attending if a student enters the meet link in the first 10 min of the subject class.
- Client side - Vercel (https://microsoft-engage-21.vercel.app/)
- Server side - EC2 (http://ec2-13-232-90-241.ap-south-1.compute.amazonaws.com:4000)
- Credentials to utilize for students (for login) -
{ "email": "u18co059@coed.svnit.ac.in", "password": "Test#123" }
- Credentials to utilize for faculty (for login) -
{ "email": "upr@coed.svnit.ac.in", "password": "Test#123" }
- Clone -
git clone https://github.com/AemieJ/microsoft-engage-21.git scheduler
- Move into directory -
cd scheduler
- Node and NPM - https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
- Yarn [optional] - https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable
- PostgreSQL - https://www.postgresql.org/download/
Client side deals with the front-end user interactive code. The section include wireframe model link, followed by the tech stacks used and how to run the client on your local machine.
Figma Link - https://www.figma.com/file/peJwosnp6l4tXk6k6VgyvW/Microsoft?node-id=0%3A1
- Next JS + React
- Fetch
- React Bootstrap
-
Move to
/config/server.js
and replaceconst dev = 'production'
withconst dev = 'development'
. Perform this similar step with/config/db.js
file. -
Run
cd client
after cloning the repository and create a new .env file and include the following key-value pairs for utilizing the mail service -GMAIL_USER = example@gmail.com GMAIL_PASS = Test#123
For the testing purpose, you can use following credentials -
GMAIL_USER = bginger436@gmail.com GMAIL_PASS = GingerAle#945
-
Following this, go to your chrome browser with the gmail account and sign in with the credentials and perform the following -
- Disable 2 factor authentication
- Enable Low secure app access
- Click this link and enable it.
-
As the mail service is enabled, you will need to make a few change in the lines of code to perform the preferences option using the local timezone in development phase. Move to
/pages/subject/[code]/[date]/preferences.js
file and within this replace the lines [29-36] with the following code -let splits = date.split('-') let timeSplit = from.split(':') let fromEpoch = new Date(splits[2], (Number(splits[1]) - 1).toString(), splits[0], timeSplit[0], timeSplit[1]).getTime() timeSplit = to.split(':') let toEpoch = new Date(splits[2], (Number(splits[1]) - 1).toString(), splits[0], timeSplit[0], timeSplit[1]).getTime()
-
After performing this changes, open your terminal within this client directory and perform the following commands -
$ yarn $ yarn dev
(or)
$ npm install $ npm run dev
Server side is the backend code which creates the api to be utilized by the client. The section include the er diagram link, postman api link, tech stacks utilized and how to run it locally on your machine.
drawSQL - https://drawsql.app/dev-tree/diagrams/scheduler-microsoft-engage
API Public link - https://www.getpostman.com/collections/008bd1f3aca86bf89c72
- PostgreSQL
- NodeJS + Express
- Typescript
You can run the server locally on your machine or utilize the deploy server link.
-
Run
cd server
after cloning the repository and create a new .env file and include the following key-value pairs for enabling the postgres db and jwt -DB_NAME=ajeoucay DB_USER=ajeoucay DB_PASS=8zHG54y_gC7LjhDIH6O5ug6rFiqZ2mrq DB_HOST=castor.db.elephantsql.com DB_PORT=5432 JWT_SECRET=238dasAd230dj
-
After performing this changes, open your terminal within this server directory and perform the following commands -
$ yarn $ yarn start
(or)
$ npm install $ npm run start