Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codingitwrong/riverbed-api
Backend API for Riverbed, an app for creating CRUD apps with interactivity with no programming.
https://github.com/codingitwrong/riverbed-api
Last synced: 2 days ago
JSON representation
Backend API for Riverbed, an app for creating CRUD apps with interactivity with no programming.
- Host: GitHub
- URL: https://github.com/codingitwrong/riverbed-api
- Owner: CodingItWrong
- License: agpl-3.0
- Created: 2022-12-26T12:31:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-20T21:51:56.000Z (10 days ago)
- Last Synced: 2025-01-20T22:48:20.546Z (10 days ago)
- Language: Ruby
- Homepage: https://about.riverbed.app
- Size: 643 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Riverbed API
Backend API for Riverbed, an app for creating interactive CRUD apps with no programming.
## Getting Started
### Requirements
1. Ruby
1. PostgreSQL (e.g. [Postgres.app][postgres-app])### Setup
```sh
$ bundle install
$ rails db:setup
```### Development
To generate models, resources, and controllers:
```bash
$ rails generate model widget [fields]
$ rails generate jsonapi:resource widget
$ rails generate jsonapi:controller widget
```### Testing
```sh
$ bin/rspec
```In request tests, you can use the user and access token factories to create test data to access protected resources:
```ruby
user = FactoryBot.create(:user)
token = FactoryBot.create(:access_token, resource_owner_id: user.id).token
headers = {
'Authorization' => "Bearer #{token}",
'Content-Type' => 'application/vnd.api+json',
}# assuming you have a Widget model that belongs to a User
FactoryBot.create(:widget, user: user)get '/widgets', headers: headers
```### Running
```sh
$ bin/serve
```This opens ports so can be accessed from physical devices.
[postgres-app]: http://postgresapp.com
## Copyright and License
Copyright 2023 NeedBee, LLC.
Licensed under GNU Affero General Public License (GNU AGPL) version 3 or later. See LICENSE.md for details.