Skip to content

Commit 85cd7b8

Browse files
committed
adjusted README
1 parent c6afbb0 commit 85cd7b8

File tree

1 file changed

+27
-215
lines changed

1 file changed

+27
-215
lines changed

README.md

Lines changed: 27 additions & 215 deletions
Original file line numberDiff line numberDiff line change
@@ -1,240 +1,52 @@
11
![](https://github.com/matestack/matestack-ui-core/workflows/specs/badge.svg)
22
[![Gitter](https://badges.gitter.im/basemate/community.svg)](https://gitter.im/basemate/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
33
[![Gem Version](https://badge.fury.io/rb/matestack-ui-core.svg)](https://badge.fury.io/rb/matestack-ui-core)
4-
[![Docs](https://img.shields.io/badge/docs-matestack-blue.svg)](https://www.matestack.org/docs/install)
4+
[![Docs](https://img.shields.io/badge/docs-matestack-blue.svg)](https://docs.matestack.io/docs/guides/install)
55

66
![matestack logo](./logo.png)
77

8-
# matestack: Escape the frontend hustle
8+
# matestack-ui-core
99

10-
## Create maintainable, dynamic and beautiful UIs easily
10+
## Escape the frontend hustle & easily create interactive web apps in pure Ruby
1111

12-
As a Rails Engine, matestack deeply integrates a Vue.js based UI into Rails, offering optional prebuilt components. Use it to write dynamic Web-UIs with minimum effort and maximum dev happiness in pure Ruby. The main goals are:
12+
`matestack-ui-core` is a Rails engine for Ruby on Rails developers.
13+
14+
`matestack-ui-core` enables you to craft interactive web UIs without JavaScript in pure Ruby with minimum effort.
15+
UI code becomes a native and fun part of your Rails app.
16+
17+
Work with pure Ruby. If necessary, extend with pure JavaScript. No Opal involved.
18+
19+
The main goals are:
1320

1421
- Reduction of complexity of modern web development, moving front and backend closer together
1522
- More maintainable UI code, using a component-based structure written in Ruby
16-
- Increased development speed and happiness, offering prebuilt UI-Components for classic requirements
23+
- Increased development speed and happiness, offering prebuilt UI-Components for typical requirements
1724
- Modern, dynamic UI feeling without the need to implement a separate JavaScript Application
1825

19-
matestack can progressively replace the classic Rails-View-Layer. You are able to use
26+
`matestack-ui-core` can progressively replace the classic Rails-View-Layer. You are able to use
2027
it alongside your classic views and incrementally turn your Rails-App into a
2128
dynamic Web-App.
2229

23-
### Current State:
24-
25-
We love to see more and more people using and contributing to matestack-ui-core. Our current version is 0.7.4 and it's not perfect yet. We recommend you to start using matestack-ui-core in a side project and report issues as this helps us to push matestack-ui-core towards a production ready 1.0.0. At matestack, we already use matestack-ui-core in production as we know how to handle current issues and bypass them with deep insights of the core implementation. We plan to invest time and money (yes, we're hiring) on following improvements:
26-
27-
* debugging and error handling
28-
* core refactoring, increased core maintainability and code quality
29-
* better integration in existing rails apps
30-
* improved documentation
31-
* improved dynamic core components (especially form components)
32-
33-
34-
### Installation:
35-
36-
Click here to see how you can add Matestack UI to your existing Rails application: [Installation Guide](./docs/install)
37-
38-
### Features:
39-
40-
#### Define your UI in a Ruby Class
41-
```ruby
42-
class Pages::MyPage < Matestack::Ui::Page
43-
44-
def prepare
45-
@technologies = ["Rails", "Vue.js", "Trailblazer", "RSpec", "Capybara"]
46-
end
47-
48-
def response
49-
components{
50-
div id: "technologies" do
51-
@technologies.each do |technology|
52-
plain "matestack uses #{technology}"
53-
end
54-
end
55-
}
56-
end
57-
58-
end
59-
```
60-
#### Create a Single Page Application without JavaScript
61-
62-
```ruby
63-
class Apps::MyApp < Matestack::Ui::App
64-
65-
def response
66-
components{
67-
header do
68-
heading size: 1, text: "My App"
69-
end
70-
nav do
71-
transition path: :my_first_page_path do
72-
button text: "Page 1"
73-
end
74-
transition path: :my_second_page_path do
75-
button text: "Page 2"
76-
end
77-
end
78-
main do
79-
page_content #pages are dynamically yielded here, when buttons are clicked!
80-
end
81-
footer do
82-
plain "That's it!"
83-
end
84-
}
85-
end
86-
87-
end
88-
```
89-
90-
```ruby
91-
class Pages::MyApp::MyFirstPage < Matestack::Ui::Page
92-
93-
def response
94-
components{
95-
div id: "div-on-page-1" do
96-
plain "My First Page"
97-
end
98-
}
99-
end
100-
101-
end
102-
```
103-
```ruby
104-
class Pages::MyApp::MySecondPage < Matestack::Ui::Page
105-
106-
def response
107-
components{
108-
div id: "div-on-page-2" do
109-
plain "My Second Page"
110-
end
111-
}
112-
end
113-
114-
end
115-
```
116-
#### Handle User Interaction dynamically without JavaScript
117-
```ruby
118-
class Pages::MyPage < Matestack::Ui::Page
119-
120-
def response
121-
components {
122-
action my_action_config do
123-
button text: "Click me!"
124-
end
125-
#content gets rerendered without page reload if action succeeded
126-
async rerender_on: "my_action_succeeded" do
127-
div id: "my-div" do
128-
plain DateTime.now
129-
end
130-
end
131-
}
132-
end
133-
134-
def my_action_config
135-
{
136-
method: :post,
137-
path: :some_rails_routing_path,
138-
success: {
139-
emit: "my_action_succeeded"
140-
}
141-
}
142-
end
143-
144-
end
145-
```
146-
#### Handle User Input dynamically without JavaScript
147-
```ruby
148-
class Pages::MyApp::MyFirstPage < Matestack::Ui::Page
149-
150-
def prepare
151-
@my_model = MyModel.new
152-
end
153-
154-
def response
155-
components {
156-
form my_form_config, :include do
157-
form_input key: :some_model_attribute, type: :text
158-
form_submit do
159-
button text: "Submit me!"
160-
end
161-
end
162-
async show_on: "form_has_errors", hide_after: 5000 do
163-
plain "Data could not be submitted, please check form"
164-
end
165-
}
166-
end
167-
168-
def my_form_config
169-
{
170-
for: @my_model,
171-
method: :post,
172-
path: :some_action_path,
173-
success: {
174-
transition: {
175-
path: :my_second_page_path,
176-
}
177-
},
178-
failure: {
179-
emit: "form_has_errors"
180-
}
181-
}
182-
end
183-
184-
end
185-
```
186-
#### Websocket Integration without JavaScript
187-
```ruby
188-
class Pages::MyPage < Matestack::Ui::Page
189-
190-
def prepare
191-
@comments = Comment.last(5)
192-
end
193-
194-
def response
195-
components {
196-
#content gets rerendered without page reload when
197-
#websocket event is received
198-
async rerender_on: "comments_changed" do
199-
@comments.each do |comment|
200-
div do
201-
plain comment.content
202-
end
203-
end
204-
end
205-
}
206-
end
207-
208-
end
209-
```
210-
somewhere else on the backend:
211-
212-
```ruby
213-
ActionCable.server.broadcast("matestack_ui_core", {
214-
message: "comments_changed"
215-
})
216-
```
217-
218-
### Documentation
219-
220-
Documentation can be found [here](https://www.matestack.org/docs/install)
221-
222-
### Changelog
30+
## Features
22331

224-
Changelog can be found [here](./CHANGELOG.md)
32+
Please have a look at our [landingpage](https://www.matestack.io), presenting the main features of `matestack-ui-core`
22533

226-
### Roadmap
34+
## Documentation/Installation
35+
36+
Documentation can be found [here](https://docs.matestack.io/docs/guides/install)
37+
38+
## Changelog
39+
40+
Changelog can be found [here](./CHANGELOG.md)
22741

228-
In order to see what we planned to add and release the upcoming months, just have a look at our future [milestones](https://github.com/basemate/matestack-ui-core/milestones) and get in touch via our [chat](https://gitter.im/basemate/community) for feedback! The upcoming issues and feature requests will be added to one of these milestones regarding priority and implementation effort.
22942

230-
### Community
43+
## Community
23144

23245
As a low-barrier feedback channel for our early users, we have set up a Gitter chat that can be found [here](https://gitter.im/basemate/community). You are very welcome to ask questions and send us feedback there!
23346

234-
### Contribution
47+
## Contribution
23548

236-
We are happy to accept contributors of any kind. Please refer to the [Contribution Guide](./docs/contribute)
49+
We are happy to accept contributors of any kind. Please refer to the [Contribution Guide](https://docs.matestack.io/docs/guides/contribute)
23750

238-
### License
239-
The gem is available as open source under the terms of the
240-
[MIT License](https://opensource.org/licenses/MIT).
51+
## License
52+
matestack-ui-core is an Open Source project licensed under the terms of the [LGPLv3 license](./LICENSE)

0 commit comments

Comments
 (0)