violet_rails

an app engine for your business. Seamlessly implement business logic with a powerful API. Out of the box CMS, blog, forum and email functionality. Developer friendly & easily extendable for your next SaaS/XaaS project. Built with Rails 6, Devise, Sidekiq & PostgreSQL

MIT License

Stars
96
Committers
5

Bot releases are hidden (Show)

violet_rails - 0.9.45

Published by donrestarone about 2 years ago

What's Changed

[feature] Compliance visitor data request plugin

This system powers the compliance flows in nikean.org

Addresses #1073

When a visitor submits a data request form, this plugin will send an email with CSV attachments (one attachment per API namespace that has visitor-submitted data) to that visitor.

An external API connection with this plugin should be set up for the API namespace that has the form for submitting data request.

Message thread with attachments:
Capture2 Email with attachments:
Capture email_with_attachments

Metadata:

EXCLUDE_API_NAMESPACES: an array of slugs of API namespaces that will be excluded MESSAGE: the message that will be used in the email body SCAN_ALL_NAMESPACES: a boolean indicating whether or not all API namespaces should be scanned

  • if EXCLUDE_API_NAMESPACES is omitted or if it's an empty array, then SCAN_ALL_NAMESPACES should be provided and its value should be true
  • SCAN_ALL_NAMESPACES should be omitted if EXCLUDE_API_NAMESPACES is provided and it's not an empty array

metadata

Note that, in the screenshot above, SCAN_ALL_NAMESPACES is not provided because there are some API namespaces that should be excluded from scanning for visitor-submitted data.

Co-authored-by: Mushfiq Rahman [email protected]

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.44...0.9.45

violet_rails - 0.9.44

Published by donrestarone about 2 years ago

What's Changed

[feature] API renderer Allow ALL/ANY + limit resources

Addresses: https://github.com/restarone/violet_rails/issues/267, https://github.com/restarone/violet_rails/pull/1047#issuecomment-1249379969

How to use

Returns records that contains both of given values render_api_namespace_resource_index(@api_namespace.slug, { 'scope' => { 'properties' => { 'tags': { 'value': ['not action', 'comedy'], option: 'PARTIAL', match: 'ALL'} } } })

Returns records that contains atleast one of given values render_api_namespace_resource_index(@api_namespace.slug, { 'scope' => { 'properties' => { 'tags': { 'value': ['not action', 'comedy'], option: 'PARTIAL', match: 'ANY'} } } })

Limit Usage

render_api_namespace_resource_index(@api_namespace.slug, { 'limit': 10 })

Co-authored-by: Pralish Kayastha [email protected]

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.43...0.9.44

violet_rails - 0.9.43

Published by donrestarone about 2 years ago

What's Changed

[feature] API HTML renderer

Addresses: https://github.com/restarone/violet_rails/issues/267

guide for querying: https://github.com/restarone/violet_rails/pull/995 need better docs

Demo

https://user-images.githubusercontent.com/35935196/185770631-67a9aed9-bc09-47bd-b437-17e35cc824c6.mov

Demo Sortable

https://user-images.githubusercontent.com/50227291/188428768-00232faa-7fc0-4bf7-aae4-3e6714c171a8.mov

HOW TO USE

Api Resource Index

  • create snippet with identifier same as api_namespace slug
  • Variables available on snippet: @api_resources & @api_namespace
  • Render the snippet on any page with this helper: {{cms:helper render_api_namespace_resource_index 'identifier'}}
  • Is filterable using query params, eg: http://lvh.me:5250/?properties={"synced":"false"}

Api Resource show

  • create snippet with identifier as api_namespace slug with '-show' at the end, eg: people-show
  • Variables available on snippet: @api_resource & @api_namespace
  • Render the snippet on any page with this helper: {{cms:helper render_api_namespace_resource 'identifier'}}
  • id query params is mandetory, will raise 404 otherwise. eg: http://lvh.me:5250/?id=123
{{ cms:helper render_api_namespace_resource 'slug', scope: { properties:  { property: value } } }}

