plutonium 0.33.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/# Plutonium: The pre-alpha demo.md +4 -2
  3. data/.claude/skills/assets/SKILL.md +416 -0
  4. data/.claude/skills/connect-resource/SKILL.md +112 -0
  5. data/.claude/skills/controller/SKILL.md +302 -0
  6. data/.claude/skills/create-resource/SKILL.md +240 -0
  7. data/.claude/skills/definition/SKILL.md +218 -0
  8. data/.claude/skills/definition-actions/SKILL.md +386 -0
  9. data/.claude/skills/definition-fields/SKILL.md +474 -0
  10. data/.claude/skills/definition-query/SKILL.md +334 -0
  11. data/.claude/skills/forms/SKILL.md +439 -0
  12. data/.claude/skills/installation/SKILL.md +300 -0
  13. data/.claude/skills/interaction/SKILL.md +382 -0
  14. data/.claude/skills/model/SKILL.md +267 -0
  15. data/.claude/skills/model-features/SKILL.md +286 -0
  16. data/.claude/skills/nested-resources/SKILL.md +274 -0
  17. data/.claude/skills/package/SKILL.md +191 -0
  18. data/.claude/skills/policy/SKILL.md +352 -0
  19. data/.claude/skills/portal/SKILL.md +400 -0
  20. data/.claude/skills/resource/SKILL.md +281 -0
  21. data/.claude/skills/rodauth/SKILL.md +452 -0
  22. data/.claude/skills/views/SKILL.md +563 -0
  23. data/Appraisals +46 -4
  24. data/CHANGELOG.md +36 -0
  25. data/app/assets/plutonium.css +2 -2
  26. data/config/brakeman.ignore +239 -0
  27. data/config/initializers/action_policy.rb +1 -1
  28. data/docs/.vitepress/config.ts +132 -47
  29. data/docs/concepts/architecture.md +226 -0
  30. data/docs/concepts/auto-detection.md +254 -0
  31. data/docs/concepts/index.md +61 -0
  32. data/docs/concepts/packages-portals.md +304 -0
  33. data/docs/concepts/resources.md +224 -0
  34. data/docs/cookbook/blog.md +412 -0
  35. data/docs/cookbook/index.md +289 -0
  36. data/docs/cookbook/saas.md +481 -0
  37. data/docs/getting-started/index.md +56 -0
  38. data/docs/getting-started/installation.md +146 -0
  39. data/docs/getting-started/tutorial/01-setup.md +118 -0
  40. data/docs/getting-started/tutorial/02-first-resource.md +180 -0
  41. data/docs/getting-started/tutorial/03-authentication.md +246 -0
  42. data/docs/getting-started/tutorial/04-authorization.md +170 -0
  43. data/docs/getting-started/tutorial/05-custom-actions.md +202 -0
  44. data/docs/getting-started/tutorial/06-nested-resources.md +147 -0
  45. data/docs/getting-started/tutorial/07-customizing-ui.md +254 -0
  46. data/docs/getting-started/tutorial/index.md +64 -0
  47. data/docs/guides/adding-resources.md +420 -0
  48. data/docs/guides/authentication.md +551 -0
  49. data/docs/guides/authorization.md +468 -0
  50. data/docs/guides/creating-packages.md +380 -0
  51. data/docs/guides/custom-actions.md +523 -0
  52. data/docs/guides/index.md +45 -0
  53. data/docs/guides/multi-tenancy.md +302 -0
  54. data/docs/guides/nested-resources.md +411 -0
  55. data/docs/guides/search-filtering.md +266 -0
  56. data/docs/guides/theming.md +321 -0
  57. data/docs/index.md +67 -26
  58. data/docs/public/CLAUDE.md +64 -21
  59. data/docs/reference/assets/index.md +496 -0
  60. data/docs/reference/controller/index.md +363 -0
  61. data/docs/reference/definition/actions.md +400 -0
  62. data/docs/reference/definition/fields.md +350 -0
  63. data/docs/reference/definition/index.md +252 -0
  64. data/docs/reference/definition/query.md +342 -0
  65. data/docs/reference/generators/index.md +469 -0
  66. data/docs/reference/index.md +49 -0
  67. data/docs/reference/interaction/index.md +445 -0
  68. data/docs/reference/model/features.md +248 -0
  69. data/docs/reference/model/index.md +219 -0
  70. data/docs/reference/policy/index.md +385 -0
  71. data/docs/reference/portal/index.md +382 -0
  72. data/docs/reference/views/forms.md +396 -0
  73. data/docs/reference/views/index.md +479 -0
  74. data/gemfiles/rails_7.gemfile +9 -2
  75. data/gemfiles/rails_7.gemfile.lock +146 -111
  76. data/gemfiles/rails_8.0.gemfile +20 -0
  77. data/gemfiles/rails_8.0.gemfile.lock +417 -0
  78. data/gemfiles/rails_8.1.gemfile +20 -0
  79. data/gemfiles/rails_8.1.gemfile.lock +419 -0
  80. data/lib/generators/pu/gem/dotenv/templates/.env +2 -0
  81. data/lib/generators/pu/gem/dotenv/templates/config/initializers/001_ensure_required_env.rb +3 -1
  82. data/lib/generators/pu/lib/plutonium_generators/model_generator_base.rb +13 -16
  83. data/lib/generators/pu/pkg/portal/USAGE +65 -0
  84. data/lib/generators/pu/pkg/portal/portal_generator.rb +22 -9
  85. data/lib/generators/pu/res/conn/USAGE +71 -0
  86. data/lib/generators/pu/res/model/USAGE +106 -110
  87. data/lib/generators/pu/res/model/templates/model.rb.tt +6 -2
  88. data/lib/generators/pu/res/scaffold/USAGE +85 -0
  89. data/lib/generators/pu/rodauth/install_generator.rb +2 -6
  90. data/lib/generators/pu/rodauth/templates/config/initializers/url_options.rb +17 -0
  91. data/lib/generators/pu/skills/sync/USAGE +14 -0
  92. data/lib/generators/pu/skills/sync/sync_generator.rb +66 -0
  93. data/lib/plutonium/action_policy/sti_policy_lookup.rb +1 -1
  94. data/lib/plutonium/core/controller.rb +2 -2
  95. data/lib/plutonium/interaction/base.rb +1 -0
  96. data/lib/plutonium/package/engine.rb +2 -2
  97. data/lib/plutonium/query/adhoc_block.rb +6 -2
  98. data/lib/plutonium/query/model_scope.rb +1 -1
  99. data/lib/plutonium/railtie.rb +4 -0
  100. data/lib/plutonium/resource/controllers/crud_actions/index_action.rb +1 -1
  101. data/lib/plutonium/resource/controllers/crud_actions.rb +21 -18
  102. data/lib/plutonium/resource/controllers/interactive_actions.rb +21 -25
  103. data/lib/plutonium/resource/query_object.rb +38 -8
  104. data/lib/plutonium/ui/table/components/scopes_bar.rb +39 -34
  105. data/lib/plutonium/version.rb +1 -1
  106. data/lib/tasks/release.rake +19 -4
  107. data/package.json +1 -1
  108. metadata +76 -39
  109. data/brakeman.ignore +0 -28
  110. data/docs/api-examples.md +0 -49
  111. data/docs/guide/claude-code-guide.md +0 -74
  112. data/docs/guide/deep-dive/authorization.md +0 -189
  113. data/docs/guide/deep-dive/multitenancy.md +0 -256
  114. data/docs/guide/deep-dive/resources.md +0 -390
  115. data/docs/guide/getting-started/01-installation.md +0 -165
  116. data/docs/guide/index.md +0 -28
  117. data/docs/guide/introduction/01-what-is-plutonium.md +0 -211
  118. data/docs/guide/introduction/02-core-concepts.md +0 -440
  119. data/docs/guide/tutorial/01-project-setup.md +0 -75
  120. data/docs/guide/tutorial/02-creating-a-feature-package.md +0 -45
  121. data/docs/guide/tutorial/03-defining-resources.md +0 -90
  122. data/docs/guide/tutorial/04-creating-a-portal.md +0 -101
  123. data/docs/guide/tutorial/05-customizing-the-ui.md +0 -128
  124. data/docs/guide/tutorial/06-adding-custom-actions.md +0 -101
  125. data/docs/guide/tutorial/07-implementing-authorization.md +0 -90
  126. data/docs/markdown-examples.md +0 -85
  127. data/docs/modules/action.md +0 -244
  128. data/docs/modules/authentication.md +0 -236
  129. data/docs/modules/configuration.md +0 -599
  130. data/docs/modules/controller.md +0 -443
  131. data/docs/modules/core.md +0 -316
  132. data/docs/modules/definition.md +0 -1308
  133. data/docs/modules/display.md +0 -759
  134. data/docs/modules/form.md +0 -495
  135. data/docs/modules/generator.md +0 -400
  136. data/docs/modules/index.md +0 -167
  137. data/docs/modules/interaction.md +0 -642
  138. data/docs/modules/package.md +0 -151
  139. data/docs/modules/policy.md +0 -176
  140. data/docs/modules/portal.md +0 -710
  141. data/docs/modules/query.md +0 -297
  142. data/docs/modules/resource_record.md +0 -618
  143. data/docs/modules/routing.md +0 -690
  144. data/docs/modules/table.md +0 -301
  145. data/docs/modules/ui.md +0 -631
@@ -0,0 +1,239 @@
1
+ {
2
+ "ignored_warnings": [
3
+ {
4
+ "warning_type": "SQL Injection",
5
+ "warning_code": 0,
6
+ "fingerprint": "271a450b0b138f9d6bddd60e7b4df305530443e5208d1a3b1f87d1218f553af0",
7
+ "check_name": "SQL",
8
+ "message": "Possible SQL injection",
9
+ "file": "lib/plutonium/query/filters/text.rb",
10
+ "line": 41,
11
+ "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
12
+ "code": "scope.where.not(\"#{key} LIKE ?\", \"%#{sanitize_like(query)}%\")",
13
+ "render_path": null,
14
+ "location": {
15
+ "type": "method",
16
+ "class": "Plutonium::Query::Filters::Text",
17
+ "method": "apply"
18
+ },
19
+ "user_input": "key",
20
+ "confidence": "Weak",
21
+ "cwe_id": [
22
+ 89
23
+ ],
24
+ "note": "False positive: 'key' is the filter attribute name from definition code, not user input. User input (query) is sanitized and parameterized."
25
+ },
26
+ {
27
+ "warning_type": "Dangerous Eval",
28
+ "warning_code": 13,
29
+ "fingerprint": "44b743fbf29936c657fcbd797826e3a9b826dce80eb82b93292505b355407f74",
30
+ "check_name": "Evaluation",
31
+ "message": "Dynamic string evaluated as code",
32
+ "file": "lib/plutonium/definition/defineable_props.rb",
33
+ "line": 38,
34
+ "link": "https://brakemanscanner.org/docs/warning_types/dangerous_eval/",
35
+ "code": "class_eval(\" def self.#{property_name}(name, **options, &block)\\n #{:\"defined_#{property_name.to_s.pluralize.to_sym}\"}[name] = { options:, block:}.compact\\n end\\n\\n def self.#{:\"defined_#{property_name.to_s.pluralize.to_sym}\"}\\n @#{:\"defined_#{property_name.to_s.pluralize.to_sym}\"} ||= {}\\n end\\n\\n def #{property_name}(name, **options, &block)\\n instance_#{:\"defined_#{property_name.to_s.pluralize.to_sym}\"}[name] = { options:, block:}.compact\\n end\\n\\n def #{:\"defined_#{property_name.to_s.pluralize.to_sym}\"}\\n @merged_#{:\"defined_#{property_name.to_s.pluralize.to_sym}\"} ||= begin\\n customize_#{property_name.to_s.pluralize.to_sym}\\n merged = {}\\n self.class.#{:\"defined_#{property_name.to_s.pluralize.to_sym}\"}.each do |name, data|\\n merged[name] = {\\n options: data[:options].dup,\\n block: data[:block]\\n }.compact\\n end\\n instance_#{:\"defined_#{property_name.to_s.pluralize.to_sym}\"}.each do |name, data|\\n if merged.key?(name)\\n merged[name][:options].merge!(data[:options])\\n merged[name][:block] = data[:block] if data[:block]\\n else\\n merged[name] = data\\n end\\n # merged[name].compact!\\n end\\n Plutonium::Lib::DeepFreezer.freeze(merged)\\n end\\n end\\n\\n def customize_#{property_name.to_s.pluralize.to_sym}\\n # Override in subclass to add or modify #{property_name.to_s.pluralize.to_sym}\\n end\\n\\n private\\n\\n def instance_#{:\"defined_#{property_name.to_s.pluralize.to_sym}\"}\\n @instance_#{:\"defined_#{property_name.to_s.pluralize.to_sym}\"} ||= {}\\n end\\n\", \"lib/plutonium/definition/defineable_props.rb\", 39)",
36
+ "render_path": null,
37
+ "location": {
38
+ "type": "method",
39
+ "class": "Plutonium::Definition::DefineableProps",
40
+ "method": "defineable_prop"
41
+ },
42
+ "user_input": null,
43
+ "confidence": "Weak",
44
+ "cwe_id": [
45
+ 913,
46
+ 95
47
+ ],
48
+ "note": "False positive: Metaprogramming DSL for definition properties. 'property_name' is a developer-controlled symbol from defineable_prop(:field) calls, not user input."
49
+ },
50
+ {
51
+ "warning_type": "SQL Injection",
52
+ "warning_code": 0,
53
+ "fingerprint": "518d4c5f2010311d92fb26011b5192b9c445f68b2705c67ed7606a3a7290d872",
54
+ "check_name": "SQL",
55
+ "message": "Possible SQL injection",
56
+ "file": "lib/plutonium/query/filters/text.rb",
57
+ "line": 37,
58
+ "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
59
+ "code": "scope.where(\"#{key} LIKE ?\", \"%#{sanitize_like(query)}\")",
60
+ "render_path": null,
61
+ "location": {
62
+ "type": "method",
63
+ "class": "Plutonium::Query::Filters::Text",
64
+ "method": "apply"
65
+ },
66
+ "user_input": "key",
67
+ "confidence": "Weak",
68
+ "cwe_id": [
69
+ 89
70
+ ],
71
+ "note": "False positive: 'key' is the filter attribute name from definition code, not user input. User input (query) is sanitized and parameterized."
72
+ },
73
+ {
74
+ "warning_type": "Dangerous Eval",
75
+ "warning_code": 13,
76
+ "fingerprint": "8ad6a5b14be66113bd7655b8e01de4b18eb6d3026d59afa208335c3f8a578938",
77
+ "check_name": "Evaluation",
78
+ "message": "Dynamic string evaluated as code",
79
+ "file": "lib/plutonium/resource/record/associations.rb",
80
+ "line": 35,
81
+ "link": "https://brakemanscanner.org/docs/warning_types/dangerous_eval/",
82
+ "code": "Module.new.module_eval(\" extend ActiveSupport::Concern\\n\\n #{generate_sgid_methods(association_type, name)}\\n\\n define_singleton_method(:to_s) { \\\"Plutonium::Resource::Record::Associations::#{association_type.to_s.camelize}(:#{name})\\\" }\\n define_singleton_method(:inspect) { \\\"Plutonium::Resource::Record::Associations::#{association_type.to_s.camelize}(:#{name})\\\" }\\n\", \"lib/plutonium/resource/record/associations.rb\", 36)",
83
+ "render_path": null,
84
+ "location": {
85
+ "type": "method",
86
+ "class": "Plutonium::Resource::Record::Associations",
87
+ "method": "include_secure_association_methods"
88
+ },
89
+ "user_input": null,
90
+ "confidence": "Weak",
91
+ "cwe_id": [
92
+ 913,
93
+ 95
94
+ ],
95
+ "note": "False positive: Metaprogramming to generate SGID methods. 'association_type' and 'name' come from Rails association declarations (belongs_to, has_many), not user input."
96
+ },
97
+ {
98
+ "warning_type": "SQL Injection",
99
+ "warning_code": 0,
100
+ "fingerprint": "8dfe5c4b519a9f0b86a541c70c54e42e4ad9aff7e2be6b1df88c9c46441f9fa1",
101
+ "check_name": "SQL",
102
+ "message": "Possible SQL injection",
103
+ "file": "lib/plutonium/query/filters/text.rb",
104
+ "line": 33,
105
+ "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
106
+ "code": "scope.where.not(\"#{key} LIKE ?\", query.tr(\"*\", \"%\"))",
107
+ "render_path": null,
108
+ "location": {
109
+ "type": "method",
110
+ "class": "Plutonium::Query::Filters::Text",
111
+ "method": "apply"
112
+ },
113
+ "user_input": "key",
114
+ "confidence": "Weak",
115
+ "cwe_id": [
116
+ 89
117
+ ],
118
+ "note": "False positive: 'key' is the filter attribute name from definition code, not user input. User input (query) is parameterized."
119
+ },
120
+ {
121
+ "warning_type": "Dangerous Eval",
122
+ "warning_code": 13,
123
+ "fingerprint": "a14cf69ee743ba0aa405725f018c186d6fdfa3f3f57a381613de1b2048621170",
124
+ "check_name": "Evaluation",
125
+ "message": "Dynamic string evaluated as code",
126
+ "file": "lib/plutonium/auth/rodauth.rb",
127
+ "line": 6,
128
+ "link": "https://brakemanscanner.org/docs/warning_types/dangerous_eval/",
129
+ "code": "Module.new.module_eval(\" extend ActiveSupport::Concern\\n\\n included do\\n helper_method :current_user\\n helper_method :logout_url\\n end\\n\\n private\\n\\n def rodauth(name = :#{name})\\n instance = super(name)\\n instance.url_options = default_url_options.presence\\n instance\\n end\\n\\n def current_user\\n rodauth.rails_account\\n end\\n\\n def logout_url\\n rodauth.logout_path\\n end\\n\\n define_singleton_method(:to_s) { \\\"Plutonium::Auth::Rodauth(:#{name})\\\" }\\n define_singleton_method(:inspect) { \\\"Plutonium::Auth::Rodauth(:#{name})\\\" }\\n\", \"lib/plutonium/auth/rodauth.rb\", 7)",
130
+ "render_path": null,
131
+ "location": {
132
+ "type": "method",
133
+ "class": "Plutonium::Auth::Rodauth",
134
+ "method": "s(:self).for"
135
+ },
136
+ "user_input": null,
137
+ "confidence": "Weak",
138
+ "cwe_id": [
139
+ 913,
140
+ 95
141
+ ],
142
+ "note": "False positive: Metaprogramming to generate auth module. 'name' is the Rodauth account name symbol from Plutonium::Auth::Rodauth(:user) calls, not user input."
143
+ },
144
+ {
145
+ "warning_type": "Dangerous Eval",
146
+ "warning_code": 13,
147
+ "fingerprint": "ac51d516bdbc88a0a624795dad1b3efc1d2744b3f2d7be7feb67e0b5cebab763",
148
+ "check_name": "Evaluation",
149
+ "message": "Dynamic string evaluated as code",
150
+ "file": "lib/plutonium/models/has_cents.rb",
151
+ "line": 134,
152
+ "link": "https://brakemanscanner.org/docs/warning_types/dangerous_eval/",
153
+ "code": "class_eval(\" # Getter method for the decimal representation of the cents value.\\n #\\n # @return [BigDecimal, nil] The decimal value or nil if cents_name is not present.\\n def #{(:\"#{cents_name.to_sym}_#{suffix}\" or cents_name.to_sym.to_s.gsub(/_cents$/, \"\").to_sym)}\\n #{cents_name.to_sym}.to_d / #{rate} if #{cents_name.to_sym}.present?\\n end\\n\\n # Setter method for the decimal representation of the cents value.\\n #\\n # @param value [Numeric, nil] The decimal value to be set.\\n def #{(:\"#{cents_name.to_sym}_#{suffix}\" or cents_name.to_sym.to_s.gsub(/_cents$/, \"\").to_sym)}=(value)\\n self.#{cents_name.to_sym} = begin\\n (BigDecimal(value.to_s) * #{rate}).to_i if value.present?\\n rescue ArgumentError\\n nil\\n end\\n end\\n\\n # Mark decimal field as invalid if cents field is not valid\\n after_validation do\\n next unless errors[#{cents_name.to_sym.inspect}].present?\\n\\n errors.add(#{(:\"#{cents_name.to_sym}_#{suffix}\" or cents_name.to_sym.to_s.gsub(/_cents$/, \"\").to_sym).inspect}, :invalid)\\n end\\n\", \"lib/plutonium/models/has_cents.rb\", 135)",
154
+ "render_path": null,
155
+ "location": {
156
+ "type": "method",
157
+ "class": "Plutonium::Models::HasCents::ClassMethods",
158
+ "method": "has_cents"
159
+ },
160
+ "user_input": null,
161
+ "confidence": "Weak",
162
+ "cwe_id": [
163
+ 913,
164
+ 95
165
+ ],
166
+ "note": "False positive: Metaprogramming to generate cents accessor methods. 'cents_name' is a developer-controlled column name from has_cents(:price_cents) calls, not user input."
167
+ },
168
+ {
169
+ "warning_type": "SQL Injection",
170
+ "warning_code": 0,
171
+ "fingerprint": "afed6c7afaebbaa728ff00e57bb65c966487b639ce86dffbdd0ccdba17d71cb4",
172
+ "check_name": "SQL",
173
+ "message": "Possible SQL injection",
174
+ "file": "lib/plutonium/query/filters/text.rb",
175
+ "line": 35,
176
+ "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
177
+ "code": "scope.where(\"#{key} LIKE ?\", \"#{sanitize_like(query)}%\")",
178
+ "render_path": null,
179
+ "location": {
180
+ "type": "method",
181
+ "class": "Plutonium::Query::Filters::Text",
182
+ "method": "apply"
183
+ },
184
+ "user_input": "key",
185
+ "confidence": "Weak",
186
+ "cwe_id": [
187
+ 89
188
+ ],
189
+ "note": "False positive: 'key' is the filter attribute name from definition code, not user input. User input (query) is sanitized and parameterized."
190
+ },
191
+ {
192
+ "warning_type": "SQL Injection",
193
+ "warning_code": 0,
194
+ "fingerprint": "b29525bf43d1696a7d20fdc6141a163199345bd32f6ac5667e9051ead7d0594e",
195
+ "check_name": "SQL",
196
+ "message": "Possible SQL injection",
197
+ "file": "lib/plutonium/query/filters/text.rb",
198
+ "line": 39,
199
+ "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
200
+ "code": "scope.where(\"#{key} LIKE ?\", \"%#{sanitize_like(query)}%\")",
201
+ "render_path": null,
202
+ "location": {
203
+ "type": "method",
204
+ "class": "Plutonium::Query::Filters::Text",
205
+ "method": "apply"
206
+ },
207
+ "user_input": "key",
208
+ "confidence": "Weak",
209
+ "cwe_id": [
210
+ 89
211
+ ],
212
+ "note": "False positive: 'key' is the filter attribute name from definition code, not user input. User input (query) is sanitized and parameterized."
213
+ },
214
+ {
215
+ "warning_type": "SQL Injection",
216
+ "warning_code": 0,
217
+ "fingerprint": "ca69d5ed79a379a2bc2d94d18662967f6d9e2af05d49bb9feb8be4de83a14035",
218
+ "check_name": "SQL",
219
+ "message": "Possible SQL injection",
220
+ "file": "lib/plutonium/query/filters/text.rb",
221
+ "line": 31,
222
+ "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
223
+ "code": "scope.where(\"#{key} LIKE ?\", query.tr(\"*\", \"%\"))",
224
+ "render_path": null,
225
+ "location": {
226
+ "type": "method",
227
+ "class": "Plutonium::Query::Filters::Text",
228
+ "method": "apply"
229
+ },
230
+ "user_input": "key",
231
+ "confidence": "Weak",
232
+ "cwe_id": [
233
+ 89
234
+ ],
235
+ "note": "False positive: 'key' is the filter attribute name from definition code, not user input. User input (query) is parameterized."
236
+ }
237
+ ],
238
+ "brakeman_version": "7.1.1"
239
+ }
@@ -6,4 +6,4 @@ Rails.application.config.to_prepare do
6
6
  # This allows STI models to use their base class's policy when a specific policy doesn't exist
