Microposting app for tracking, TILs, merit, praise, and gratitude.
Live on heroku as yayme
- create different types of posts (ex: praise, TIL)
- renders posts in markdown
- takes codeblocks in markdown
- create markdown templates for types of posts
- Ruby
- Rails
- PostgreSQL
- Bootstrap
- Plain CSS with CSS custom properties (no SASS/SCSS)
- Stimulus for Javascript
- RSpec for testing
- Standard RB for linting
- Devise for authentication
- Pundit for authorization
- ActiveStorage for image storage
- Dropbox API for image storage
- Fork & Clone
bundle- Set up DB:
rake db:setup(Runsdb:create,db:schema:loadanddb:seed) - User: In development, see the seeds file for the user credentials so you can log in
routes.rb: comment out line 7, uncomment line 10 to allow users to sign up at http://localhost:3000/users/sign_up- Note to myself: remember to set up the master.key with the value stored in the password manager
- You will also need a Dropbox account and a dedicated folder in your account for images. See Dropbox API. At the moment, the image url for posts is highly unsophisticated and is expecting a Dropbox url. If you want to use something other than non-smart url field (like being able to upload photos), go for it! :) You'll have a some work to do in this area.
- You will need to install imagemagick locally with
brew install imagemagick
- Tests:
bundle exec rspec
This project uses these linters in CI:
- reek
- standard rb (in support of the VS Code extension). If VS Code is being a jerk about not recognizing the right version of ruby, you can set the ruby version via the VS Code terminal like:
RBENV_VERSION='3.3.10' - FactoryBot.lint -- coming soon
Run them locally on your machine like this:
bundle exec reek
bundle exec standardrb
The Solid Trio (solid_cache, solid_cable, solid_queue) are implemented as tables in the main database instead of separate tables. https://guides.rubyonrails.org/8_0_release_notes.html
Never open the master.key or credentials.yml.enc in Atom. This will add newline characters that you can't remove and it will not be able to be unencrypted.
To edit this file, run:
EDITOR="code --wait" bin/rails credentials:edit
If this file gets borked, this post and this post will help.
Images are processed by the Raisl gem image_processing which uses the mini_magick gem as a dependency. This allows a user to submit a photos of any size to the form, but have our file system downsize it before storing to Dropbox. There are size variants available for use in the app. They are defined in the Post model.
- Devise user authentication (sign up/in/out)
- Pundit user authorization (restricts access to content)
- Dependabot dependency manager
- Shoulda Matchers for testing model relationships and validations
- FactoryBot to build test objects
- Pagy for pagination
- Dropbox API
- ActiveStorage