for sorting you can do something like:

{{ cms:helper render_api_namespace_resource_index 'cars', scope: { properties:  { published: 'true' }, order: { created_at: 'DESC' } } }}

to only show resources created by the logged in user:


{{ cms:helper render_api_namespace_resource_index 'time_tracker', scope: { current_user: true }, order: { created_at: 'DESC' } }}

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.42...0.9.43

violet_rails - 0.9.42

Published by donrestarone about 2 years ago

violet_rails - 0.9.41

Published by donrestarone about 2 years ago

What's Changed

Cookie consent for compliance

As of this version of Violet Rails we are including a default cookie consent banner for GDPR compliance. The default banner looks like this:

Styling the banner

Customizing the banner according to your brand and vision is easy. Our clients at Restarone have done just that, see below for examples

  • full banner
  • partial banner

To customize the banner, simply place your markup in the cookie consent banner field (marked in blue):

Screenshot 2022-09-11 at 15-15-38 markedrestaurant Admin

Engineering proofs

task: https://github.com/restarone/violet_rails/issues/1017

Demo

https://user-images.githubusercontent.com/50227291/186684043-b502d319-2865-4121-9d84-4c7789c17496.mov

Customizable cookies consent banner

https://user-images.githubusercontent.com/50227291/186684374-a7db4ecc-2c1b-4b78-98ba-f9ff680efd58.mov

Co-authored-by: Mushfiq Rahman [email protected]
Co-authored-by: donrestarone [email protected]
Co-authored-by: Pralish Kayastha [email protected]

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.40...0.9.41

violet_rails - 0.9.40

Published by donrestarone about 2 years ago

What's Changed

[Bug fix]: API form success flash message randomly showing in admin UI & creating an API resource from admin results in broken page

Addresses: https://github.com/restarone/violet_rails/issues/949 and https://github.com/restarone/violet_rails/issues/1043

Demo for creating an API resource from admin results in broken page

https://user-images.githubusercontent.com/25191509/187018834-7f2ca39f-2020-4755-b0c5-74aebb856380.mp4

Demo for API form success flash message randomly showing in admin UI

https://user-images.githubusercontent.com/25191509/187018864-32ed9a84-fa01-4040-b8b7-9bbc954771d9.mp4

Co-authored-by: Prashant [email protected]
Co-authored-by: Prashant Khadka [email protected]

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.39...0.9.40

violet_rails - 0.9.39

Published by donrestarone about 2 years ago

What's Changed

[feature] Include non primitive types in csv export

Addresses: https://github.com/restarone/violet_rails/issues/1061

Demo

https://user-images.githubusercontent.com/25191509/187054661-bd5c209b-58ba-4564-8f0b-338a6f864858.mp4

Co-authored-by: Prashant [email protected]

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.38...0.9.39

violet_rails - 0.9.37

Published by donrestarone about 2 years ago

What's Changed

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.36...0.9.37

violet_rails - 0.9.36

Published by donrestarone about 2 years ago

What's Changed

[feature] Render API Resource file attachment if representable

Addresses: https://github.com/restarone/violet_rails/issues/980

https://user-images.githubusercontent.com/25191509/185351232-f54d0792-dcfc-4af7-ad05-ce7486da72da.mp4

Co-authored-by: Prashant [email protected]

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.35...0.9.36

violet_rails - 0.9.35

Published by donrestarone about 2 years ago

What's Changed

Sidekiq namespace + queues

Make sure that each Violet Rails application is reading off a namespace so multiple apps can share Redis infrastructure (eg: AWS Elasticache).

resolves: https://github.com/restarone/violet_rails/issues/904 & https://github.com/restarone/violet_rails/issues/536

upgrade path: https://github.com/restarone/violet_rails/issues/908

CAVEATS 🔴

This will reset sidekiq job stats !

So be sure to drain all jobs BEFORE deploying this to production

Before

After

cheatsheet

tail the logs for sidekiq:

journalctl -u sidekiq.service -f

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.34...0.9.35

violet_rails - 0.9.34

Published by donrestarone about 2 years ago

What's Changed

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.33...0.9.34

violet_rails - 0.9.33

Published by donrestarone about 2 years ago

What's Changed

[feature] Run sidekiq in forked process on Heroku dyno

To run Sidekiq on Heroku free tier

Addresses: https://github.com/restarone/violet_rails/issues/665
set environment variable INLINE_SIDEKIQ_WITH_PUMA to true in Heroku.

Co-authored-by: Prashant [email protected]

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.32...0.9.33

violet_rails - 0.9.32

Published by donrestarone about 2 years ago

What's Changed

[feature]: Ability to download CSV of API resources

Addresses: https://github.com/restarone/violet_rails/issues/1014

https://user-images.githubusercontent.com/25191509/184860936-e3c58c0c-d836-4c51-8799-2f64dceb6b5b.mp4

image

Co-authored-by: Prashant [email protected]

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.31...0.9.32

violet_rails - 0.9.29

Published by donrestarone about 2 years ago

What's Changed

Addresses: https://github.com/restarone/violet_rails/issues/271

[feature] Conditional render snippet based on user session

https://user-images.githubusercontent.com/35935196/183777190-e9c330e1-f89a-4751-a34f-4a8de1abda23.mov

conditional rendering snippets / HTML strings

For showing a piece of UI for a logged in user:

{{ cms:helper logged_in_user_render, snippet_identifier }}
{{ cms:helper logged_in_user_render, "<span>I am logged in</span>", html: true }}  

For showing a piece of UI for a visitor:

{{ cms:helper logged_out_user_render, snippet_identifier }}
{{ cms:helper logged_out_user_render, "<span>I am logged in</span>", 

Usage example

I want to show admin controls if a user is logged in

  1. Create a snippet with the content you want:

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.28...0.9.29

violet_rails - 0.9.28

Published by donrestarone about 2 years ago

What's Changed

[Bug Fix] Redirect back if no redirect action is defined

Addresses: https://github.com/restarone/violet_rails/issues/949

Demo

https://user-images.githubusercontent.com/35935196/180993751-4c773627-5b41-4c93-a88e-8bcdd89ac2f0.mov

Co-authored-by: Pralish Kayastha [email protected]
Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.27...0.9.28

violet_rails - 0.9.27

Published by donrestarone about 2 years ago

What's Changed

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.26...0.9.27

violet_rails - 0.9.26

Published by donrestarone about 2 years ago

What's Changed

solves: https://github.com/restarone/violet_rails/issues/560

[Feature] Custom html snippet for flash message

Dynamic segments are in flash messages! 🎉 Now you can,

  1. use ERB / string interpolation in messages for dynamic segments
  2. Optionally use HTML, CSS, JS if you need heavily customized flash notification

Screenshots

Bootstrap HTML with ERB example:

rendered:

Demo

https://user-images.githubusercontent.com/35935196/180994051-e1753ea7-444d-4631-9b2d-b6d11ea6ae3f.mov

Co-authored-by: Pralish Kayastha [email protected]
Co-authored-by: Prashant Khadka [email protected]

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.25...0.9.26

violet_rails - 0.9.25

Published by donrestarone about 2 years ago

What's Changed

[Feature] return non primitive types in REST API and GraphQL response

Addresses: https://github.com/restarone/violet_rails/issues/875

Upgrade instructions: https://github.com/restarone/violet_rails/issues/1000

Co-authored-by: Pralish Kayastha [email protected]
Co-authored-by: Pralish Kayastha [email protected]

Full Changelog: https://github.com/restarone/violet_rails/compare/0.9.24...0.9.25

Badges
Extracted from project README
Brakeman Scan Heroku Deployments AWS EC2 Deployments
Related Projects