OkkarMin / where-to-mug

Where To Mug is a tool to help you determine which tutorial rooms are free in NTU
https://wheretomug.ml
4 stars 3 forks source link
nanyang-technological-university nextjs ntu ntu-where-to-mug open-source pandas

Where To Mug

Table of Contents
  1. Introduction
  2. Demo
  3. Tech Stack
  4. Documentation
  5. Run Locally
  6. Deployment
  7. Environment Variables
  8. API Reference
  9. Acknowledgements
  10. Feedback
  11. Authors

Introduction

Ever wonder which tutorial room is free* and which is not? 🀨

This tool could help you find out your dream tutorial room πŸ₯³

Search which tutorial room is free by:

The website is mobile respondsive too!!

Link to website: https://wheretomug.ml/

Demo

Demo

Tech Stack

Client: NextJs, ChakraUI

Server: NextJs API routes, Vercel

Others: EmailJs, SentryIO

We used EmailJs to collect feedbacks and SentryIO to log errors encountered by users.

Documentation

Folder Structure

    which-room-free/
    β”œβ”€πŸ“ data
    β”‚ β”œβ”€ rooms_with_cluster.json        //Rooms with cluster info
    β”‚ β”œβ”€ room_ids.json                  //Rooms with IDs info
    β”‚ β”œβ”€ room_occupancy.json            //Rooms with occupancy info
    β”œβ”€πŸ“ public
    β”‚ β”œβ”€πŸ“ assets
    β”‚ β”‚ β”œβ”€ room_not_found_image.svg     //Svg image for room not found
    β”‚ β”‚ β”œβ”€ study_modal_image.svg        //Svg image for intro modal
    β”œβ”€πŸ“ src
    β”‚ β”œβ”€πŸ“ components
    β”‚ β”‚ β”œβ”€ ScrollToTop.js               //Scroll to top button
    β”‚ β”‚ β”œβ”€ DisclaimerModel.tsx
    β”‚ β”‚ β”œβ”€ Feedback.js                  //Feedback form
    β”‚ β”‚ β”œβ”€ FilterOptions.tsx            //Room filter
    β”‚ β”‚ β”œβ”€ FreeRoomCard.tsx             //Individual room card
    β”‚ β”‚ β”œβ”€ FreeRoomsCardList.tsx        //List of room cards
    β”‚ β”‚ β”œβ”€ Main.tsx                     //Component for main page
    β”‚ β”‚ └─ RoomNotFound.tsx             //Room not found component
    β”‚ β”œβ”€πŸ“ pages
    β”‚ β”‚ β”œβ”€πŸ“ api
    β”‚ β”‚ β”‚ └─ index.js                   //API to filter rooms
    β”‚ β”‚ └─ index.tsx                    //Main page
    β”‚ └─ theme.tsx                      //Styling for the website
    └─README.md

Run Locally

Clone the project

  git clone https://github.com/OkkarMin/where-to-mug

Go to the project directory

  cd where-to-mug

Install dependencies

  npm install

Start the server

  npm run dev

Deployment

3 step process to deploying the site properly on vercel

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

EMAILJS_TEMPLATE_ID

EMAILJS_USER_ID

EMAILJS_SERVICE_ID

SENTRY_SERVER_INIT_PATH

SENTRY_UR

SENTRY_ORG

SENTRY_PROJECT

SENTRY_AUTH_TOKEN

API Reference

Get filtered rooms

  GET /api?currentDay=${currentDay}&timeSlot=${timeSlot}&searchText=${encodedSearchText}&cluster=${cluster}
Parameter Type Description
currentDay string target day
timeSlot string target timeSlot
searchText string target Room
cluster string target cluster

Acknowledgements

Feedback

If you have any feedback, please raise an issue in this repository

or

Write in to us using the feedback from, located at the bottom right of the website

Authors