Skip to content
 
 

Repository files navigation

Backend API - Interactive Periodic Table Web Application

chem-icon

Features

  • Interactive periodic table of elements.
  • Experiment with chemistry.
  • Create an account:
    • Create flash cards.
    • Test your knowledge with a quiz automatically generated from your discovered compounds.

Development

Configure Java SDK 21 LTS

Important

The version of Java used by the project must match the version output by ./mvnw --version

Tip

Set JAVA_HOME to the location where your Java JDK is installed

Build system is Maven

# test
./mvnw test
# generate a .jar
./mvnw clean package
# skip tests
./mvnw clean package -DskipTests
# run
./mvnw spring-boot:run
# override default dev,local profiles
./mvnw spring-boot:run -Dapp.profiles=test

Manually build container image with Docker

docker build -t chemlab .
docker run --rm -p 8080:8080 chemlab

Configure a local MongoDB instance

Download, install MongoDB.

  • MongoDB w/ Docker:
docker pull mongo:7.0.40-jammy
docker run --name mongodb -p 27017:27017 -d mongo:7.0.40-jammy

Testing

Repository layer tests leverage MongoDB Testcontainers. A container runtime will need to be present before running repository tests.

Secrets kept using sops and age

decrypt prod secrets

$ sops -d src/main/resources/application-prod.enc.yml > src/main/resources/application-prod.yml

add recipient

  1. generate an age key pair: age-keygen -o key.txt
  2. add the key pair to a location where sops will find it
  3. add the age public key to .sops.yaml
  4. run updatekeys:
sops updatekeys src/main/resources/application-prod.enc.yml

encrypt prod secrets after changes to application-prod.yml

sops encrypt src/main/resources/application-prod.yml > src/main/resources/application-prod.enc.yml

Frontend built with Angular

Credits

This project was built with help from:

About

Chemistry Machine Processing with PubChem

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages