https://github.com/0xtheprodev/rails-clean-example
Clean Architecture Example using Ruby on Rails framework
https://github.com/0xtheprodev/rails-clean-example
Last synced: 11 months ago
JSON representation
Clean Architecture Example using Ruby on Rails framework
- Host: GitHub
- URL: https://github.com/0xtheprodev/rails-clean-example
- Owner: 0xTheProDev
- License: mit
- Created: 2023-03-26T06:36:51.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-12T11:24:59.000Z (about 3 years ago)
- Last Synced: 2025-04-02T09:14:14.477Z (about 1 year ago)
- Language: Ruby
- Size: 175 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# rails-clean-example
[](https://www.ruby-lang.org/)
[](https://www.rubyonrails.org/)
[](https://puma.io/)
[](https://www.openapis.org/)
[](https://swagger.io/)
[](https://graphql.org/)
[](https://www.rubocop.org/)
[](https://github.com/0xTheProDev/rails-clean-example/issues)
[](https://github.com/0xTheProDev/rails-clean-example/issues?q=is%3Aissue+is%3Aclosed)
[](https://github.com/0xTheProDev/rails-clean-example/pulls)
[](https://github.com/0xTheProDev/rails-clean-example/pulls?q=is%3Apr+is%3Aclosed)
[](https://github.com/0xTheProDev/rails-clean-example/graphs/contributors)
[](https://github.com/0xTheProDev/rails-clean-example/pulse)
## Description
_Example Application Interface using Rails framework in Ruby_
This example showcases Repository Pattern in Hexagonal Architecture _(also known as Clean Architecture)_. Here we have two Entities - Books and Authors, whose relationships have been exploited to create CRUD endpoint in REST under OpenAPI standard.
## Installation
- Install all the project dependency:
```sh
$ bundle install
```
- Run the application:
```sh
$ bundle exec rails s
## Testing
- Run test suite along with Coverage reporting:
```sh
$ bundle exec rspec spec
```
## Swagger UI
- Generate OpenAPI specifications from RSpec:
```sh
$ RAILS_ENV=test bundle exec rails rswag
```
- Open Swagger UI at `localhost:3000/api-docs` after running the application.
## License
© MIT License