This is a reference implementation of the weather application's frontend for the 2nd attempt of the "Software Management II" course at the Hochschule Burgenland in WS2024. It solely acts as a reference, not as a complete implementation, and it is not expected by students to produce a similar implementation.
The OpenAPI specification can be found in the backend repository.
See src/config/api.ts for all available and default configuration options. To run the frontend successfully, you need to provide the following environment variables (development/build time):
VITE_BACKEND_API_URL
: The URL of the backend API.VITE_METAR_API_URL
: The URL of the METAR API.VITE_AVWX_API_KEY
: The API key for the Aviation Weather Rest API in the formatToken avwx-api-key
. The value will be used in theAuthorization
header when calling the API.
The service is implemented in Node.js using the Vue and Quasar frameworks.
The code quality is ensured by the following tools:
- ESLint for JavaScript linting
- Vitest with v8 Coverage for code coverage
- NPM Audit for dependency security
- Conform for commit message linting
- CycloneDX for software bill of materials generation
- Grype for software bill of materials scanning
- Renovate for dependency updates
To run the tests, run the following command:
yarn test:unit:ci
yarn test:e2e:ci
To run the linting checks, run the following command:
# eslint with coverage
yarn lint
# you can fix some issues automatically
yarn fix
To generate the software bill of materials, run the following command:
yarn cyclonedx
grype sbom:.quasar/sbom.json
To run the service, run the following command:
yarn dev
To build the service, run the following command:
yarn build
Commit messages must adhere to the Conventional Commits specification.
To lint the commit messages, run the following command:
conform enforce
You can also use Commitizen to create commit messages:
cz commit
The GitHub Actions workflows ensure that all code quality checks pass and that the code is deployable.
The release workflow creates a new release with publishing the SBOM of the release and its build provenance.
After building the application, the distribution files are located in dist/spa.
You can find the deployment scripts in deploy.
Note: If deploying to the
us-east-1
region, remove the--create-bucket-configuration
parameter as this region is the default location constraint.
# deploy to an Amazon S3 Bucket with Website Hosting
./deploy/aws-s3-website.sh <BUCKET_NAME> <AWS_REGION> <CACHE_TIME>
# deploy to an Amazon CloudFront Distribution with an Amazon S3 Bucket as the origin
./deploy/cloudfront-s3.sh <BUCKET_NAME> <AWS_REGION> <CACHE_TIME> <AWS_ACCOUNT_ID>
- This project served as an experiment with GitHub Copilot (Anthropic Claude 3.5 Sonnet) creating approximately over 90% of the code, including tests and most code documentation.
- Some workflow steps are allowed to fail due to the repository being private and not having access to certain security features.
- The workflow does not store the artifacts of the release build. If necessary, you can add the
actions/upload-artifact
action to the workflow. - Features have been added, modified, or removed to showcase specific aspects of the implementation and software management.