This is a Ruby on Rails application. It includes:
- U.S. Web Design System (USWDS) for themeable styling and a set of common components
- Custom USWDS form builder
- Integration with AWS services, including
- Database integration with AWS RDS Postgresql using UUIDs
- Active Storage configuration with AWS S3
- Action Mailer configuration with AWS SES
- Authentication with devise and AWS Cognito
- Internationalization (i18n)
- Authorization using pundit
- Linting and code formatting using rubocop
- Testing using rspec
As a Rails app, much of the directory structure is driven by Rails conventions. We've also included directories for common patterns, such as adapters, form objects and services.
Refer to the Software Architecture doc for more detail.
Below are the primary directories to be aware of when working on the app:
├── app
│ ├── adapters # External services
│ │ └── *_adapter.rb
│ ├── controllers
│ ├── forms # Form objects
│ │ └── *_form.rb
│ ├── mailers
│ ├── models
│ │ └── concerns
│ ├── services # Shared cross-model business logic
│ │ └── *_service.rb
│ └── views
├── db
│ ├── migrate
│ └── schema.rb
├── config
│ ├── locales # i18n
│ └── routes.rb
├── spec # Tests
- A container runtime (e.g. Docker or Finch)
- By default,
docker
is used. To change this, set theCONTAINER_CMD
variable tofinch
(or whatever your container runtime is) in the shell.
- By default,
- An AWS account with a Cognito User Pool and App Client configured
- By default, the application configures authentication using AWS Cognito
You can run the app within a container or natively. Each requires slightly different setup steps.
In either case, first generate a .env
file:
- Run
make .env
to create a.env
file based on shared template. - Variables marked with
<FILL ME IN>
need to be manually set, and otherwise edit to your needs.
make init-container
Prerequisites:
Steps:
make init-native
Once you've completed the setup steps above, you can run the site natively or within a container runtime.
To run within a container:
make start-container
- Then visit http://localhost:3100
To run natively:
make start-native
- Then visit http://localhost:3000
Beyond this README, you should also refer to the docs
directory for more detailed info. Some highlights: