Skip to content

anspoints/anspoints_app

Repository files navigation

README

Introduction

This is a web application created for the American Nuclear Society at TAMU. It allows users to check their attendance points for different ANS events, and for ANS officers or admins to create events and manage point counts for all members.

Requirements

This code has been run and tested on:

  • Ruby - 3.0.2
  • Rails - 6.1.4
  • Gems - listed in Gemfile
  • PostgreSQL - 13.3
  • Node - 12.4.0
  • Yarn - 1.22.4

External Dependencies

Installation

Download the required Docker container: docker pull dmartinez05/ruby_rails_postgresql:latest

Make a directory called ANSPoints wherever you like & move into it: mkdir ANSPoints; cd ANSPoints

Clone this repository: git clone https://github.com/anspoints/anspoints_app.git

Tests

Run the rspec test suite: rspec ./spec

Run the rubocop tests: rubocop

Run the brakeman tests: brakeman

Execute Code

For Mac: docker run --rm -it --volume "$(pwd):/ANSPoints" -e DATABASE_USER=anspoints_app -e DATABASE_PASSWORD=test_password -p 3000:3000 dmartinez05/ruby_rails_postgresql:latest

For Windows: docker run --rm -it --volume "${PWD}:/ANSPoints" -e DATABASE_USER=anspoints_app -e DATABASE_PASSWORD=test_password -p 3000:3000 dmartinez05/ruby_rails_postgresql:latest

If you accidentally quit: docker exec -it "container-name" bash

In the Docker image, cd to the anspoints_app directory: cd ANSPoints/anspoints_app

Install all gems: bundle install

Install npm: npm install

Create the database: rails db:create

Migrate the database: rails db:migrate

Run the server: rails s --binding=0.0.0.0

Environmental Variables/Files

Refer to /config/environments/development.rb

Deployment

First make sure all your code changes are pushed and updated to the test and main branch.

Now sign in to your heroku dashboard or create an account if needed

Click the "New button" in the top right and select "Create new pipeline"

Fill in the Pipeline name, owner, and search for the github repo you are using to connect the pipeline to.

Now you should a new pipline in front you, under the Review App section Click "Enable Review Apps" and dont select any options

Click “New app” in Review Apps. Choose the test branch. After you click “Create”, Heroku will start deploying immediately. Every time you make changes to the test branch, it triggers automatic deployment.

We also need to create an app for staging. So click under the staging box "Create new app"

Now click on the new staging app and click Deploy using the main branch for Automatic Deploys.

Congrats you now have a deployment pipeling up and running that will update after any new push to the repo.

CI/CD

To set up the CI/CD Process we are going to use Github actions

First create a new file at the root of the app with the follwing location /.github/workflows/workflow.yml

Next copy the workflow.yml file from this repo into your newly created file in your repo https://github.com/dmartinez05/book_collection_solution/blob/main/.github/workflows/workflow.yml

Now commit and push the changes to github

With this commit everytime you make any changes and push them, github actions will run all our Rspec, RuboCop and Brakeman tests to verfiy the new changes they pass. Then with our automatic heroku deployment set up in the previous section you will see a live update of the app.

Test Site: https://anspoints-test-app.herokuapp.com/

Production Site https://anspoints.herokuapp.com/

Support

User Manual: https://anspoints.herokuapp.com/User-Manual

Admin Manual: (Maintenance, Deployment, Instructions, etc.): https://github.com/anspoints/anspoints_app/wiki/Admin-Manual

Video Demo of Installation Guide: https://drive.google.com/file/d/1St4ao2TzzNtXRiZx-FRI8CKiPWMI00rG/view?usp=sharing

These manuals are also available directly through the web application. If additional assistance is required, please reach out to the customer.

About

ANS Points tracker - CSCE 431

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published