9.2.1 • Published 1 month ago

@dwp/govuk-casa v9.2.1

Weekly downloads
268
License
ISC
Repository
github
Last release
1 month ago

CASA

A compact framework for building government services, quickly and securely.

Support

CASA is maintained by the DWP Engineering Practice.

Contributing

If you'd like to contribute any changes, enhancements or report issues, please take a look at our contribution guide.

Features

  • Adopts the GOVUK Design System which provides well-researched, accessible markup out of the box
  • Handles complex, conditional journey routing logic so you easily tailor users' journeys on the fly
  • Provides basic protection against some OWASP Top Ten vulnerabilities such as XSS, CSRF
  • Choose your own session management extension for customised data storage (e.g. apply encryption as required)
  • Shallow learning curve

Getting started

You'll need NodeJS v6.14.4 or higher to use CASA (we recommend using the latest LTS version, currently in the 10.x.x. branch), and npm v6.4.x or higher if running any of the package scripts.

Prepare your new project and install dependencies:

mkdir -p my-project
cd my-project
npm init -y
npm install --save-exact express express-session @dwp/govuk-casa

You can use any folder structure you're most comfortable with, but here's a suggested convention:

definitions/
  field-validators/
  journey.js
  pages.js
locales/
  en/
  cy/
routes/
static/
views/
  layouts/
  pages/
  partials/
app.js

If you just want to get a quick and dirty CASA application up and running, take a look at Deploying a CASA app first.

However, if you'd like to build an understanding of the core concepts involved in building a CASA app, a good place to start is to begin designing your User Journey. This will provide CASA with information about the high-level flow that a user takes through your service, including the various conditional forks that may appear in the journey. Visit Designing a User Journey to get started.

Once your user journey begins to take shape, you can start to create the HTML pages that will take your users through that journey, capturing data from them along the way. All markup is generated through Nunjucks templates, and you can use the GOVUK Design System components to generate elements that match the GOVUK styling. Visit Creating Pages to get started.

Now you've got some pages ready to collect data from the user, you'll most likely want to add a bit of validation logic to those data fields to make sure you're capturing the right stuff, in the right format. Visit Defining Field Validation to get started.

Finally, we need to bring all of this together, by creating a bootstrap script for our service. Visit Deploying a CASA app to get started.

That's it! The basics have been covered here, but if you want to delve deeper under the hood then take a read through the developer API documentation too.

8.15.2

1 month ago

9.2.1

1 month ago

6.10.1

1 month ago

9.2.0

3 months ago

8.15.1

3 months ago

8.15.0

3 months ago

6.9.15

3 months ago

4.2.0

3 months ago

9.1.0

3 months ago

7.2.0

3 months ago

6.10.0

3 months ago

5.3.1

3 months ago

9.0.0

4 months ago

6.9.14

4 months ago

8.14.3

4 months ago

7.1.16

4 months ago

8.14.2

5 months ago

8.14.1

5 months ago

8.11.1

10 months ago

8.11.0

10 months ago

8.12.0

10 months ago

8.13.0

9 months ago

8.14.0

6 months ago

8.7.9

1 year ago

8.8.0

1 year ago

6.9.13

11 months ago

6.9.12

1 year ago

6.9.11

1 year ago

6.9.10

1 year ago

8.10.0

1 year ago

8.10.2

12 months ago

8.10.1

12 months ago

8.9.0

1 year ago

7.1.13

1 year ago

7.1.14

1 year ago

8.9.2

1 year ago

7.1.11

1 year ago

8.9.1

1 year ago

7.1.12

1 year ago

7.1.10

1 year ago

7.1.15

11 months ago

8.7.12

1 year ago

8.7.4

1 year ago

8.7.3

1 year ago

8.7.6

1 year ago

8.7.5

1 year ago

8.7.8

1 year ago

8.7.7

1 year ago

7.1.7

1 year ago

7.1.6

1 year ago

7.1.5

1 year ago

7.1.9

1 year ago

7.1.8

1 year ago

6.9.6

1 year ago

6.9.5

1 year ago

6.9.8

1 year ago

6.9.7

1 year ago

6.9.9

1 year ago

8.6.0

2 years ago

8.7.2

1 year ago

8.7.1

1 year ago

8.7.0

1 year ago

7.1.2

1 year ago

7.1.0

2 years ago

8.5.2

2 years ago

8.5.1

2 years ago

6.9.2

1 year ago

8.2.7

2 years ago

8.2.8

2 years ago

8.4.0

2 years ago

8.3.0

2 years ago

8.2.6

2 years ago

8.2.3

2 years ago

8.2.2

2 years ago

8.2.5

2 years ago

8.2.4

2 years ago

8.2.3-dev

2 years ago

8.2.1

2 years ago

8.2.0

2 years ago

6.9.0

2 years ago

7.0.9

2 years ago

8.1.0

2 years ago

8.0.1

2 years ago

8.0.0

2 years ago

8.0.3

2 years ago

8.0.2

2 years ago

8.0.0-beta2

2 years ago

8.0.0-beta1

2 years ago

7.0.8

2 years ago

7.0.7

3 years ago

8.0.0-alpha2

3 years ago

8.0.0-alpha1

3 years ago

7.0.6

3 years ago

6.8.6

3 years ago

5.2.4

3 years ago

7.0.5

3 years ago

7.0.4

3 years ago

6.8.5

3 years ago

7.0.3

3 years ago

7.0.2

3 years ago

7.0.1

3 years ago

4.1.0

3 years ago

7.0.0-beta1

3 years ago

2.5.5

3 years ago

3.0.5

3 years ago

6.8.4

3 years ago

4.0.11

3 years ago

5.2.3

3 years ago

6.8.2

3 years ago

6.8.1

3 years ago

6.8.0

4 years ago

6.7.2

4 years ago

6.7.1

4 years ago

6.7.0

4 years ago

6.6.1

4 years ago

6.6.0

4 years ago

6.5.0

4 years ago

6.4.1

4 years ago

6.4.0

4 years ago

6.3.2

4 years ago

6.3.1

4 years ago

6.3.0

4 years ago

6.2.0

4 years ago

6.1.0

4 years ago

4.0.9

4 years ago

4.0.8

4 years ago

6.0.0

4 years ago

5.2.2

4 years ago

6.0.0-alpha.2

4 years ago

2.5.4

4 years ago

6.0.0-alpha.1

4 years ago

5.2.1

4 years ago

5.2.0

4 years ago

5.1.0

5 years ago

4.0.7

5 years ago

3.0.4

5 years ago

2.5.3

5 years ago

5.1.0-beta.3

5 years ago

5.1.0-beta.2

5 years ago

5.1.0-beta.1

5 years ago

5.0.1

5 years ago

4.0.6

5 years ago

3.0.3

5 years ago

5.0.0

5 years ago

5.0.0-alpha.4

5 years ago

5.0.0-alpha.3

5 years ago

4.0.5

5 years ago

5.0.0-alpha.2

5 years ago

5.0.0-alpha.1

5 years ago

4.0.4

5 years ago

4.0.3

5 years ago

3.0.2

5 years ago

2.5.2

5 years ago

4.0.2

5 years ago

2.5.1

5 years ago

4.0.1

5 years ago

2.5.0

5 years ago

4.0.0

5 years ago

3.0.1

5 years ago

2.4.3

5 years ago

3.0.0

5 years ago

2.4.2

5 years ago

2.4.1

5 years ago

2.4.0

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.1.1

6 years ago

2.1.0

6 years ago