Here at Protegé, we use create-react-app on the front-end, Tailwind CSS for styling, and Google Firebase for the back-end. Getting a local environment set up is fairly simple. If something isn't clear, create an issue and let us know how we can improve this document.
- Fork this repo
- use the
Develop
branch as your base for changes
- use the
- Install JDK from Oracle
- Install Node
- Install firebase-cli
- Run
yarn
to install peer dependencies
- Create a firebase project - You must create a firebase project to be able to access the site locally. This is because the project relies on firebase to be emulated for storage and other functions. You can read more about firebase here
- Create a firebase project
- Access the project settings via the cogwheel from the firebase project console. You will add firebase to your web app by selecting
Add app
and the web app icon</>
. - Name your app and select
Register app
. - Copy your web app's Firebase configuration to the relevant items in the
.env.local.template
file included in this repository. - Rename
.env.local.template
to.env.local
- Run in separate terminals
yarn emulators
- launches the firebase emulator- http://localhost:4000 for the emulator suite dashboard UI. Authentication and Firestore should both have "On" status
- http://localhost:4000/firestore for database UI
yarn dev
- builds the site
- Seed the Firebase emulator database by running
dbseed.js
in the root directory of this repo from another terminal session. You can do this by runningnode dbseed.js
. This will populate the data with some test data.- http://localhost:3000/ to confirm jobs data on home, all jobs types, and individual jobs
- Not all of our APIs are currently configured for local use. At this time you will not be able to use stripe, newsletter, or file upload features. This readme will be updated to reflect the setup of these features if they become available for local testing.
Before we get too far, we'd like to say thank you for considering contributing to Protegé.dev!
We use Atlassian's Git Workflow model for version control on Protegé.
What that means is that we have a Main branch, a Develop branch, and then feature/feature-name or hotfix/hotfix-name branches for development of the platform.
To keep in line with this workflow, your process for submitting a PR should follow the steps below.
-
Fork the repo to your local dev environment
-
Create a new branch under the
feature/
flag -
Name the branch in a concise way that eludes to what it does (ex:
feature/add-active-nav-state
) -
Create your PR into the Develop branch
-
Leave a short message in the PR explaining in slightly more detail what the PR accomplishes.
-
If your PR touches multiple parts, consider adding a bullet list of accomplishments, example below
* adds new component x for data handling * updates component y to use component x * refactors component y for code reusability