NTU Computer Science - CZ3002 Advanced Software Engineering
This is a very simplified guide on setting up local environment for Windows
- Go to a folder where you want the repository to be in
- Clone the repository
git clone https://github.com/adriangohjw/cz3002-advanced-software-engineering.git
PostgreSQL is the relational DBMS of choice in this project
- Download and install PostgreSQL from Windows installers
- Use the following credentials during the installation (otherwise you can update the Config file):
- Username =
postgres
and password =password
- Username =
- Open the psql command-line tool by
- In the Windows CMD, run the command:
psql -U postgres
- Enter password when prompted
- Run the command:
create database "cz3002";
- In the Windows CMD, run the command:
Reference: Set Up a PostgreSQL Database on Windows
This is a very simplified guide on setting up local environment for Linux / Windows Subsystem for Linux (WSL)
- Go to a folder where you want the repository to be in
- Clone the repository
git clone https://github.com/adriangohjw/cz3002-advanced-software-engineering.git
PostgreSQL is the relational DBMS of choice in this project
- Download and install PostgreSQL from PostgreSQL website
- Use the following credentials during the installation (otherwise you can update the Config file):
- Username =
postgres
and password =password
- Username =
- Open the psql command-line tool by
- In the Windows CMD, run the command:
psql -U postgres
- Enter password when prompted
- Run the command:
create database "cz3002";
- In the Windows CMD, run the command:
- Refer to guide on setting up Ruby on Rails with Rbenv on Ubuntu
- Go to the folder
/scansmart-api
and run the commandbundle install
to install gem dependencies- You should see something along the line of
Bundle complete! 20 Gemfile dependencies, 72 gems now installed.
- You should see something along the line of
- Create a new stripe account here
- Add your Publishable key and Secret key to your environment
- Run the command
rails db:migrate
--> This set up your database with tables etc. - Run the command
rails db:reset
--> This populates your database
- Run the command
rails s
and you should see something along the line to the following=> Booting Puma => Rails 5.2.4.3 application starting in development => Run `rails server -h` for more startup options Puma starting in single mode... * Version 3.12.6 (ruby 2.5.1-p57), codename: Llamas in Pajamas * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://localhost:3000 Use Ctrl-C to stop
Refer to this simplified guide on how Git works
The reasons there's a need for us to standardize on these processes and naming conventions, are to improve the team workflow and efficiencies.
Tip: I suggest using Visual Studio Code for the git shortcuts and friendly user interfaces
- Create a new branch using the command
git checkout -b aaa/bbb/branch-name
aaa
refers to the "team" in which the work is under e.g.backend
,mobile
,qa
bbb
refers to the type of changesfeature
for a starting an entire new feature from scratchenhancement
for making upgrades to an existing featurefix
for fixing bugs
branch-name
is a naming for the new thing you are working on- E.g. For adding data models on the backend, branch name will be
backend/feature/add-data-model
- Add whatever changes you made using
git add xxx
andgit commit -m "message"
(Refer to the guide)- Please use meaningful commit messages instead of generic ones
- Example of bad commit message:
Fix bug
- Example of better commit message:
Fix bug from not handling exception in UsersController
- Push to remote branch using the command
git push origin aaa/bbb/branch-name
- Create a pull request (PR) and add those who need to be aware of these changes as the PR reviewer(s).