Skip to content

Frontend

Jonathan edited this page May 22, 2022 · 1 revision

Frontend Documentation

How To Run Locally

  1. Run API locally by using:
    • cd api
    • go build -o bin/go-rest-api main.go
    • go run main.go
  2. Run Frontend locally by using:
    • cd frontend
    • npm run dev
  • Both the API and Frontend must be running locally for this process to work.

Deployed Frontend

  • The deployed Frontend can be found through Gitlab>sdmay22-35>Deployments>Environments>frontend-next.
  • Click Open to open the deployed version of the Frontend.

File Layout

Main Folders within Frontend:

  1. components
    • Contains all the components that make up the Frontend pages. This includes all the map components, the footer, navigation bar, buttons, and chatbox.
  2. lib
    • Contains all calls made to the API. This includes getting coordinates for all the nodes, getting active and reactive power for all the nodes, sending text requests to the chatbot, etc.
  3. pages
    • Contains all the pages of the website which are routed by the name of the file. This includes a 404 page, initial enter page, active and reactive power page, etc.

Video Explanation

Clone this wiki locally