wilkensonio / reconnect-api

1 stars 0 forks source link

ReConnect

Office Hours Communication System (API)

A communication tool for faculty to update students about office hour changes, displayed on LED screens outside offices.


Table of Contents


Installation

Dashboard Setup

Raspberry PI Setup

  1. Install these tools (if not already install), if preferred to run without docker go the step 1

  2. Clone the repository.

    
    git clone https://github.com/wilkensonio/reconnect-api.git
  3. Navigate to the root folder

    
    cd reconnect-api
  4. In the root Folder

    • Create a .env file

      • Add the following in the .env file

      • PRODUCTION='false'

      • DB_HOST=localhost

      • DB_USER=root

      • DB_PASSWORD=password

      • DB_NAME=DB_name

      • DB_PORT=3306

      • ACCESS_TOKEN_EXPIRE_MINUTES=60

      • SECRET_KEY="ba5ee6d4b415233337ca8d4ffa294818"

      • ALGORITHM="HS256"

      • SMTP_SERVER="smtp.gmail.com"

      • SMTP_PORT=587

      • SENDER_EMAIL="a gmail account"

      • SENDER_PASSWORD="app_password"

      • IFTTT_KEY=b3OPNt03ywOfjA306sApW1

      • SMS_API_KEY="5a10bc468b1c23d5efe4d507f266379bd9ee051a1mgRMs36YerkBCzp3OXqPOSLm"

      • ROOT_PASSWORD="password"

      • ROOT_EMAIL="reconnect@southernct.edu"

      Gmail password must be an app_password see Gmail documentation on how to get an app password get app_password

  5. Install Dependencies

    
    pip or pip3 install -r requirements.txt
  6. If step 0 (docker install) was skip go the step 7

  7. Run application

    • Run command : docker build -t fast .

      This command will build and image using the dockerfile and the image will be tag with the name fast. In the terminal verified that the image was built successfully.,

      Screenshot 2024-11-12 at 2 35 07 PM
    • Run command : docker run -p 8000:8000 fastapi-app

      This command will run a docker container using the docker image build from above

      Verify that the container is running in the terminal.

      docker run
    • visit http://0.0.0.0:8000/docs

      Visit the URL display on the terminal from the screenshot above, maybe different from the url above.

    • API docs: base_url:8000/docs

  8. Navigate the root directory

    • Run command :

      python3 uvicorn_config.py

      or

      python uvicorn_config.py

Usage

Contributors

Meet the team behind the project!

Acknowledgements

Special thanks to all contributors, supporters, and resources that helped make this project possible.