Make sure you have gone through this walkthrough and all the links down below:
- React.js: Front-end
- Next.js: API routes and server-side rendering
- MongoDB: Permanently storing info
- iron-session: Authentication session handling for SSR/SSG
- eslint: Automatically identifying and fixing code errors
- prettier: Setting a common code style and fixing any issues.
- yarn: Package management. If you do not have yarn, run
npm install -g yarn
to install yarn globally.
- Clone this project to your computer (preferably use VS Code)
git clone https://github.com/GTBitsOfGood/southface.git
- Navigate to this project in your terminal
cd southface
- Install docker and docker-compose
MacOS: Docker Desktop for MacOS
Windows: Docker Desktop for Windows
Linux: Docker Desktop for Linux
- Obtain your secrets -- Linux or MacOS (Skip if Windows); you will need to obtain a password from your Engineering Manager:
First, install BitWarden CLI and fx with npm
npm install -g @bitwarden/cli fx
Or, if you're using Homebrew,
brew install bitwarden-cli fx
Now fetch the secrets from BitWarden
yarn secrets:linux
- Obtain your secrets -- Windows Machines (Skip if MacOS or Linux); you will need to obtain a password from your Engineering Manager:
First, install BitWarden CLI and fx with npm
npm install -g @bitwarden/cli fx
Now fetch the secrets from BitWarden
yarn secrets:windows
Contact your EM for the Bitwarden password. NEVER EVER commit .env.local
to your version control system.
- Run the app
To run the dev environment, run the default docker-compose command
docker-compose up --build
To run build or any other script specified in the package.json, provide the YARN_COMMAND environment variable before docker-compose
YARN_COMMAND=build docker-compose up --build
- Run
docker-compose up --build
- Run
YARN_COMMAND=start docker-compose up --build
- Install Node Version Manager (NVM)
- follow this guide if you don't have NVM already to install it onto your machine.
- Switch to node version 16.X
nvm install 16 && nvm use 16
- Install the dependencies (make sure to use yarn and not npm):
yarn
- Obtain your secrets -- Linux or MacOS (Skip if Windows); you will need to obtain a password from your Engineering Manager:
First, install BitWarden CLI with npm
npm install -g @bitwarden/cli
Or, if you're using Homebrew,
brew install bitwarden-cli
Now fetch the secrets from BitWarden
yarn secrets:linux
- Obtain your secrets -- Windows Machines (Skip if MacOS or Linux); you will need to obtain a password from your Engineering Manager:
First, install BitWarden CLI with npm
npm install -g @bitwarden/cli
Now fetch the secrets from BitWarden
yarn secrets:windows
Contact your EM for the Bitwarden password. NEVER EVER commit .env.local
to your version control system.
- Run
yarn dev
- Run
yarn start
If you're using Docker, Docker will run MongoDB inside its container. If you aren't, you'll have to run it yourself. Installing MongoDB Compass will allow you to do that. Regardless, download it so you can view the remote database from your machine.
- Download MongoDB compass
- Launch MongoDB Compass. When prompted for the connection URL, copy and paste
DB_URL
from your.env.local
file.
You should now have write access to the different collections available.
To understand this code better, read the Code Tour.
- Use
[INITIALS]/[ISSUE_NUMBER]-[SHORT_DESCRIPTION]
when naming your feature branches - Use commit messages using the tags located in
commitlint.config.js
. You will most likely be usingfeat
,style
,fix
, anddocs
. I.efeat: [message]
- Please run
yarn lint
andyarn prettier
before committing (make sure yarn and prettier extensions are enabled in VSCode) - It is highly recommended to use VSCode with ESLint and Prettier extensions
- To save even more time, set up "Format on Save"
Congrats! You should now be set-up to work on Southface!! If you have any issues, don't hesitate to contact your EM.