Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binos30/blog-app
A simple web app for CRUDing a blog post and sending feedback email with authentication using Rails 7, PostgreSQL, Solid Queue, Hotwire (Turbo + Stimulus), Bootstrap, and SendGrid
https://github.com/binos30/blog-app
article blog blog-article blog-post framework hotwire-stimulus hotwire-turbo mvc mvc-framework rails rails-application rails-crud rails-send-mail ruby ruby-on-rails stimulus-rails turbo-rails web-framework
Last synced: 1 day ago
JSON representation
A simple web app for CRUDing a blog post and sending feedback email with authentication using Rails 7, PostgreSQL, Solid Queue, Hotwire (Turbo + Stimulus), Bootstrap, and SendGrid
- Host: GitHub
- URL: https://github.com/binos30/blog-app
- Owner: binos30
- License: mit
- Created: 2024-01-09T14:14:27.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-23T13:59:08.000Z (2 days ago)
- Last Synced: 2024-09-23T22:32:35.882Z (2 days ago)
- Topics: article, blog, blog-article, blog-post, framework, hotwire-stimulus, hotwire-turbo, mvc, mvc-framework, rails, rails-application, rails-crud, rails-send-mail, ruby, ruby-on-rails, stimulus-rails, turbo-rails, web-framework
- Language: Ruby
- Homepage: https://instablog.onrender.com
- Size: 4.26 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# InstaBlog
[![CI/CD](https://github.com/binos30/blog-app/actions/workflows/ci.yml/badge.svg)](https://github.com/binos30/blog-app/actions/workflows/ci.yml)
[![Dependabot Status](https://badgen.net/github/dependabot/binos30/blog-app?icon=dependabot)](https://dependabot.com)## Setup
Prerequisites
- [Ruby 3.3.5](https://github.com/rbenv/rbenv)
- [PostgreSQL](https://www.postgresql.org/download/)
- [Node.js ^20.15.1](https://github.com/nvm-sh/nvm)Create `.env` file at the root of the project directory. Copy the content of `.env.template.erb` to `.env` then update the `username` and `password` based on your database credentials. To send a post feedback email to the blog post author, request `SENDGRID_API_KEY` from admin/owner or [create your own SENDGRID_API_KEY](https://docs.sendgrid.com/ui/account-and-settings/api-keys) and [add single sender verification](https://docs.sendgrid.com/ui/sending-email/sender-verification) then update `SENDGRID_FROM_EMAIL` and `SENDGRID_FROM_NAME`
Install dependencies and setup database
```bash
bin/setup
```Populate database with sample data
```bash
rake db:populate_sample_data
```Start local web server
```bash
bin/dev
```Go to [http://localhost:3000](http://localhost:3000)
## Testing
Setup test database
```bash
bin/rails db:test:prepare
```Default: Run all spec files (i.e., those matching spec/\*\*/\*\_spec.rb)
```bash
bin/rspec
```Run all spec files in a single directory (recursively)
```bash
bin/rspec spec/models
```Run a single spec file
```bash
bin/rspec spec/models/post_spec.rb
```Use the plain-English descriptions to generate a report of where the application conforms to (or fails to meet) the spec
```bash
bin/rspec --format documentation spec/models/post_spec.rb
```Run a single example from a spec file (by line number)
```bash
bin/rspec spec/models/post_spec.rb:6
```See all options for running specs
```bash
bin/rspec --help
```