@radioactive-labs/plutonium
Advanced tools
Comparing version 0.1.6 to 0.1.7
{ | ||
"name": "@radioactive-labs/plutonium", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "Core assets for the Plutonium gem", | ||
@@ -5,0 +5,0 @@ "type": "module", |
100
README.md
@@ -1,95 +0,33 @@ | ||
# Plutonium: Nuclear ☢️ Reactor Included | ||
# Plutonium: It's like Rails, but for Rails! | ||
[![Ruby](https://github.com/radioactive-labs/plutonium-core/actions/workflows/main.yml/badge.svg)](https://github.com/radioactive-labs/plutonium-core/actions/workflows/main.yml) | ||
Watch the introduction video: [Plutonium in 30 minutes](https://www.youtube.com/watch?v=HMjzj-vVLIU) | ||
**Plutonium** is a powerful Rapid Application Development (RAD) toolkit for Rails that picks up where Rails left off, introducing application-level concepts and tooling that transform the way you build applications. | ||
--- | ||
## Overview | ||
**Plutonium** picks up where Rails left off, introducing application level concepts and tooling, transforming the way you build applications with Rails. | ||
It's a culmination of lessons learned from years of developing nearly identical applications and is designed to save you from the drudgery of re-implementation. | ||
Plutonium builds upon Rails' conventions and extends them with: | ||
**Why Choose Plutonium?** | ||
- **Authentication & Authorization**: Integrates seamlessly with Rodauth or your existing auth system | ||
- **Complete CRUD Operations**: Rich fields, forms, tables, and nested resources out of the box | ||
- **Modular Architecture**: Package system based on Rails engines for better organization | ||
- **Entity Scoping**: Built-in multi-tenancy support that "just works" | ||
- **Smart Generators**: Eliminate boilerplate while maintaining flexibility | ||
- **Modern UI**: Beautiful, responsive interface powered by Tailwind CSS and Hotwire | ||
- **Efficiency by Design:** Plutonium is built for developers who demand efficiency without compromise. It automates 90% of your application needs while giving you the flexibility to tailor the remaining 10% to your specific requirements. | ||
- **Comprehensive Features:** Plutonium covers a wide array of functionalities out of the box: | ||
- Authentication & Authorization | ||
- Complete CRUD operations with advanced features: customizable inputs, fields, tables, forms, pagination, actions, search, scopes, filtering, nested resources and much more. | ||
- Modular architecture leveraging Rails engines for improved packaging and namespacing. | ||
- Time-saving generators for boilerplate tasks. | ||
- **Omakase with a Twist:** Inspired by Rails' omakase philosophy, Plutonium delivers a convention-based approach but doesn't box you in. It's seamlessly integrated into your project, allowing you to write your application as you would with vanilla Rails but with powerful extensions. | ||
- **MVC and Beyond:** Plutonium adopts the MVC pattern, enhanced with modern web technologies like [hotwire](TODO), to deliver an interactive and robust user experience. It emphasizes progressive enhancement, ensuring a smooth development process and end-user experience. | ||
- **Rails Harmony:** A Plutonium app is a Rails app at its core. It respects and builds upon Rails' conventions, making it intuitive for Rails developers. If you know Rails, learning Plutonium requires only a few new concepts. | ||
- **Effortless Customization:** Plutonium is designed for easy customization to meet your unique requirements. Whether adjusting the functionality of entire resource groups or fine-tuning individual elements, our accessible low-level APIs and the familiar Rails conventions offer unparalleled flexibility. This ensures that any modifications you need to make can be implemented swiftly and smoothly, reducing complexity and enhancing your development experience. | ||
- **Community-Driven Dependencies:** Plutonium stands on the shoulders of giants, integrating with well-established gems chosen for their robustness and flexibility, including: | ||
- [ActiveInteraction](https://github.com/AaronLasseigne/active_interaction) for business logic | ||
- [Pagy](https://github.com/ddnexus/pagy) for pagination | ||
- [Action Policy](https://actionpolicy.evilmartians.io/): for authorization | ||
- [Simple Form](https://github.com/heartcombo/simple_form) for forms | ||
- [Rodauth](https://github.com/jeremyevans/rodauth) (via [rodauth-rails](https://github.com/janko/rodauth-rails)) for authentication. Rodauth is optional, allowing flexibility in choosing your auth solution | ||
## Project Status | ||
## Quick Start | ||
> [!WARNING] | ||
> While Plutonium is actively used in production environments, it's still in early development. APIs may change, and some features are still evolving. We recommend thoroughly testing before deploying to production. | ||
Get Plutonium up and running in your Rails application with these simple steps: | ||
## Documentation | ||
1. **Add Plutonium to your Gemfile:** | ||
Visit our [documentation](https://radioactive-labs.github.io/plutonium-core/) for: | ||
- Getting started guide | ||
- Installation instructions | ||
- Core concepts | ||
- Tutorials | ||
```ruby | ||
gem "plutonium" | ||
``` | ||
2. **Bundle Install:** | ||
```shell | ||
bundle | ||
``` | ||
3. **Install Plutonium:** | ||
```shell | ||
rails g pu:core:install | ||
``` | ||
Start building your Rails applications faster, with more flexibility and less boilerplate. **Plutonium** is here to revolutionize your development process. | ||
## Usage | ||
TODO: Write usage instructions here | ||
## Development | ||
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. | ||
To build assets, run `npm dev` | ||
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org). | ||
## Contributing | ||
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/plutonium. | ||
## License | ||
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). | ||
<!-- | ||
# ------------------------------ | ||
gem "plutonium", path: "/Users/stefan/code/plutonium/starters/plutonium/" | ||
gem "plutonium_generators", github: "radioactive-labs/plutonium-generators", group: [:development, :test] | ||
# rails new vulcan \ | ||
# --skip-action-mailbox --skip-action-text --skip-active-storage --skip-action-cable --skip-jbuilder \ | ||
# --skip-test --skip-system-test --javascript=esbuild --css=bootstrap --database=postgresql | ||
```bash | ||
rails new pluton8_starter --name="Pluton8 Starter" --database=sqlite3 --skip-action-mailbox --skip-action-text --skip-active-storage --asset-pipeline=propshaft --skip-jbuilder --javascript=importmap --css=tailwind | ||
bin/rails app:template LOCATION=/Users/stefan/code/plutonium/starters/vulcan/gems/plutonium/templates/base.rb | ||
``` | ||
rails g pu:rodauth:account admin --no-defaults --login --logout --remember --change-password --internal-request --create-account --lockout --verify-account --audit-logging --close-account --otp --reset-password --reset-password-notify --active-sessions --recovery-codes --password-grace-period | ||
--> |
import { Controller } from "@hotwired/stimulus" | ||
import { Dismiss } from 'flowbite'; | ||
// Connects to data-controller="resource-dismiss" | ||
export default class extends Controller { | ||
static targets = ["trigger", "target"] | ||
static values = { | ||
@@ -16,10 +12,5 @@ after: Number, | ||
// https://flowbite.com/docs/components/alerts/#javascript-behaviour | ||
this.dismiss = new Dismiss(this.targetTarget, this.triggerTarget); | ||
console.log(this.hasAfterValue) | ||
console.log(this.afterValue) | ||
if (this.hasAfterValue && this.afterValue > 0) { | ||
this.autoDismissTimeout = setTimeout(() => { | ||
this.hide() | ||
this.dismiss() | ||
this.autoDismissTimeout = null | ||
@@ -33,9 +24,8 @@ }, this.afterValue); | ||
this.dismiss = null | ||
this.autoDismissTimeout = null | ||
} | ||
hide() { | ||
this.dismiss.hide() | ||
dismiss() { | ||
this.element.remove() | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2100151
13723
34