Skip to content

BVCOG-Contract-Management/BVGOG-Contract-Manager

Repository files navigation

Build Status

BVCOG Logo

BVCOG Contract Management System

Full-Stack source code for the BVCOG Contract Management Platform (CMS)

Getting Started

Prerequisites

These instructions assume that you are operating Ubuntu 22.04 either on a Linux machine or using Windows Submachine for Linux.
Install the following using your prefered method of instilation.

If the current ruby version you are currently running is not 3.2.2 you can change it as follows:

/bin/bash --login
rvm use 3.2.2

or

rbenv local 3.2.2

Installing for Local Development

  1. Clone the repository

    git clone
  2. Install dependencies

    make bundle

    or

    bundle install
  3. Creating a local database

    make database

    or

    rm -f ./db/development.sqlite3
    rm -f ./db/test.sqlite3
    rails db:create
    rails db:migrate
    rails db:seed
  4. Starting the Server

    make run

    or

    rails s

Deploy to Production

You will need to be added to the GitHub repository in order to deploy the project.
Please contact the Spring 2023 team or the Professor to be added.

  1. Clone the repository

    git clone
  2. Heroku configuration

    1. Install Heroku Command Line Interface
    curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
    1. Login to Heroku
    heroku login -i
    1. Create an app on Heroku
    heroku create bvcog-yyyy-semester

    Where yyyy-semester is the current year and semester. i.e. 2024-spring.

  3. Set the Rails Master Key Run the command

    heroku config:set RAILS_MASTER_KEY=<BVCOG-master-key>

    See Rails Master Key for more information.

  4. Edit credentials

    EDITOR=vim rails credentials:edit

    Ensure that ENV['MAIL_PASSWORD'] is set, it if is not, please look through the git commit history to find the original credential files.
    See Rails Master Key for more information.

Testing

This project has both cucumber and rspec tests.

Cucumber

bundle exec cucumber --profile default --out ./out.log

or

make cucumber

RSpec

bundle exec rspec spec

or

make rspec

Login Credentials

We have different user account to be able to log into the local and production environment for testing.
These can be found in seeds.rb but are included here as well for convenience.

Dev/Test Users

For local development we have the following credentials:

User Access Level Username password
Admin [email protected] password
Gatekeeper [email protected] password
User [email protected] password

Production Users

When deployed to Heroku, we have the following credentials.

User Access Level Username password
Admin [email protected] password
Gatekeeper [email protected] password
User [email protected] password

These can be found in db/seeds.rb but have been included here for your convinence.
Note: the production seeds will be overriden when you deliver the product to the customer.

Notes

Rails Master Key

The application requires the ENV['MAIL_PASSWORD'] environment variable to be set in order to send emails.
This is set in the config/credentials.yml.enc file.
This file is encrypted and can only be decrypted by the config/master.key file.
The master.key file is not included in the repository for security reasons.
If you need access to the master.key file, please contact BVCOG's IT Department.
You will need BVCOG's master.key you CAN NOT generate your own.

RuboCop

This project uses RuboCop to ensure consistent coding standards and style across the codebase.
The configuration setting for rubocop can be found in ./.rubocop.yml. Edit it as you see fit.
To run it use the following command:

bundle exec rubocop --config .rubocop.yml --autocorrect-all

or

make rubocop

Script

A makefile has been provided for your convience.
Use/modify it as you see fit.

A deploy script has been provided for your convience.
Use/modify it as you see fit.
Note: the Fall 2023 team deprecated this script, if you have questions about it, ask the Spring 2023 team

Contacting the Team

Please contact the most recent team.

Fall 2023

Team member Email
Huy Lai [email protected]
Thomas Manzini [email protected]
Shreya Gubbi Prakash [email protected]
Neha Manghnani [email protected]

Spring 2023

Team member Email
Liam Berney [email protected]
Matan Broner [email protected]
Chrysanthos Pepi [email protected]
Hanrui Chen No Email Given