qanat-community
Welcome to the source code repository for the Groundwater Accounting Platform (codename "Qanat"). Qanat is a web application designed to help users monitor and understand their groundwater usage. By providing insights into water consumption and allocations, Qanat aims to promote sustainable water management practices.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.7%) to scientific vocabulary
Repository
Welcome to the source code repository for the Groundwater Accounting Platform (codename "Qanat"). Qanat is a web application designed to help users monitor and understand their groundwater usage. By providing insights into water consumption and allocations, Qanat aims to promote sustainable water management practices.
Basic Info
Statistics
- Stars: 7
- Watchers: 5
- Forks: 2
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Qanat Platform Documentation
Welcome to the Groundwater Accounting Platform (codename Qanat)! This guide provides comprehensive instructions for setting up and building the project locally. For any questions, please contact info@groundwateraccounting.org.
Developer Setup Instructions
Prerequisites
Ensure the following software is installed:
- Visual Studio 2022
- Visual Studio Code
- VS Code Extensions:
- Angular CLI from Balram Chavan
- Docker
- npm support for VS Code from egamma
- npm commands for VS Code from Florian Knop
- npm Intellisense from Christian Kohler
- Node.js (Ensure Node.js 18 is used via NVM if needed)
- Docker
- Microsoft SQL Server
- .NET 8 SDK
Qanat API Setup
Clone the repository:
Clone the repository toC:/git/sitkatechon your development machine.Set up a SQL user:
Create a SQL user (e.g.,DockerWebUser) with thesysadminrole and the passwordpassword#1. Ensure that password policies are not enforced.Configuration files:
Copy the template files and remove .template from their file name to produce the following environment variable files. Reach out if you need help filling these out, as they are secrets and should not be committed to the repository.
.env(from thedocker-composedirectory)appsecrets.json(from theQanat.APIdirectory)secrets(from theBuilddirectory)- Create a folder on your machine at the following address:
C:\sitka\Qanat\GeoServer- Create a file named geoserver-environment.properties in the above folder with the following contents:
datastore-host = host.docker.internal datastore-password = password#1 datastore-user = DockerWebUser datastore-database = QanatDB
- Create a file named geoserver-environment.properties in the above folder with the following contents:
Update environment configuration:
Copy[repo root dir]\docker-compose\.env.templateto[repo root dir]\docker-compose\.envand update the values.Open the solution in Visual Studio 2022:
Setdocker-composeas the startup project. Press the green play button to start the API server.
Build Folder
- Note for external developers: You will need to generate your own build folder based on your environment and infrastructure setup.
- For internal ESA developers, please contact the development team for guidance.
Qanat Web Setup
Open the web workspace:
Open theqanat-web-workspacein Visual Studio Code ([repo root dir]\Qanat.Web).Install dependencies and start the server:
In the VS Code terminal (or your favorite command line tool), run the following commands:
npm installnpm buildnpm start
- Debugging:
PressF5to launch the web app in Google Chrome and debug JavaScript in Visual Studio Code.
- You may need to set up a launch configuration to point to
https://qanat.localhost.sitkatech.com.
- Generate models:
Runnpm run gen-modelto generate models. If there’s an issue, use the following commands to resolve it:npm install @openapitools/openapi-generator-cli -gopenapi-generator-cli version-manager set 5.3.0
Local SSL Setup (API and Web)
Local certificates should be generated automatically:
- API:
- The
Qanat.API.csprojfile includes a post-build step during debugging that executesdotnet dev-certs https.
- Web:
- The
package.jsonfile has aprestartscript that checks for local development certificates and attempts to create them if they don't exist.
- The
Tests
The automated tests can be run locally after creating an environment.json file within the Qanat.Tests project with the correct values. These tests are run on our CI builds and should be fixed as soon as possible to avoid bugs piling up.
Troubleshooting After a Period of Inactivity
If the project doesn't work after not working on it for a while, try the following:
Run
npm install:
There might be updated or missing packages added by other developers.Download, Restore and Build the Database: Ensure your database matches the scaffolded entities by rebuilding your database.
Update Environment Variables:
Get the latest.env,appsecrets.json,build.inifiles from a colleague as there may be environment variables added since the last time you ran the project.Reach out to a colleague:
If you’re stuck, ask another developer who has recently worked on the project for help.
Configurations for Instances
Additional Front End Configuration:
- In the
Qanat.Web\src\environmentsfolder, update the values in the following TypeScript files to point to your instances's resources:environment.tsenvironment.qa.tsenvironment.prod.ts
- In
auth.config.ts, update themsalconfigsection to reflect your instance's configuration details.
Secrets:
- For internal ESA developers, please contact the development team to get the appropriate secret files.
- For external developers, you will need to generate your own secrets according to your infrastructure setup (e.g., Azure, Google Cloud, AWS, self hosted etc.).
License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
You may obtain a copy of the License at:
https://www.gnu.org/licenses/agpl-3.0
By using this project, you agree to the terms and conditions of this license, which ensure that any derivative works based on this project must also be open-source and made available to the public under the same terms.
Copyright California Water Data Consortium, Environmental Defense Fund, and Environmental Science Associates. Source code licensed under the AGPL 3.0.
Owner
- Login: esassoc
- Kind: user
- Repositories: 1
- Profile: https://github.com/esassoc
GitHub Events
Total
- Watch event: 7
- Push event: 14
- Fork event: 2
Last Year
- Watch event: 7
- Push event: 14
- Fork event: 2
Issues and Pull Requests
Last synced: 10 months ago
Dependencies
- base latest build
- build latest build
- mcr.microsoft.com/dotnet/aspnet 8.0 build
- mcr.microsoft.com/dotnet/sdk 8.0 build
- base latest build
- build latest build
- ghcr.io/osgeo/gdal ubuntu-full-3.8.5 build
- mcr.microsoft.com/dotnet/sdk 8.0 build
- base latest build
- build latest build
- mcr.microsoft.com/dotnet/aspnet 8.0 build
- mcr.microsoft.com/dotnet/sdk 8.0 build
- base latest build
- build latest build
- mcr.microsoft.com/dotnet/aspnet 8.0 build
- mcr.microsoft.com/dotnet/sdk 8.0 build
- qanat/web latest
- qanat/web latest
- qanat/web latest
- mcr.microsoft.com/mssql/server latest
- kartoza/geoserver 2.25.2
- qanat/api latest
- qanat/swagger latest
- qanat/api latest
- qanat/gdalapi latest
- qanat/swagger latest
- 1363 dependencies
- @angular-devkit/build-angular ^17.3.11 development
- @angular-eslint/builder ^17.3.11 development
- @angular-eslint/eslint-plugin ^17.3.11 development
- @angular-eslint/eslint-plugin-template ^17.3.11 development
- @angular-eslint/schematics ^17.3.11 development
- @angular-eslint/template-parser ^17.3.11 development
- @angular/cli ^17.3.11 development
- @angular/compiler-cli ^17.3.12 development
- @angular/language-service ^17.3.12 development
- @compodoc/compodoc ^1.1.19 development
- @fortawesome/fontawesome-free ^5.13.0 development
- @openapitools/openapi-generator-cli ^2.4.26 development
- @types/file-saver ^2.0.7 development
- @types/geojson ^7946.0.10 development
- @types/node ^13.13.50 development
- @typescript-eslint/eslint-plugin ^6.0.0 development
- @typescript-eslint/eslint-plugin-tslint ^6.0.0 development
- @typescript-eslint/parser ^6.0.0 development
- @typescript-eslint/types ^6.19.0 development
- eslint ^8.51.0 development
- eslint-config-airbnb-base ^15.0.0 development
- eslint-config-airbnb-typescript ^17.1.0 development
- eslint-config-prettier ^8.3.0 development
- eslint-plugin-import ^2.25.2 development
- eslint-plugin-prefer-arrow ^1.2.3 development
- eslint-plugin-simple-import-sort ^10.0.0 development
- eslint-plugin-unused-imports ^3.0.0 development
- install ^0.13.0 development
- npm ^10.6.0 development
- prettier ^3.4.2 development
- ts-node ~8.9.1 development
- typescript ^5.2.0 development
- @angular/animations ^17.3.12
- @angular/cdk ^17.1.0
- @angular/common ^17.3.12
- @angular/compiler ^17.3.12
- @angular/core ^17.3.12
- @angular/elements ^17.3.12
- @angular/forms ^17.3.12
- @angular/localize ^17.3.12
- @angular/platform-browser ^17.3.12
- @angular/platform-browser-dynamic ^17.3.12
- @angular/platform-server ^17.3.12
- @angular/router ^17.3.12
- @azure/msal-angular ^3.0.6
- @azure/msal-browser ^3.0.0
- @datadog/browser-logs ^5.15.0
- @ng-select/ng-select ^12.0.0
- @popperjs/core ^2.11.6
- @tinymce/tinymce-angular ^8.0.1
- ag-grid-angular ^32.0.0
- ag-grid-community ^32.0.0
- color-scheme ^1.0.1
- core-js ^3.6.5
- esri-leaflet ^3.0.10
- esri-leaflet-renderers ^3.0.0
- file-saver ^2.0.5
- font-awesome ^4.7.0
- google-palette ^1.1.0
- iso8601-js-period ^0.2.1
- leaflet ^1.7.1
- leaflet-gesture-handling ^1.2.2
- leaflet-loading ^0.1.24
- leaflet.fullscreen ^2.1.0
- leaflet.markercluster ^1.5.3
- ng-recaptcha ^13.2.1
- ngx-mask ^18.0.0
- ngx-pagination ^5.1.1
- ngx-select-dropdown ^3.3.0
- rxjs ^7.0.0
- set-value >=4.0.1
- style-loader ^3.3.3
- tinymce ^7.6.1
- tslib ^2.3.1
- vega ^5.24.0
- vega-embed ^6.21.3
- vega-lite ^5.6.1
- webpack ^5.30.0
- zone.js ~0.14.0
- Microsoft.EntityFrameworkCore.Design 8.0.7 development
- Azure.Storage.Blobs 12.21.2
- ClosedXML 0.102.3
- CsvHelper 33.0.1
- Google.Apis.Drive.v3 1.68.0.3508
- Hangfire.AspNetCore 1.8.14
- Hangfire.Core 1.8.14
- Hangfire.SqlServer 1.8.14
- IdentityServer4.AccessTokenValidation 3.0.1
- MaxRev.Gdal.Core 3.9.1.247
- MaxRev.Gdal.LinuxRuntime.Minimal 3.9.1.247
- Microsoft.AspNetCore.Authentication.OpenIdConnect 8.0.7
- Microsoft.AspNetCore.Mvc.NewtonsoftJson 8.0.7
- Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore 8.0.7
- Microsoft.Identity.Web 3.0.1
- Microsoft.VisualStudio.Azure.Containers.Tools.Targets 1.21.0
- NetTopologySuite.IO.GeoJSON 4.0.0
- Newtonsoft.Json 13.0.3
- SendGrid.Extensions.DependencyInjection 1.0.1
- Serilog.AspNetCore 8.0.2
- Serilog.Expressions 5.0.0
- Stateless 5.16.0
- Swashbuckle.AspNetCore 6.7.0
- Swashbuckle.AspNetCore.Annotations 6.7.0
- Swashbuckle.AspNetCore.Newtonsoft 6.7.0
- System.Data.SqlClient 4.8.6
- Microsoft.EntityFrameworkCore.Design 8.0.7 development
- Microsoft.EntityFrameworkCore.Tools 8.0.7 development
- Microsoft.AspNetCore.Http.Features 5.0.17
- Microsoft.EntityFrameworkCore 8.0.7
- Microsoft.EntityFrameworkCore.Relational 8.0.7
- Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite 8.0.7
- NetTopologySuite.Features 2.1.0
- NetTopologySuite.IO.GeoJSON 4.0.0
- NetTopologySuite.IO.GeoJSON4STJ 4.0.0
- ProjNET 2.0.0
- Microsoft.EntityFrameworkCore.Design 8.0.7 development
- Microsoft.EntityFrameworkCore.Tools 8.0.7 development
- Microsoft.EntityFrameworkCore 8.0.7
- Microsoft.EntityFrameworkCore.Relational 8.0.7
- Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite 8.0.7
- NetTopologySuite.IO.GeoJSON 4.0.0
- Stateless 5.16.0
- coverlet.collector 3.1.2 development
- IdentityModel 6.0.0
- MSTest.TestAdapter 2.2.10
- MSTest.TestFramework 2.2.10
- Microsoft.Extensions.Configuration 6.0.1
- Microsoft.Extensions.Configuration.Abstractions 6.0.0
- Microsoft.Extensions.Configuration.Json 6.0.0
- Microsoft.NET.Test.Sdk 17.2.0
- Azure.Storage.Blobs 12.21.2
- NetTopologySuite.Features 2.1.0
- NetTopologySuite.IO.GeoJSON4STJ 4.0.0
- Swashbuckle.AspNetCore 6.7.0
- CsvHelper 33.0.1
- Microsoft.AspNetCore.Http.Features 5.0.17
- NetTopologySuite.IO.GeoJSON 4.0.0
- Newtonsoft.Json 13.0.3
- ProjNET 2.0.0
- System.ComponentModel.Annotations 5.0.0
- Microsoft.EntityFrameworkCore.Design 8.0.7 development
- Microsoft.AspNetCore.Authentication.OpenIdConnect 8.0.7
- Microsoft.AspNetCore.Mvc.NewtonsoftJson 8.0.7
- Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore 8.0.7
- Microsoft.VisualStudio.Azure.Containers.Tools.Targets 1.21.0
- NetTopologySuite.IO.GeoJSON 4.0.0
- Serilog.AspNetCore 8.0.2
- Serilog.Expressions 5.0.0
- Swashbuckle.AspNetCore 6.7.0
- Swashbuckle.AspNetCore.Annotations 6.7.0
- Swashbuckle.AspNetCore.Newtonsoft 6.7.0
- coverlet.collector 6.0.2 development
- coverlet.msbuild 6.0.2 development
- Google.Apis.Drive.v3 1.68.0.3508
- Humanizer.Core 2.14.1
- MSTest.TestAdapter 3.5.1
- MSTest.TestFramework 3.6.0
- MaxRev.Gdal.Core 3.9.1.247
- MaxRev.Gdal.WindowsRuntime.Minimal 3.9.1.247
- Microsoft.Extensions.Configuration.Json 8.0.0
- Microsoft.NET.Test.Sdk 17.10.0
- Microsoft.SqlServer.DacFx 162.3.566
- Verify 26.4.5
- Verify.MSTest 26.4.5
- MSTest.TestAdapter 2.2.3
- MSTest.TestFramework 2.2.3
- Microsoft.NET.Test.Sdk 16.9.4
- coverlet.collector 3.0.2
- Newtonsoft.Json 12.0.3
- Serilog.AspNetCore 7.0.0