Categorygithub.com/GSC23-HeadHome/HeadHome-Backend
repository
0.0.0-20230603090221-9658b470419c
Repository: https://github.com/gsc23-headhome/headhome-backend.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

HeadHome

Your companion, every step of the way


HeadHome Backend

The HeadHome backend is responsible for real-time interactions between the dementia patients, caregivers and volunteers. This ensures that dementia patients can receive timely assistance from caregivers or nearby volunteers and help them to head home safely!

πŸ‘¨πŸ»β€πŸ’» Technology Stack



Go | Gin | Firebase | Google Maps Platform | Google Cloud Platform


Getting Started

This repo contains the backend application for HeadHome. Click here to view the full solution.

Go (Version 1.19+) must be installed to run this application.

βš™οΈ Β Steps to Setup

  1. Clone Repo
$ git clone https://github.com/GSC23-HeadHome/HeadHome-Backend.git
  1. Run the following code in bash to install the required dependencies
$ go get all
  1. Create a .env file and insert your Firebase Admin SDK private key and Maps API api key.
    Note: Place the entire Firebase Admin SDK private key json object on a single line and escape all \, \n and quotation(") characters with \. Lastly, surround the json object with double quotations "".
/*.env file*/
FIREBASE_ADMIN_PRIVATE_KEY=<your inline firebase admin private key>
MAPS_API_KEY=<your maps api key>
  1. Launch the server at 0.0.0.0:8080
$ go run ./cmd

πŸ”‘ Β Files and Directories

β”œβ”€β”€ cmd
β”‚Β Β  └──main.go
β”œβ”€β”€ controllers
β”‚Β Β  β”œβ”€β”€ care_giver_controller.go
β”‚Β Β  β”œβ”€β”€ care_receiver_controller.go
β”‚Β Β  β”œβ”€β”€ map_controller.go
β”‚Β Β  β”œβ”€β”€ sos_controller.go
β”‚Β Β  β”œβ”€β”€ travel_log_controller.go
β”‚Β Β  └── volunteers_controller.go
β”œβ”€β”€ database
β”‚Β Β  β”œβ”€β”€ care_giver_collection.go
β”‚Β Β  β”œβ”€β”€ care_receiver_collection.go
β”‚Β Β  β”œβ”€β”€ database.go
β”‚Β Β  β”œβ”€β”€ sos_log_collection.go
β”‚Β Β  β”œβ”€β”€ travel_log_collection.go
β”‚Β Β  └── volunteers_collection.go
β”œβ”€β”€ fcm
β”‚Β Β  └── fcm.go
β”œβ”€β”€ firebase_app
β”‚Β Β  └── firebase_app.go
β”œβ”€β”€ logic
β”‚Β Β  β”œβ”€β”€ direction.go
β”‚Β Β  └── util.go
β”œβ”€β”€ models
β”‚Β Β  β”œβ”€β”€ care_giver.go
β”‚Β Β  β”œβ”€β”€ care_receiver.go
β”‚Β Β  β”œβ”€β”€ sos_log.go
β”‚Β Β  β”œβ”€β”€ travel_log.go
β”‚Β Β  └── volunteers.go
β”œβ”€β”€ routes
β”‚Β Β  └── routes.go
β”œβ”€β”€ websocket.go
β”‚Β Β  β”œβ”€β”€ client.go
β”‚Β Β  β”œβ”€β”€ msg_pump.go
β”‚Β Β  β”œβ”€β”€ websocket.go
β”‚Β Β  └── ws_hub.go
β”œβ”€β”€ .env (not included in github repo)
β”œβ”€β”€ .gitignore
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
└── README.md

πŸ‘₯ Β Contributors

Chay Hui Xiang

Nanyang Technological University

Chang Dao Zheng

Nanyang Technological University

Marc Chern Di Yong

Nanyang Technological University

Ong Jing Xuan

Nanyang Technological University