Coder Social home page Coder Social logo

bcgov / exitsurveyadmin Goto Github PK

View Code? Open in Web Editor NEW
3.0 7.0 1.0 4.11 MB

The Exit Survey Administration Tool will assist BC Stats in administering the BCPS Exit Survey.

Home Page: https://www2.gov.bc.ca/gov/content/data/statistics/government/employee-research/exit-survey

License: Apache License 2.0

HTML 0.87% JavaScript 1.04% CSS 0.05% C# 56.57% TypeScript 38.97% Shell 1.41% SCSS 1.08%
bcstats citz dotnet-core react

exitsurveyadmin's Introduction

[img]

ExitSurveyAdmin

The Exit Survey Administration Tool will assist BC Stats in administering the BCPS Exit Survey.

Development tasks

Running a development environment

Prerequisites

  1. Ensure the .NET Core SDK 3.1 is installed.
  2. Ensure you have the .NET EF Core CLI installed: dotnet tool install dotnet-ef --version 6.0.0
  3. Ensure the .NET Core HTTPS development certificate is trusted.
  4. Install Postgres and create a database named esa.
  5. Check out the code from this repository.

NB. To be fully functional, the application should be run in conjunction with the CallWeb API. The code for the CallWeb API is not publicly available. Please reach out to the project team for access. However, the project will still build and run without the CallWeb API.

Install EF Core dependencies

dotnet tool install dotnet-ef --version 6.0.0 dotnet add package Microsoft.EntityFrameworkCore --version 3.1.4 dotnet add package Microsoft.EntityFrameworkCore.Design --version 3.1.4

Config + secret settings

The application uses two appsettings.json files, one in the /config directory and one in /secret. This mirrors how the application gets deployed to OpenShift. /config/appsettings.json contains non-sensitive configuration for the application, while /secret/appsettings.json contains configuration that should not readily visible.

See also the comments in Program.cs about how the files get resolved when the application is deployed to OpenShift.

To get set up:

  1. Copy the contents of /config/appsettings.config-template.json into a new file, /config/appsettings.json, and update the values as appropriate.

  2. Do the same with /secret/appsettings.secret-template.json, copying it into /secret/appsettings.json.

  3. We also need to set up the frontend environment. In the /ClientApp directory, copy env.example into .env, and update the values as appropriate.

Run migrations

  1. From the root project directory, run dotnet ef database update. This will run the migrations and set up your development database. ENSURE THAT dotnet add package Microsoft.EntityFrameworkCore --version 3.1.4 dotnet add package Microsoft.EntityFrameworkCore.design --version 3.1.4

    Note that the database will be seeded automatically when the application is started.

Start the API

  1. Open the root code directory in Visual Studio Code. You may be prompted to add required assets and/or resolve dependencies; do so.
  2. While in Visual Studio Code, press CTRL + F5 to launch the API.
  3. Test that the API is running correctly by checking the HealthStatus. If the project is running at the default location and port: curl http://localhost:5050/api/HealthStatus/Status.

Install frontend dependencies

  1. From the /ClientApp directory run yarn install.

Start the frontend

  1. Still in the /ClientApp directory, run yarn start to launch the front-end. You should see the application open in a new browser.

Required sample input for development

The following sample documents should be placed in the /SampleInput folder, and can be obtained from the project team.

  • PSA-CSV-Sample.csv
  • CallWeb-Sample.csv

Quick database reset

This command will quickly drop the database, delete migrations, create an initial migration, and update the database.

