Full-Stack source code for the BVCOG Contract Management Platform (CMS)
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.
- Ruby - Ruby 3.2.2
- Rails - Rails 7.1.0
- Make - Make 4.3
- Heroku CLI - heroku/8.4.2 wsl-x64 node-v16.19.0
- PostgreSQL - PostgreSQL 12.3
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
-
Clone the repository
git clone
-
Install dependencies
make bundle
or
bundle install
-
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
-
Starting the Server
make run
or
rails s
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.
-
Clone the repository
git clone
-
Heroku configuration
- Install Heroku Command Line Interface
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
- Login to Heroku
heroku login -i
- Create an app on Heroku
heroku create bvcog-yyyy-semester
Where
yyyy-semester
is the current year and semester. i.e.2024-spring
. -
Set the Rails Master Key Run the command
heroku config:set RAILS_MASTER_KEY=<BVCOG-master-key>
See Rails Master Key for more information.
-
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.
This project has both cucumber
and rspec
tests.
bundle exec cucumber --profile default --out ./out.log
or
make cucumber
bundle exec rspec spec
or
make rspec
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.
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 |
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.
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.
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
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
Please contact the most recent team.
Team member | |
---|---|
Huy Lai | [email protected] |
Thomas Manzini | [email protected] |
Shreya Gubbi Prakash | [email protected] |
Neha Manghnani | [email protected] |
Team member | |
---|---|
Liam Berney | [email protected] |
Matan Broner | [email protected] |
Chrysanthos Pepi | [email protected] |
Hanrui Chen | No Email Given |