7
7
  require "plutonium/action_policy/sti_policy_lookup"
8
8
  Plutonium::ActionPolicy::StiPolicyLookup.install!
9
- end
9
+ end
@@ -7,7 +7,7 @@ const base = "/plutonium-core/"
7
7
  export default defineConfig(withMermaid({
8
8
  base: base,
9
9
  title: "Plutonium",
10
- description: "The Ultimate Rapid Application Development Toolkit (RADKit) for Rails",
10
+ description: "Rapid Application Development for Rails",
11
11
  head: [["link", { rel: "icon", href: `${base}favicon.ico` }]],
12
12
  ignoreDeadLinks: 'localhostLinks',
13
13
  themeConfig: {
@@ -18,77 +18,162 @@ export default defineConfig(withMermaid({
18
18
  },
19
19
  nav: [
20
20
  { text: "Home", link: "/" },
21
- { text: "Guide", link: "/guide/introduction/01-what-is-plutonium" },
22
- { text: "Tutorial", link: "/guide/tutorial/01-project-setup" },
23
- { text: "Modules", link: "/modules/" },
24
- { text: "Demo", link: "https://plutonium-app.onrender.com/" }
21
+ { text: "Getting Started", link: "/getting-started/" },
22
+ { text: "Guides", link: "/guides/" },
23
+ { text: "Reference", link: "/reference/" },
24
+ { text: "Cookbook", link: "/cookbook/" },
25
+ { text: "Demo", link: "https://github.com/radioactive-labs/plutonium-core/tree/master/test/dummy" }
25
26
  ],
26
27
  sidebar: {
27
- '/guide/': [
28
+ '/getting-started/': [
28
29
  {
29
30
  text: "Getting Started",
30
31
  items: [
31
- { text: "Installation", link: "/guide/getting-started/01-installation" },
32
+ { text: "Overview", link: "/getting-started/" },
33
+ { text: "Installation", link: "/getting-started/installation" },
32
34
  ]
33
35
  },
34
36
  {
35
- text: "Introduction",
37
+ text: "Tutorial: Building a Blog",
38
+ collapsed: false,
39
+ items: [
40
+ { text: "Overview", link: "/getting-started/tutorial/" },
41
+ { text: "1. Project Setup", link: "/getting-started/tutorial/01-setup" },
42
+ { text: "2. First Resource", link: "/getting-started/tutorial/02-first-resource" },
43
+ { text: "3. Authentication", link: "/getting-started/tutorial/03-authentication" },
44
+ { text: "4. Authorization", link: "/getting-started/tutorial/04-authorization" },
45
+ { text: "5. Custom Actions", link: "/getting-started/tutorial/05-custom-actions" },
46
+ { text: "6. Nested Resources", link: "/getting-started/tutorial/06-nested-resources" },
47
+ { text: "7. Customizing UI", link: "/getting-started/tutorial/07-customizing-ui" },
48
+ ]
49
+ }
50
+ ],
51
+ '/concepts/': [
52
+ {
53
+ text: "Core Concepts",
54
+ items: [
55
+ { text: "Overview", link: "/concepts/" },
56
+ { text: "Architecture", link: "/concepts/architecture" },
57
+ { text: "Resources", link: "/concepts/resources" },
58
+ { text: "Packages & Portals", link: "/concepts/packages-portals" },
59
+ { text: "Auto-Detection", link: "/concepts/auto-detection" },
60
+ ]
61
+ }
62
+ ],
63
+ '/guides/': [
64
+ {
65
+ text: "Guides",
66
+ items: [
67
+ { text: "Overview", link: "/guides/" },
68
+ ]
69
+ },
70
+ {
71
+ text: "Setup & Resources",
36
72
  items: [
37
- { text: "What is Plutonium?", link: "/guide/introduction/01-what-is-plutonium" },
38
- { text: "Core Concepts", link: "/guide/introduction/02-core-concepts" },
73
+ { text: "Adding Resources", link: "/guides/adding-resources" },
74
+ { text: "Creating Packages", link: "/guides/creating-packages" },
39
75
  ]
40
76
  },
41
77
  {
42
- text: "Tutorial (Building a Blog)",
78
+ text: "Auth",
79
+ items: [
80
+ { text: "Authentication", link: "/guides/authentication" },
81
+ { text: "Authorization", link: "/guides/authorization" },
82
+ ]
83
+ },
84
+ {
85
+ text: "Features",
86
+ items: [
87
+ { text: "Custom Actions", link: "/guides/custom-actions" },
88
+ { text: "Nested Resources", link: "/guides/nested-resources" },
89
+ { text: "Multi-tenancy", link: "/guides/multi-tenancy" },
90
+ { text: "Search & Filtering", link: "/guides/search-filtering" },
91
+ ]
92
+ },
93
+ {
94
+ text: "Customization",
95
+ items: [
96
+ { text: "Theming", link: "/guides/theming" },
97
+ ]
98
+ }
99
+ ],
100
+ '/reference/': [
101
+ {
102
+ text: "Reference",
103
+ items: [
104
+ { text: "Overview", link: "/reference/" },
105
+ ]
106
+ },
107
+ {
108
+ text: "Model",
109
+ collapsed: false,
110
+ items: [
111
+ { text: "Model", link: "/reference/model/" },
112
+ { text: "Features", link: "/reference/model/features" },
113
+ ]
114
+ },
115
+ {
116
+ text: "Definition",
117
+ collapsed: false,
118
+ items: [
119
+ { text: "Definition", link: "/reference/definition/" },
120
+ { text: "Fields", link: "/reference/definition/fields" },
121
+ { text: "Actions", link: "/reference/definition/actions" },
122
+ { text: "Query", link: "/reference/definition/query" },
123
+ ]
124
+ },
125
+ {
126
+ text: "Policy",
127
+ collapsed: false,
128
+ items: [
129
+ { text: "Policy", link: "/reference/policy/" },
130
+ ]
131
+ },
132
+ {
133
+ text: "Controller",
134
+ collapsed: false,
135
+ items: [
136
+ { text: "Controller", link: "/reference/controller/" },
137
+ ]
138
+ },
139
+ {
140
+ text: "Interaction",
43
141
  collapsed: false,
44
142
  items: [
45
- { text: "1. Project Setup", link: "/guide/tutorial/01-project-setup" },
46
- { text: "2. Creating a Feature Package", link: "/guide/tutorial/02-creating-a-feature-package" },
47
- { text: "3. Defining Resources", link: "/guide/tutorial/03-defining-resources" },
48
- { text: "4. Creating a Portal", link: "/guide/tutorial/04-creating-a-portal" },
49
- { text: "5. Customizing the UI", link: "/guide/tutorial/05-customizing-the-ui" },
50
- { text: "6. Adding Custom Actions", link: "/guide/tutorial/06-adding-custom-actions" },
51
- { text: "7. Implementing Authorization", link: "/guide/tutorial/07-implementing-authorization" },
143
+ { text: "Interaction", link: "/reference/interaction/" },
52
144
  ]
53
145
  },
54
146
  {
55
- text: "Deep Dive",
147
+ text: "Views",
148
+ collapsed: false,
56
149
  items: [
57
- { text: "Resources", link: "/guide/deep-dive/resources" },
58
- { text: "Authorization", link: "/guide/deep-dive/authorization" },
59
- { text: "Multitenancy", link: "/guide/deep-dive/multitenancy" },
60
- { text: "Modules", link: "/modules/" },
150
+ { text: "Views", link: "/reference/views/" },
151
+ { text: "Forms", link: "/reference/views/forms" },
61
152
  ]
62
153
  },
63
154
  {
64
- text: "Developer Tools",
155
+ text: "Assets",
156
+ collapsed: false,
65
157
  items: [
66
- { text: "Claude Code Guide", link: "/guide/claude-code-guide" },
158
+ { text: "Assets", link: "/reference/assets/" },
159
+ ]
160
+ },
161
+ {
162
+ text: "Infrastructure",
163
+ collapsed: false,
164
+ items: [
165
+ { text: "Generators", link: "/reference/generators/" },
166
+ { text: "Portal", link: "/reference/portal/" },
67
167
  ]
68
168
  }
69
169
  ],
70
- '/modules/': [
71
- {
72
- text: "Modules",
73
- items: [
74
- { text: "Overview", link: "/modules/" },
75
- { text: "Action", link: "/modules/action" },
76
- { text: "Authentication", link: "/modules/authentication" },
77
- { text: "Configuration", link: "/modules/configuration" },
78
- { text: "Core", link: "/modules/core" },
79
- { text: "Definition", link: "/modules/definition" },
80
- { text: "Display", link: "/modules/display" },
81
- { text: "Form", link: "/modules/form" },
82
- { text: "Generator", link: "/modules/generator" },
83
- { text: "Interaction", link: "/modules/interaction" },
84
- { text: "Package", link: "/modules/package" },
85
- { text: "Policy", link: "/modules/policy" },
86
- { text: "Portal", link: "/modules/portal" },
87
- { text: "Query", link: "/modules/query" },
88
- { text: "Resource Record", link: "/modules/resource_record" },
89
- { text: "Routing", link: "/modules/routing" },
90
- { text: "Table", link: "/modules/table" },
91
- { text: "UI", link: "/modules/ui" },
170
+ '/cookbook/': [
171
+ {
172
+ text: "Cookbook",
173
+ items: [
174
+ { text: "Overview", link: "/cookbook/" },
175
+ { text: "Blog Application", link: "/cookbook/blog" },
176
+ { text: "SaaS Application", link: "/cookbook/saas" },
92
177
  ]
93
178
  }
94
179
  ]