Build and Test the Frontend

  1. Open a third terminal. Run the following command from the project’s root directory to build the frontend:

    ./gradlew :app:frontend:assemble
    
  2. Run the tests with a mock backend:

    ./gradlew :app:frontend:test
    
  3. Run the linter to check for code quality issues:

    ./gradlew :app:frontend:spotlessCheck
    
  4. If linter issues exist, try to fix them with the following command:

    ./gradlew :app:frontend:spotlessApply
    
  5. Navigate to app/frontend:

    cd app/frontend
    
  6. Start the frontend development server provided through the node package manager to see the app in action:

    npm run dev
    

    This command creates a session on localhost:5173 which connects the frontend to the user’s party. You can now log in locally as alice.

    Alice localhost connection ready
  7. Navigate to localhost:5173 in an incognito browser window and log in as alice. The username must be all lowercase.

    Alice localhost frontend UI
  8. Create a fourth terminal instance. Run the following command from the frontend directory to connect to the provider’s party:

    JSON_API_PORT=4003 npm run dev
    
    Provider localhost connection ready

    Note

    The provider’s session is most likely hosted on localhost:5174

  9. Log in as provider using all lowercase.

    Provider localhost frontend UI

Important

You now have a total of four terminals. You can organize them in four windows or use the terminal’s tab feature and cycle through each tab as needed.

Example of four terminal organization