The Air Web app is operated to collect and organize the data required to operate an efficient air quality regulatory program for the State of Georgia Environmental Protection Division (EPD) Air Protection Branch (APB).
The application is under active development to replace similar functionality currently housed in the Integrated Air Information Platform (IAIP). As each new module is developed, it will be removed from the IAIP until all functionality has been migrated and the IAIP can be retired.
This long-term project began with the Small Business Environmental Assistance Program which was migrated into a standalone application.
The current effort focuses on the Stationary Source Compliance Program, specifically the compliance monitoring and enforcement modules (which are also used by the EPD District Offices). This effort will also require updates to our ICIS-Air data flows.
The remaining IAIP modules are described in this discussion topic.
This is an ASP.NET web application.
The overall project is owned by the Air Protection Branch. Various modules are owned by the appropriate Programs within the Branch.
Complete the following tasks when the application is ready for deployment.
The solution contains the following projects:
There are also corresponding unit test projects for each, plus a TestData project containing test data for development and testing.
The following settings configure the data stores and authentication for development purposes. To change these settings,
add an "appsettings.Development.json" file in the root of the "WebApp" folder with a DevSettings
section and a
top-level setting named UseDevSettings
. Here's a sample "appsettings.Development.json" file to start out:
{
"DevSettings": {
"UseDevSettings": true,
"UseInMemoryData": true,
"UseEfMigrations": false,
"DeleteAndRebuildDatabase": true,
"UseAzureAd": false,
"LocalUserIsAuthenticated": true,
"LocalUserIsStaff": true,
"LocalUserIsAdmin": true,
"UseSecurityHeadersInDev": false
}
}
true
, the "LocalRepository" project is used for repositories and data stores. Data is initially seeded from
the "TestData" project.false
, the "EfRepository" project is used, and a SQL Server database (as specified by the connection
string) is created. (If the connection string is missing, then a temporary EF Core in-memory database
provider is used. This option is included for convenience and is not recommended.)true
. When false
,
the DeleteAndRebuildDatabase
setting controls how the database is handled. (Only applies if UseInMemoryData
is false
.)true
, the database is deleted and recreated on each run. When set
to false
, the database is not modified on each run. (Only applies if UseInMemoryData
and UseEfMigrations
are
both false
.) If the database does not exist yet, it will not be created if this is set to false
. The database is
seeded with data from the "TestData" project only when UseEfMigrations
is false
and DeleteAndRebuildDatabase
is true
. Otherwise, the data in the database is not changed.true
, connects to Azure AD for user authentication. (The app must be registered in the Azure
portal, and configuration added to the settings file.) If false
, authentication is simulated using test user data.true
. Simulates a failed login
when false
. (Only applies if UseAzureAd is false
.)true
or no roles
when false
. (Applies whether UserAzureAd is true
or false
.)true
or no roles when false
. (Applies
whether UserAzureAd is true
or false
.) An alternative way to create admin users is to add them to
the SeedAdminUsers
setting as an array of email addresses.When UseDevSettings
is missing or set to false
or if the DevSettings
section is missing, the settings are
automatically set to production defaults as follows:
UseInMemoryData = false,
UseEfMigrations = true,
DeleteAndRebuildDatabase = false,
UseAzureAd = true,
LocalUserIsAuthenticated = false,
LocalUserIsStaff = false,
LocalUserIsAdmin = false,
UseSecurityHeadersInDev: false
Here's a visualization of how the settings configure data storage at runtime.
flowchart LR
subgraph SPL["'UseInMemoryData' = true"]
direction LR
D[Domain]
T["Test Data (in memory)"]
R[Local Repositories]
A[App Services]
W([Web App])
W --> A
A --> D
A --> R
R --> T
T --> D
end
flowchart LR
subgraph SPB["'UseInMemoryData' = false"]
direction LR
D[Domain]
T[Test Data]
R[EF Repositories]
A[App Services]
W([Web App])
B[(Database)]
W --> A
A --> D
R --> B
A --> R
T -->|Seed| B
B --> D
end
flowchart LR
subgraph SPD["Production or staging environment"]
direction LR
D[Domain]
R[EF Repositories]
A[App Services]
W([Web App])
B[(Database)]
W --> A
A --> D
A --> R
R --> B
B --> D
end