Skip to content

MJKSabit/spondon-javafest-23

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

60 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Spondon

Medical document store, verify and sharing platform with end-to-end encryption

Youtube Presentaion

Project Overview

  • Encourages user to store and share their medical records with end-to-end encryption

  • Verify a documents’ authenticity and identify prescription/medical record tempering

  • Identify patient negligence / doctor mistreatment with share history

  • Doctor-Patient Confidentiality, Patient has full control over his data

  • Faster Medical document (eg. fitness certificate) verification process

  • Emergency medical information

  • Organize medical documents in collection, easily share a group of documents

  • Public health analysis for Directorate General of Health ServicesΒ (DGHS)

Tech Stack

Frontend

  • ReactJS

  • React Bootsrap

  • Axios

  • React Router

  • Google Map SDK

  • SCSS

Backend

  • Spring Boot

  • Spring Web

  • Spring Security

  • JPA Hibernate

  • JWT Token

  • Lombok

  • Stanford Core NLP

  • Deep Learing for Java (dl4j)

  • Word2Vec Pretrained Model

Persitance

  • ProsgreSQL Database

  • Firebase Cloud Storage

Deployment and Automation

Frontend

Deplyment: Netlify

CI/CD: Trigger on deply-frontend branch

Backend

Backend was deplyed without NLP because the deeplearning4j and Stanford Core NLP take too much resources. Tokenization in the deployed version is done using regular expression and Word2Vec function similarity is rewritten by us in java.

This version of code is in without-ai branch

Deplyment: Azure

Docker Image: [URL](Docker docker push mjksabit/spondon-backend:without-nlp

CI/CD: Trigger on without-ai branch

Database

Deployment: Render

Architecture & Data Flow

Three Tier Archirecture: Presentation Tier, Logic Tier, Data Tier

External API

  • ImageBB: To upload image

  • Endless Medical: AI integrated symptom analyzer

  • ChatPDF: Analyze pdf files and ask questions

Entity Relationship Diagram

End-to-end Encryption

  • User have RSA public-private key pair, public key isΒ  stored in the database

  • When a document is uploaded, a random password is generated, which is used for AES encryption of the document

  • The generated key encrypted with user public key stored in the database for accessing the document later

  • All these are done at frontend

AI tools used

  • Endless Medical: AI integrated symptom analyzer [link]

  • ChatPDF: Analyze pdf files and ask questions [link]

  • Analysis: Stanford CoreNLP with deeplearing4j for tokenizing, sentence splitting, sentiment etc analysis of anonymous data using word2vec pretrained model

Project Structure

Backend

Dockerfile

./java/com/github/mjksabit
└── spondon
    β”œβ”€β”€ SpondonBackendApplication.java
    β”œβ”€β”€ consts
    β”œβ”€β”€ controller
    β”‚Β Β  └── All the controllers are here
    β”œβ”€β”€ model
    β”‚Β Β  └── All the entities are here
    β”œβ”€β”€ repository
    β”‚Β Β  └── All the repositories are here
    β”œβ”€β”€ security
    β”‚Β Β  └── Security configuration and JWT Filter
    β”œβ”€β”€ service
    β”‚Β Β  └── All the services
    └── util
resources
└── application.properties

Frontend

public
└── PUBLIC folder required by React

src/app
β”œβ”€β”€ App.js (Entry Point)
β”œβ”€β”€ App.scss (SASS Root)
β”œβ”€β”€ AppRoutes.js (React Router Entrypoint, Lazy loaded Components)
β”œβ”€β”€ admin
β”‚Β Β  └── Admin Related Components
β”œβ”€β”€ api
β”‚Β Β  └── All API calls
β”œβ”€β”€ common
β”‚Β Β  └── Common Components and security functions
β”œβ”€β”€ doctor
β”‚Β Β  └── Doctor Related Components
β”œβ”€β”€ firebase-config.js
β”œβ”€β”€ logo.svg
β”œβ”€β”€ shared
β”œβ”€β”€ user
β”‚Β Β  └── Doctor Related Components
└── user-pages
    └── Auth Related Components

Running the App

Frontend

  • Installing Dependency

    npm i
    
  • Running frondend

    npm start
    
  • Building frontend

    npm build
    

Backend

  • Running backend

    ./mvnw spring-boot:run
    
  • Building backend

    ./mvnw clean package
    java -jar target/spondon-0.0.1-SNAPSHOT.jar
    
  • Building & Running docker image

    docker build -t spondon-backend .
    docker run --env-file ./.env --expose=8080 -p 8080:8080 spondon-backend
    
  • Environment Variable

    DB_PASSWORD=
    DB_URL=
    DB_USER=
    DEBUG_MODE=false
    GMAIL=
    GMAIL_SMTP_PASSWORD=
    JWT_SECRET=
    FRONTEND_URL=https://sp0nd0n.netlify.app
    

Contributors 2

  •  
  •