Skip to content

ucsb-cs156-s24/team02-s24-4pm-3

Repository files navigation

team02-s24-4pm-3

Table Team Member Github Id
UCSBDiningCommonsMenuItem Kevin C KevinChen0527
UCSBOrganization Kevin L coder626
RecommendationRequest Akshay a-k-u-m-a-r
MenuItemReview Mike MeDotE
HelpRequest Eric ericpretzel
Articles Tim tim-choi

Instructions: https://ucsb-cs156.github.io/s24/lab/team02.html

Deployments:

Setup before running application

Before running the application for the first time, you need to do the steps documented in docs/oauth.md.

Otherwise, when you try to login for the first time, you will likely see an error such as:

Authorization Error; Error 401: invalid_client; The OAuth client was not found.

Getting Started on localhost

  • Open two separate terminal windows
  • In the first window, start up the backend with:
    mvn spring-boot:run
    
  • In the second window:
    cd frontend
    npm install  # only on first run or when dependencies change
    npm start
    

Then, the app should be available on http://localhost:8080

If it doesn't work at first, e.g. you have a blank page on http://localhost:8080, give it a minute and a few page refreshes. Sometimes it takes a moment for everything to settle in.

If you see the following on localhost, make sure that you also have the frontend code running in a separate window.

Failed to connect to the frontend server... On Dokku, be sure that PRODUCTION is defined.  On localhost, open a second terminal window, cd into frontend and type: npm install; npm start";

Getting Started on Dokku

See: /docs/dokku.md

Accessing swagger

To access the swagger API endpoints, use:

Or add /swagger-ui/index.html to the URL of your dokku deployment.

To run React Storybook

SQL Database access

On localhost:

  • The SQL database is an H2 database and the data is stored in a file under target
  • Each time you do mvn clean the database is completely rebuilt from scratch
  • You can access the database console via a special route, http://localhost:8080/h2-console
  • For more info, see docs/h2-database.md

On Dokku, follow instructions for Dokku databases: