Skip to content

Commit

Permalink
Implement native query endpoint (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi authored Sep 23, 2024
1 parent 222e79c commit c01bf20
Show file tree
Hide file tree
Showing 123 changed files with 300 additions and 41,421 deletions.
84 changes: 1 addition & 83 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:

jobs:
yml-md-style-and-link-checks:
uses: QubitPi/hashicorp-aws/.github/workflows/yml-md-style-and-link-checks.yml@master
uses: QubitPi/hashistack/.github/workflows/yml-md-style-and-link-checks.yml@master

tests:
name: Unit & Integration Tests
Expand All @@ -42,85 +42,3 @@ jobs:
uses: docker-practice/actions-setup-docker@master
- name: Run unit & integration tests
run: mvn -B clean verify

documentation:
name: Test & Release Documentation (including Javadoc)
needs: tests
outputs:
outcome: ${{ job.status }}
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Test environment setup
uses: ./.github/actions/ci-setup
- name: Install dependencies
working-directory: docs
run: yarn
- name: Build documentations
working-directory: docs
run: yarn build
- name: Generate Javadoc
run: mvn -B clean javadoc:javadoc
- name: Move Javadoc into documentation directory
if: github.ref == 'refs/heads/master'
run: mv target/site/apidocs/ docs/build/apidocs/
- name: Deploy documentation (including Javadoc) to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build
enable_jekyll: false
user_name: ${{ env.USER }}
user_email: ${{ env.EMAIL }}

docker-image:
name: Build Test & Release Development Docker Image
needs: tests
outputs:
outcome: ${{ job.status }}
continue-on-error: true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test environment setup
uses: ./.github/actions/ci-setup
- name: Build App WAR file so that Docker can pickup during image build
run: mvn clean package
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Test image build
uses: docker/build-push-action@v3
with:
context: .
push: false
- name: Login to DockerHub
if: github.ref == 'refs/heads/master'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push image to DockerHub
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/jersey-webservice-template:latest

slack-notification:
name: Send Slack Notification
if: ${{ always() }}
needs: [documentation, docker-image]
uses: QubitPi/hashicorp-aws/.github/workflows/slack-notification.yml@master
with:
job-status: ${{ (needs.documentation.outputs.outcome == 'success' && needs.docker-image.outputs.outcome == 'success') && 'success' || 'failure' }}
secrets:
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
65 changes: 1 addition & 64 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,4 @@
.idea/
target/
.DS_Store

# Created by https://www.toptal.com/developers/gitignore/api/packer,terraform
# Edit at https://www.toptal.com/developers/gitignore?templates=packer,terraform

### Packer ###
# Cache objects
packer_cache/

# Crash log
crash.log

# https://www.packer.io/guides/hcl/variables
# Exclude all .pkrvars.hcl files, which are likely to contain sensitive data,
# such as password, private keys, and other secrets. These should not be part of
# version control as they are data points which are potentially sensitive and
# subject to change depending on the environment.
#
*.pkrvars.hcl

# For built boxes
*.box

### Packer Patch ###
# ignore temporary output files
output-*/

### Terraform ###
# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.*.log

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Include override files you do wish to add to version control using negated pattern
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# Ignore CLI configuration files
.terraformrc
terraform.rc

.terraform.lock.hcl

# End of https://www.toptal.com/developers/gitignore/api/packer,terraform
application.properties
70 changes: 19 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,40 @@
Jersey Webservice Template <sup>![Java Version Badge][Java Version Badge]</sup>
===============================================================================
Aristotle
=========

[![GitHub Workflow Status][GitHub Workflow Status]](https://github.com/QubitPi/jersey-webservice-template/actions/workflows/ci-cd.yml)
![Last Commit](https://img.shields.io/github/last-commit/QubitPi/jersey-webservice-template/master?logo=github&style=for-the-badge)
[![Apache License Badge]](https://www.apache.org/licenses/LICENSE-2.0)
![GitHub Actions Badge][GitHub Actions Badge]
![Java Version Badge][Java Version Badge]
![HashiCorp Packer Badge][HashiCorp Packer Badge]
![HashiCorp Terraform Badge][HashiCorp Terraform Badge]
[![Apache License Badge]][Apache License, Version 2.0]

[Jersey Webservice Template (JWT)][jersey-webservice-template] is a [JSR 370] web service **template** that lets us
spin up Java web service quickly through [Golden Paths] approach.
Aristotle is a [JSR 370] [JAX-RS] webservice of CRUD operations against a graph database. It supports Neo4J now.

JWT seamlessly combines development and deployment of a Webservice API with
```bash
mvn clean verify
mvn clean package
```

1. a business-oriented approach using [Convention Over Configuration](https://en.wikipedia.org/wiki/Convention_over_configuration), which resulted in a highly opinionated APIs for web & mobile
2. the latest
[Immutable Infrastructure](https://www.hashicorp.com/resources/what-is-mutable-vs-immutable-infrastructure)
DevOp practice that
[fully automates the API deployment onto
AWS](https://qubitpi.github.io/hashicorp-aws/)

At the end of the day, JWT helps organization to **improve the velocity and quality of their teams' work**

Spinning Up and Deploying Webservice on JCP
-------------------------------------------

Coming Soon!

Documentation
Configuration
-------------

JWT supports 3 kinds of webservice templates:

- [A general scaffolding without any vertical-business logics](https://qubitpi.github.io/jersey-webservice-template/docs/intro)
- [A JPA webservice template backed by yahoo/elide](https://qubitpi.github.io/jersey-webservice-template/docs/crud/)
- An async jobstore webservice template similar to yahoo/fili's JobStore design (Developing...)
- `NEO4J_URI`
- `NEO4J_USERNAME`
- `NEO4J_PASSWORD`
- `NEO4J_DATABASE`

Comprehensive documentation is viewable on our [website][Documentation]
Deployment
----------

License
-------

The use and distribution terms for [jersey-webservice-template] are covered by the
[Apache License, Version 2.0][Apache License, Version 2.0].

<div align="center">
<a href="https://opensource.org/licenses">
<img align="center" width="50%" alt="License Illustration" src="https://github.com/QubitPi/QubitPi/blob/master/img/apache-2.png?raw=true">
</a>
</div>
The use and distribution terms for [Aristotle]() are covered by the [Apache License, Version 2.0].

[Apache License Badge]: https://img.shields.io/badge/Apache%202.0-F25910.svg?style=for-the-badge&logo=Apache&logoColor=white
[Apache License, Version 2.0]: http://www.apache.org/licenses/LICENSE-2.0.html

[Documentation]: https://qubitpi.github.io/jersey-webservice-template/

[How to set up GitHub Action Secrets]: https://docs.github.com/en/actions/security-guides/encrypted-secrets

[GitHub Actions Badge]: https://img.shields.io/badge/GitHub%20Actions-2088FF?style=for-the-badge&logo=githubactions&logoColor=white
[GitHub Workflow Status]: https://img.shields.io/github/actions/workflow/status/QubitPi/jersey-webservice-template/ci-cd.yml?branch=master&logo=github&style=for-the-badge
[Golden Paths]: https://www.hashicorp.com/blog/maturing-your-terraform-workflow#golden-paths
[Apache License, Version 2.0]: https://www.apache.org/licenses/LICENSE-2.0

[HashiCorp Packer Badge]: https://img.shields.io/badge/Packer-02A8EF?style=for-the-badge&logo=Packer&logoColor=white
[HashiCorp Terraform Badge]: https://img.shields.io/badge/Terraform-7B42BC?style=for-the-badge&logo=terraform&logoColor=white

[Java Version Badge]: https://img.shields.io/badge/Java-17-brightgreen?style=for-the-badge&logo=OpenJDK&logoColor=white
[Javadoc]: https://qubitpi.github.io/jersey-webservice-template/apidocs/
[jersey-webservice-template]: https://qubitpi.github.io/jersey-webservice-template/
[JAX-RS]: https://jcp.org/en/jsr/detail?id=370
[JSR 370]: https://jcp.org/en/jsr/detail?id=370

[The Technology Acceptance Model (TAM)]: https://open.ncl.ac.uk/theories/1/technology-acceptance-model/
File renamed without changes.
43 changes: 0 additions & 43 deletions docs/.gitignore

This file was deleted.

45 changes: 0 additions & 45 deletions docs/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/babel.config.js

This file was deleted.

Loading

0 comments on commit c01bf20

Please sign in to comment.