Skip to content

Commit 8af147b

Browse files
authored
Major component clean up (#651)
1 parent 0e804ed commit 8af147b

File tree

137 files changed

+4323
-13673
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+4323
-13673
lines changed

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16

README.md

+23-20
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ So far, the following features have been implemented.
3131
- React, React Router, Redux
3232
- Some React UI components: [React Select](https://react-select.com/home), [react-modal](https://github.com/reactjs/react-modal), [react-tiny-popover](https://github.com/alexkatz/react-tiny-popover)
3333
- SCSS (no frameworks)
34-
- Yarn workspaces
34+
- npm workspaces
3535
- Webpack
3636
- Cloud Firestore, Firebase Authentication, Firebase Functions, Google Cloud Storage, Firebase Hosting
3737

@@ -116,23 +116,23 @@ Main web app, code structure highlights:
116116

117117
### Setup
118118

119-
Please note that the development environment works completely fine on macOS and Linux only. There are a couple of minor issues on Windows, see [#521](https://github.com/igor-krupenja/zaino/issues/521) and [#522](https://github.com/igor-krupenja/zaino/issues/522).
119+
Before starting, make sure that you have Node 16 installed or use [nvm](https://github.com/nvm-sh/nvm).
120120

121121
#### Common
122122

123123
1. [Install Google's Cloud SDK](https://cloud.google.com/sdk/docs/install) and run `gcloud auth login` to log in.
124124
2. Run `npm install -g firebase-tools` to install Firebase CLI and run `firebase login` to log in.
125-
3. Run `npm install` in the *root* directory of the cloned/forked repo. Running in the root directory is required because this repo uses [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces).
125+
3. Run `npm install` in the *root* directory of the cloned/forked repo.
126126
4. Go to [Firebase console](https://console.firebase.google.com/u/0/) and create two projects, one for **development** environment and one for **production** environment.
127127
5. In Firebase console, create *Web* apps for the two projects you created. Refer to this [article](https://support.google.com/firebase/answer/9326094) for additional information.
128-
6. In Firebase console, open Project Settings and note the Project IDs for the project you created.
129-
7. Create a `.firebaserc` file in the *root* of this repo and add the Project IDs there like this:
128+
6. In Firebase console, open Project Settings and note the Project IDs for the projects you created.
129+
7. Create a `.firebaserc` file in the *root* of this repo and add the Project IDs there like this (dummy values):
130130

131131
```json
132132
{
133133
"projects": {
134-
"development": "...",
135-
"production": "..."
134+
"development": "zaino-dev-3ea56",
135+
"production": "zaino-prod-236c2"
136136
}
137137
}
138138
```
@@ -141,22 +141,22 @@ Please note that the development environment works completely fine on macOS and
141141

142142
1. Go to Firebase console and open Project Settings for your projects.
143143
2. Scroll down to Your Apps section and locate the code snippet with `firebaseConfig`.
144-
3. Go to `packages/web-app` and create `.env.development` and `.env.production` files with the variables from `firebaseConfig`. The file format should be like this:
144+
3. Go to `packages/web-app` and create `.env.development` and `.env.production` files with the variables from `firebaseConfig`. The file format should be like this (dummy values):
145145

146146
```shell
147-
REACT_APP_FIREBASE_API_KEY="..."
148-
REACT_APP_FIREBASE_AUTH_DOMAIN="..."
149-
REACT_APP_FIREBASE_DATABASE_URL="..."
150-
REACT_APP_FIREBASE_PROJECT_ID="..."
151-
REACT_APP_FIREBASE_STORAGE_BUCKET="..."
152-
REACT_APP_FIREBASE_MESSAGING_SENDER_ID="..."
153-
REACT_APP_FIREBASE_APP_ID="..."
154-
REACT_APP_FIREBASE_MEASUREMENT_ID="..."
147+
REACT_APP_FIREBASE_API_KEY="AIzaSkR_FfdseFcsE3fgg7pdjjjof6jhDSA-dTM"
148+
REACT_APP_FIREBASE_AUTH_DOMAIN="zaino-dev-3ea56.firebaseapp.com"
149+
REACT_APP_FIREBASE_DATABASE_URL="https://zaino-dev-3ea56.firebaseio.com"
150+
REACT_APP_FIREBASE_PROJECT_ID="zaino-dev-3ea56"
151+
REACT_APP_FIREBASE_STORAGE_BUCKET="zaino-dev-3ea56.appspot.com"
152+
REACT_APP_FIREBASE_MESSAGING_SENDER_ID="550657824795"
153+
REACT_APP_FIREBASE_APP_ID="1:550657824795:web:29da52b66934c3ea494f74"
154+
REACT_APP_FIREBASE_MEASUREMENT_ID="G-EWJOIOADSK"
155155
```
156156

157157
##### Caveats ⚠️
158158

159-
- Most of the images used in the [live demo](#live-demo) were purchased from [GraphicRiver](https://graphicriver.net/) and [Freepik](https://www.freepik.com/) and cannot be made part of this repo due to copyright restrictions. To get images in the app, you can add your own to `packages/web-app/src/images/copyrighted` directory using the following structure:
159+
- Most of the images used in the [live demo](#live-demo) were purchased from [GraphicRiver](https://graphicriver.net/) and [Freepik](https://www.freepik.com/) and cannot be made part of this repo due to copyright restrictions. To get images in the app, you can add your own to `packages/web-app/src/images/copyrighted` directory with the following structure:
160160

161161
```shell
162162
├── categories
@@ -175,11 +175,13 @@ REACT_APP_FIREBASE_MEASUREMENT_ID="..."
175175
│ ├── socks.svg
176176
│ ├── stove.svg
177177
│ └── tent.svg
178-
└── mountain.svg <--- page loading indicator image
178+
└── mountain.svg <--- loader image
179179
```
180180

181181
<!-- TODO: Privacy policy location might require update -->
182182

183+
<!-- todo check live demo links -->
184+
183185
- Privacy policy content used in the [live demo](#live-demo) is not part of the repo. You can add your own to `packages/web-app/src/components/pages/PrivacyPolicy/PrivacyPolicyContent.tsx`.
184186

185187
#### Firebase
@@ -188,7 +190,7 @@ REACT_APP_FIREBASE_MEASUREMENT_ID="..."
188190
2. Go to `packages/firebase` and create `.env.development` and `.env.production` files with the variables for your Project IDs. The file format should be like this:
189191

190192
```shell
191-
FIREBASE_PROJECT_ID="..."
193+
FIREBASE_PROJECT_ID="zaino-dev-3ea56"
192194
```
193195

194196
Note: You can change additional settings like regions and Cloud Storage bucket name in [the `.env` file](packages/firebase/.env).
@@ -200,7 +202,8 @@ Note: You can change additional settings like regions and Cloud Storage bucket n
200202

201203
### Running
202204

203-
To start a development server running locally against a deployed development Firestore DB, go to `packages/web-app` and run `npm start`. Note that for this to work, you first need to perform steps in [Setup](#setup) and [Deployment](#deployment).
205+
1. Make sure you did everything in [Setup](#setup) and [Deployment](#deployment).
206+
2. Go to `packages/web-app`, run `npm start` and open [localhost:4200](http://localhost:4200). This will run against a deployed **development** Firebase project.
204207

205208
## Acknowledgements
206209

0 commit comments

Comments
 (0)