1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Frontend
## Setup
Welcome! Before you get coding, there's a few setup-related tasks to complete. Specifically, you'll have to **1) fork the repo**, and **2) install the necessary development tools**. After that, you should be able to get up and running. There's no way (that I currently know of) for Windows users to develop on iOS, but I am positive workarounds exist and will include those later.
### 1) Git going
First, you'll need to fork the Frontend repo *and* sync it upstream. If you've already done this, skip to step 2).
*To fork the repo*, simply click the "Fork" button near the top right of this page. If prompted to select "where" to fork it, click your username.
*To clone your forked repo* to your local file system, first, navigate to the forked repo in your browser (**not** the original repository) if you aren't already there. Click the large green "Clone" button, and copy the URL onto your clipboard. Then, open a terminal window, navigate to where you want the project to live on your local file system (my recommendation is in a directory named "tagg" where you store both your frontend & backend projects), and run the following command, replacing the dummy URL with your clipboard:
`git clone https://github.com/your-username/Frontend.git`
You'll be prompted for your GitHub username & password, which you should enter. If, when working with GitHub in the future, you don't want to enter your credentials each time, check out [this guide](https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh).
Now you have a local copy of the project on your computer, but it's not synced up with the original repository, so it won't detect changes in the main project. To sync your fork upstream, navigate to your project in a terminal window if you're not already there. Inside your project directory, run the command
`git remote add upstream https://github.com/TaggiD-Inc/Frontend.git`
Double check that this worked by running
`git remote -v`
in your project directory. In addition to the two "origin" remotes, you should see two more "upstream" remotes.
If you've made it here with no errors, congratulations! A forked version of the frontend project directory now lives on your local file system, which you can begin editing. If not, feel free to consult your teammates. This process should be executed whenever you intend to work on a new feature (for the time being).
Original instructions [here](https://help.github.com/en/github/getting-started-with-github/fork-a-repo).
### 2) Devtools
Follow the instructions on React Native's docs [here](https://reactnative.dev/docs/environment-setup) under "React Native CLI Quickstart", making sure to follow directions for *your operating system*, for *both target operating systems* (iOS and Android). Stop upon reaching the section "Creating a new application", as our project is already set uyp.
*\<insert iOS instructions for Windows users here\>*
Now that you've forked your repo and installed your developer tools, you are ready to build and run your project.
## Running
To build and run your project, open a terminal window, navigate to your project directory, and run `yarn ios` or `yarn android`. This should prompt Xcode / Android Studio, if they are properly configured, to launch a simulator, where you'll be able to view your code changes in real time (live reload on save). Happy coding!
|