/ultrasound-app

Fullstack web app. React JS + Spring Boot + MongoDB

Primary LanguageJava

ultrasound-app

Overview

This app was developed for a fellowship program through my local hospital. It provides a way to easily navagate 3000+ .mp4 files. It also allows editing and restructuring of data once the database is initalized. Files are parsed by name and the resulting data is modeled in MongoDB.

Created with React/TypeScript + Spring Boot + MongoDB. Authentication through Spring Security + JWT for role-based routing and privelages.

Frontend code
Backend code

Usage

Currently, you'll need to create and populate an S3 Bucket with .mp4 files and connect it to the backend through the AWS CLI.

Next, create a collection in mongodb called "roles" and add documents "ROLE_USER" and optionally "ROLE_ADMIN" as shown below.

Uploading this file through Mongo Express/Compass should do the trick.

If you want to use the admin privelages, uncomment the @CommandlineRunner method in the application's main method and then hit run. You'll then be able to login with the same credentials.

Also, make sure your application.properties file is configured as such:

  1. Fork/clone this repo

  2. Download Docker Desktop App

  3. Run the Docker Compose file found in the root directory.

  4. Access the Mongo Express UI at: localhost:8081

  5. Create the "roles" collection as mentioned above.

  6. To populate the database, make this POST request with Postman: http://localhost:8080/api/S3/update

  7. Access the app on localhost:80 and register!

Available Scripts

If you would rather skip the Docker proccess for the front/backend, follow the steps below.

You will still need to run the docker-compose file to get mongodb running locally. Just comment out the frontend/backend sections in the file.

mvn spring-boot:run

for the client, navigate to "react-client" and run:

yarn start

Then use the app locally on localhost:3000