-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Google Tag Manager and Privacy Center ENV vars to sample app, plus the ability to pass ENV vars to both privacy center and sample app during fides deploy
via .env
#2949
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
62e8f5c
feat: added GTM Tag manager checks using env vars
nicolas-ethyca c92c967
Reformat slightly for clarity
NevilleS a85dacd
Add FIDES_SAMPLE_APP__PRIVACY_CENTER_URL config var
NevilleS bdaa5e6
Add README docs for sample app
NevilleS 8ee5e57
Format & lint
NevilleS eb33d04
Update CHANGELOG
NevilleS bbbd485
Allow using the privacy experiences UI with beta flag
NevilleS e9365ef
Add ability to pass ENV vars to privacy center and sample app during …
NevilleS 1fae42b
Update CHANGELOG
NevilleS c615fa3
Update CHANGELOG
NevilleS 4fe2bab
Use vanilla <script> tag instead of next/script to insert into <head>
NevilleS 90188aa
Move GTM script back into next/script (@nicolas-ethyca was right!)
NevilleS 4486d1b
Call Fides.gtm() in sample app when GTM is configured
NevilleS 76bce79
Merge branch 'main' of github.com:ethyca/fides into feature/GTMIntegr…
NevilleS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Fides Sample App | ||
|
||
"Cookie House", a sample web application to help demonstrate some of the features of Fides! | ||
|
||
## Configuration | ||
|
||
This app requires zero configuration, but does support the following ENV vars to override defaults: | ||
|
||
| ENV var | Description | Default | | ||
| --------------------------------------------------- | ------------------------------------------------------------------------ | --------------------- | | ||
| FIDES_SAMPLE_APP\_\_DATABASE_HOST | Sample database host name | localhost | | ||
| FIDES_SAMPLE_APP\_\_DATABASE_PORT | Sample database port | 5432 | | ||
| FIDES_SAMPLE_APP\_\_DATABASE_USER | Sample database username | postgres | | ||
| FIDES_SAMPLE_APP\_\_DATABASE_PASSWORD | Sample database password | postgres | | ||
| FIDES_SAMPLE_APP\_\_DATABASE_DB | Sample database name | postgres_example | | ||
| FIDES_SAMPLE_APP\_\_GOOGLE_TAG_MANAGER_CONTAINER_ID | (optional) Google Tag Manager Container ID to inject, e.g. "GTM-ABCD123" | null | | ||
| FIDES_SAMPLE_APP\_\_PRIVACY_CENTER_URL | Fides Privacy Center URL | http://localhost:3001 | | ||
|
||
## Development | ||
|
||
To run locally, follow these steps: | ||
|
||
In `/clients/sample-app`: | ||
|
||
```bash | ||
npm install | ||
npm run dev | ||
``` | ||
|
||
This will automatically bring up a Docker Compose project to create a sample app database containing the Cookie House products data, so ensure you also have `docker` running locally. | ||
|
||
Once running successfully, open http://localhost:3000 to see the Cookie House! | ||
|
||
## Pre-commit | ||
|
||
Before committing any changes, run the following: | ||
|
||
```bash | ||
npm run format | ||
npm run lint | ||
npm run test | ||
``` | ||
|
||
## Testing | ||
|
||
This app (currently!) does not have any automated tests. However, it is used in the following automated E2E suites: | ||
|
||
- `clients/cypress-e2e/cypress/e2e` | ||
- `clients/privacy-center/cypress/e2e` | ||
|
||
These Cypress suites will automatically run in CI to ensure any changes to this app continue to work as expected. | ||
|
||
## Deployment | ||
|
||
To deploy this app, typically you should use the published `ethyca/fides-sample-app` Docker image which is production-built Next.js image. See https://docs.ethyca.com for more! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check failure
Code scanning / CodeQL
Hard-coded credentials