GTBitsOfGood / southface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome To The Southface Repo!

Useful Links

Make sure you have gone through this walkthrough and all the links down below:

Stack

  • 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.

Development

  1. Clone this project to your computer (preferably use VS Code)
git clone https://github.com/GTBitsOfGood/southface.git
  1. Navigate to this project in your terminal
cd southface

Running with Docker (recommended):

  1. Install docker and docker-compose

MacOS: Docker Desktop for MacOS

Windows: Docker Desktop for Windows

Linux: Docker Desktop for Linux

  1. 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
  1. 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.

  1. 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

Development

  • Run docker-compose up --build

Production

  • Run YARN_COMMAND=start docker-compose up --build

Running outside of Docker (not recommended):

  1. Install Node Version Manager (NVM)
  • follow this guide if you don't have NVM already to install it onto your machine.
  1. Switch to node version 16.X
nvm install 16 && nvm use 16
  1. Install the dependencies (make sure to use yarn and not npm):
yarn
  1. 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
  1. 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.

Development

  • Run yarn dev

Production

  • Run yarn start

MongoDB

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.

Running

To understand this code better, read the Code Tour.

Additional Information

  • 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 using feat, style, fix, and docs. I.e feat: [message]
  • Please run yarn lint and yarn 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.

About

License:MIT License


Languages

Language:JavaScript 99.6%Language:Shell 0.2%Language:CSS 0.1%Language:Dockerfile 0.1%