dotnet ef database drop --force;rm -rf Migrations/*.cs;dotnet ef migrations add InitialCreate;dotnet ef database update

Copyright and license

Copyright 2019 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at 

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

exitsurveyadmin's People

Contributors

danebenal avatar dependabot[bot] avatar hangler avatar joshrint avatar karmour avatar repo-mountie[bot] avatar robinwn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

fosol

exitsurveyadmin's Issues

Add API access controls

Ensure that API methods can only be called by appropriate clients.

This will be some combination of whitelisting of server access and authentication/authorization.

Test shorter access token lifespan

Currently the realm setting is for 2 hours, but that is because of the shared application on the realm. See if a shorter setting is viable.

VPN access

I will likely need VPN access to check deployed versions of the app, connect to TFS, etc.

Questions around sign-in

For the log in functionality:

  • What credentials are required?
  • Is there already a standard login screen?
  • Is there SSO for government apps?
  • What are best practices here for BC government apps?

@robinwn you said you should be able to share code from an existing system, which might be helpful in answering some of these.

LDAP lookup for employee emails

@robinwn As we discussed, I will need some information (server, port, user ID, password) to make an LDAP lookup request to obtain an employee's email address. Feel free to send by whatever secure method makes sense!

Add missing topics

TL;DR

Topics greatly improve the discoverability of repos; please add the short code from the table below to the topics of your repo so that ministries can use GitHub's search to find out what repos belong to them and other visitors can find useful content (and reuse it!).

Why Topic

In short order we'll add our 800th repo. This large number clearly demonstrates the success of using GitHub and our Open Source initiative. This huge success means its critical that we work to make our content as discoverable as possible; Through discoverability, we promote code reuse across a large decentralized organization like the Government of British Columbia as well as allow ministries to find the repos they own.

What to do

Below is a table of abbreviation a.k.a short codes for each ministry; they're the ones used in all @gov.bc.ca email addresses. Please add the short codes of the ministry or organization that "owns" this repo as a topic.

add a topic

That's in, you're done!!!

How to use

Once topics are added, you can use them in GitHub's search. For example, enter something like org:bcgov topic:citz to find all the repos that belong to Citizens' Services. You can refine this search by adding key words specific to a subject you're interested in. To learn more about searching through repos check out GitHub's doc on searching.

Pro Tip ๐Ÿค“

  • If your org is not in the list below, or the table contains errors, please create an issue here.

  • While you're doing this, add additional topics that would help someone searching for "something". These can be the language used javascript or R; something like opendata or data for data only repos; or any other key words that are useful.

  • Add a meaningful description to your repo. This is hugely valuable to people looking through our repositories.

  • If your application is live, add the production URL.

Ministry Short Codes

Short Code Organization Name
AEST Advanced Education, Skills & Training
AGRI Agriculture
ALC Agriculture Land Commission
AG Attorney General
MCF Children & Family Development
CITZ Citizens' Services
DBC Destination BC
EMBC Emergency Management BC
EAO Environmental Assessment Office
EDUC Education
EMPR Energy, Mines & Petroleum Resources
ENV Environment & Climate Change Strategy
FIN Finance
FLNR Forests, Lands, Natural Resource Operations & Rural Development
HLTH Health
FLNR Indigenous Relations & Reconciliation
JEDC Jobs, Economic Development & Competitiveness
LBR Labour Policy & Legislation
LDB BC Liquor Distribution Branch
MMHA Mental Health & Addictions
MAH Municipal Affairs & Housing
BCPC Pension Corporation
PSA Public Safety & Solicitor General & Emergency B.C.
SDPR Social Development & Poverty Reduction
TCA Tourism, Arts & Culture
TRAN Transportation & Infrastructure

NOTE See an error or omission? Please create an issue here to get it remedied.

Design new CSV reconciliation process

Based on #4 and #6, we will need to design the new process. This will be a detailed description (including state diagram?) of the reconciliation process and how it works.

Implement draft CRUD APIs

Implement APIs, as appropriate, to create / read / update / delete the basic models:

  • Employee: #36
  • EmployeeTimelineEntry: #37
  • TaskLogEntry: #34

Build sample source data CSV

A sample CSV needs to be available for building the CSV extraction script (#20). Can use the existing extract but must edit to anonymize.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.