Git Product home page Git Product logo

chefapp's Introduction

ChefApp

Software dependencies and versions being used:

  • Ruby version: 3.2.1

  • Rails version: 7.0.4.2

  • PostgreSQL: 15.2

Services

The following table lists the features/services our application will include and the best corresponding solution(s) available.

Feature/Service Solution
Hosting AWS Elastic Beanstalk or Netlify or Railway or Heroku
File Storage AWS S3
Background Jobs DelayedJob or Sidekiq
Feature Flags Flipper
CI/CD Pipeline CircleCI or GitHub Actions
Site-Wide & Autocomplete Search OpenSearch v2.5 or Meilisearch v1.0.2
Payment Processing Stripe - via Pay gem

Ultimately, the best solution we select for our Rails app will depend on several factors:

  1. Pricing
  2. Ease of use
  3. Team member experience
  4. Robustness

Development Guidelines

All features, bug fixes, documentation changes, and feedback should be done within the GitHub Repo as either a separate PR (Pull Request) or Issue.

Use the following templates when creating:

Moreover, commits must be managelable in size for effective code review and debugging that can be conducted by at least one other team member.

For example, let's say a team member implements the following changes:

  1. Generate a new scaffold
  2. Modify another existing model
  3. Fix a bug in a view file

Each of these changes should be a separate commit and these commits need to be made in the appropriate branches.

Do not put all changes in one large commit!

Do not make all commits in just one generic branch, especially the main branch!

Each commit message should start off with the appropriate GitEmoji at the beginning of the message line. While not an absolute requirement, this can help all team members, including the individual who created the original commit, to navigate the commit history as the project increases in size and complexity.

Database

We'll be using the popular RDBMS PostgreSQL (via pg gem), along with ActiveRecord as our ORM, and ActiveStorage for managing file uploads.

  • Database creation:
rails db:create
  • Database initialization:
rails db:migrate db:seed
  • Perform all tasks: create, load schemas, and seed all databases:
rails db:setup
  • Drop local database (i.e., will have to create, migrate or load schema(s), and seed database(s) again):
rails db:drop
  • To see list of all available Rails tasks, use:
rails -T

Payment Proccesing

We'll be using the Pay gem to enable payment processing through Stripe.

Instructions for installing stripe-cli can be found here: https://stripe.com/docs/stripe-cli

Helpful commands

Git

Listed below are a few basic Git commands: Note: More commands can be found either on Atlassian's Git Tutorial or other sources by searching Google.

  • See current status of all modifications to tracked and untracked files:
git status
  • Add (i.e., save) all changes to the current stash for committing:
git add .
  • Commit all changes added to the current stash (see previous step).
git commit -m "COMMIT MESSAGE"

Note: The commit message must be added using double-quotes.

  • Switch to another branch:
git checkout branch_name

Note: Use -b flag to create a new branch and switch into it.

  • Push all Git commits and changes to the remote repositry:
git push origin BRANCH_NAME
  • Used to fetch and download content from a remote repository and immediately update the local repository to match that content:
git pull <remote>
  • Undo local private changes:
git reset
  • Undoing shared public changes
git revert

Bundler

  • Install gem(s) in Gemfile:
bundle install
  • Update gem(s) in Gemfile:
bundle update

Yarn

  • Install all packages listed in package.json:
yarn install
  • Install specific package that will be added to package.json:
yarn install PACKAGE_NAME
  • Upgrade all packages listed in package.json:
yarn upgrade

Note: Yarn uses upgrade whereas Bundler uses update.

Rails

  • Return list of all Rails routes:
rails routes
  • Return list of Rails routes containing specified substring:
rails routes | grep SUBSTRING
  • Launch Rails console:
rails c

Note: Useful for running permanent changes, like purging all ActiveStorage records:

ActiveStorage::Attachment.all.each do |attachment|
  attachment.purge
end
  • Launch Rails console in sandbox mode:
rails c --sandbox

Note: Running any code in a normal console session will make permanent changes to your local development environment. Conversly, running any code in a sandbox console session will undo all changes, as any modification made during a sandbox session will be reverted when the sandbox session is closed.

Testing & CI/CD Pipeline

We'll be using the Minitest framework for testing our code via TDD.

  • Run entire test suite:
rails test

Because we're working in a team with four members, we should ideally use some form of continuous integration/deployment pipeline (i.e., CI/CD pipeline).

CI/CD pipeline information coming soon.

Deployment

There will be several unique branches in our project's GitHub repo that will have strict rules in place for merging commits or branches:

  • main - This is the main branch and essentially will serve as our main-development.
  • main-production - This branch will contain code merged from main only and this branch will be deployed to our production environment each time a new merge from main is introduced.
  • main-staging if necessary.
  • main-test if necessary.

More deployment information coming soon.

chefapp's People

Contributors

neemasadry avatar snake117 avatar

Stargazers

 avatar

Watchers

 avatar Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.