Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cdaringe/super-commerce
a demo set of postgres tables, row-level security migrations, and accompanying web app
https://github.com/cdaringe/super-commerce
koa postgresql row-level-security typescript
Last synced: about 1 month ago
JSON representation
a demo set of postgres tables, row-level security migrations, and accompanying web app
- Host: GitHub
- URL: https://github.com/cdaringe/super-commerce
- Owner: cdaringe
- Created: 2019-04-20T21:20:31.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T17:58:04.000Z (about 1 year ago)
- Last Synced: 2025-01-06T18:36:41.871Z (about 1 month ago)
- Topics: koa, postgresql, row-level-security, typescript
- Language: TypeScript
- Homepage: https://cdaringe.com/protect-bacon-with-rls
- Size: 68.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# super-commerce
a minimal viable demo of showing how to pragmatically:
- apply row-level security policies via postgresql, and
- integrate with rls protected resources in a web applicationsee [cdaringe.com/protect-bacon-with-rls](https://cdaringe.com/protect-bacon-with-rls)
for a guided tour.## usage
### prereqs
- install `docker` for running an ephemral postgres instance
- install `nodejs` for running the application server
- install `yarn` package manager to install dependencies
- consider reviewing the`src/migration/###-.sql` migration sql files
- it's worth seeing how rls is being implemented!### run
- run `yarn` in the project root. this will:
- purge any existing `commerce` database
- fire up a new db
- migrate the db
- compile the typescript files
- run the server application, attached to the database
- kill/purge the db - ``yarn db:container:kill`follow the onscreen instructions for more.