Skip to content

lortza/yayme

Repository files navigation

Yay Me Post Tracking App

CircleCI

Maintainability

Microposting app for tracking, TILs, merit, praise, and gratitude.

Live on heroku as yayme

Features

  • create different types of posts (ex: praise, TIL)
  • renders posts in markdown
  • takes codeblocks in markdown
  • create markdown templates for types of posts

Tech Stack

  • 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

Getting Started

  • Fork & Clone
  • bundle
  • Set up DB: rake db:setup (Runs db:create, db:schema:load and db: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

Required Technologies

  • 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

  • Tests: bundle exec rspec

Linters

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

Solid Trio Implementation

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

Editing the credentials file

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.

Image Uploads

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.

Related Docs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors