Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

massive update #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions .firebase/hosting.YnVpbGQ.cache
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
asset-manifest.json,1554208452151,16476039344dce16615b6056cff9a669826183cbc58677dcd498d56a2b4c457c
icon.png,1553167685204,a03f5cb4ee1c75e98174db767944ce0ac320c044b14d25bd574c357c1dd081f7
manifest.json,499162500000,a40a4294484385ec155814f7d72caf5967a19f5efcbedf7a62b2cdff07e42711
index.html,1554208716882,3faede4d20d2ccfcce96ab8d739cbd813fb4bff808e5297dc39aec97bab33f50
precache-manifest.f96c7c78f2d0003f4cbaf45f333f187a.js,1554208452151,3df9a622dd8514b8026d36a41bdb2900c24600a34ceb2bbbf85be2d237784cb3
service-worker.js,1554208452151,313591192fff38ad7673e307c0d5257d2e72ae905434b8b36b1a15b0b30951ea
static/css/main.af07096d.chunk.css,1554208452157,b97f8f97a846641516abd6a75d5924e6255d7f4b6d387742008172be7075e670
static/css/main.af07096d.chunk.css.map,1554208452170,57cb89bfe117ccb3c5d2110e5ef53021957747a3c4e35b72ec2655e724626023
static/js/main.352e3899.chunk.js,1554208452157,bd2dcd42f9852dfdd162121a41ec7c6bb11fcc12152ac38ab24637a0c0091adf
static/js/runtime~main.a8a9905a.js,1554208452170,27518aed75eb917ee7575e8c911b596e850b5265b9e5694a7681cba901419f4d
static/js/runtime~main.a8a9905a.js.map,1554208452170,d13b46ae2acf0d2863e1c6449a51f64702fa5b464c475c0ec20d6e8de9970ef9
static/media/no-img.6732bd42.png,1554208452157,da10c4c8280892a5795d71218c238a46bc196aa4fe36d4cafd34954338a262d2
static/js/main.352e3899.chunk.js.map,1554208452172,670227688380230394ea438d7f743cb75c90f6ae31ad1d12919c9e6e1772abde
static/js/2.1fdac75c.chunk.js,1554208452170,8764ef6acc7295e81dd846a6d80b6906ae919864275a113e73b6f93becf068ac
static/js/2.1fdac75c.chunk.js.map,1554208452172,2685a3a585899dd74d74be1547beb45383e43c9d02cbf3c0b6f72bb49c7441ba
asset-manifest.json,1599237048784,a37436acb2c3ed890859d8d1ba422268924136cee5df506c3648e6a555b2930e
index.html,1599237438093,8acc72df389f855f7ead4584d033e9508531b6b193de7670793796ceb70acf45
precache-manifest.297ebe777b6588e43401c9241030d5c1.js,1599237048784,e672348951dbb81db7c86b0384d914dc16158547ab092cbc585e8283ba553879
robots.txt,1597311595993,bfe106a3fb878dc83461c86818bf74fc1bdc7f28538ba613cd3e775516ce8b49
service-worker.js,1599237048784,1f7ca3b8bc8d5d39183139f33595ef0eb3a20dbe0ebb25778a12ad7cd7612cc4
static/css/main.ed9063aa.chunk.css,1599237048803,649383eb9b26c9e7317d5124820d910721b09b50c40c31611c3f3fc86ea367e9
static/css/main.ed9063aa.chunk.css.map,1599237048805,be9bb3f78f4ec49c2feaadf5f65b8dd43fc585883d586da2686997ce53942e28
static/js/2.ca6b383e.chunk.js.LICENSE.txt,1599237048805,d8aa2a9852b89a820653c377d646319fbe0ccc8986a7fb36a633bae424bf164f
static/js/main.a987a4cd.chunk.js,1599237048788,0858a08a8dd259824470dc3273dbc77987a73b2e890669717496645d8f5deb68
static/js/runtime-main.b5103110.js,1599237048805,8ceb8935bcd352a6098a79f70b5e4d74d5c1ecdfd016211b6e373bc52591e84d
static/js/runtime-main.b5103110.js.map,1599237048805,7d607f8006348c0ba3ca00b038c49a5e8d9a0e678db52e5aada9b53fd3d9d2d4
static/media/No-Image-Thumb.5771e455.jpg,1599237048787,70427fa46001af021d76ff9c01bfbd61234827064deeb34c0590318739dddd35
icon.png,1598680960594,a03f5cb4ee1c75e98174db767944ce0ac320c044b14d25bd574c357c1dd081f7
manifest.json,1598729670979,4a10e636fa72996d15030124c5abbe288791ba8bdd719e99a1dc06e1a792dbc9
static/js/main.a987a4cd.chunk.js.map,1599237048806,2c816f14195b0f64f03585844a036dea617f963378fd7fc991e73a5345fdc695
static/js/2.ca6b383e.chunk.js,1599237048805,09c18292be6f7ec0f9f24dc27387024ab6358c14333d6e21be91b8b134094862
static/js/2.ca6b383e.chunk.js.map,1599237048807,c886dbbf364b235370a3dcb6d814f08d336ef68abe04cd503c456cb860985612
2 changes: 1 addition & 1 deletion .firebaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"projects": {
"default": "socialape-d081e"
"default": "screams-62f3b"
}
}
69 changes: 60 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,68 @@
This is the code base for the React app for my [Full Stack React & Firebase series](https://www.youtube.com/watch?v=RkBfu-W7tt0&list=PLMhAeHCz8S38ryyeMiBPPUnFAiWnoPvWP)
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## 1: API Base URL
## Available Scripts

Add https://europe-west1-socialape-d081e.cloudfunctions.net/api as the 'proxy' value in package.json
In the project directory, you can run:

## 2: Install packages
### `yarn start`

run `npm instll`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

## 3: Run project
The page will reload if you make edits.<br />
You will also see any lint errors in the console.

run `npm start`
### `yarn test`

## 4: Open it
Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

go to [http://localhost:3000](http://localhost:3000)
### `yarn build`

Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

### Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

### Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

### Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

### Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

### `yarn build` fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
5 changes: 5 additions & 0 deletions backend/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "screams-62f3b"
}
}
23 changes: 23 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
6 changes: 6 additions & 0 deletions backend/database.rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
66 changes: 66 additions & 0 deletions backend/dbschema.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
let db = {
users: [
{
userId: 'dh23ggj5h32g543j5gf43',
email: '[email protected]',
handle: 'user',
createdAt: '2019-03-15T10:59:52.798Z',
imageUrl: 'image/dsfsdkfghskdfgs/dgfdhfgdh',
bio: 'Hello, my name is user, nice to meet you',
website: 'https://user.com',
location: 'Lonodn, UK'
}
],
screams: [
{
userHandle: 'user',
body: 'This is a sample scream',
createdAt: '2019-03-15T10:59:52.798Z',
likeCount: 5,
commentCount: 3
}
]
,
comments: [
{
userHandle: 'user',
screamId: 'kdjsfgdksuufhgkdsufky',
body: 'nice one mate!',
createdAt: '2019-03-15T10:59:52.798Z'
}
],
notifications: [
{
recipient: 'user',
sender: 'john',
read: 'true | false',
screamId: 'kdjsfgdksuufhgkdsufky',
type: 'like | comment',
createdAt: '2019-03-15T10:59:52.798Z'
}
]
};

const userDetails = {
// Redux data
credentials: {
userId: '1jX8o3QBnVOjKcdbtwVldMIdudl2',
email: '[email protected]',
handle: 'user',
createdAt: '2019-03-15T10:59:52.798Z',
imageUrl: 'image/dsfsdkfghskdfgs/dgfdhfgdh',
bio: 'Hello, my name is user, nice to meet you',
website: 'https://user.com',
location: 'Lonodn, UK'
},
likes: [
{
userHandle: 'user',
screamId: 'yaagoTiqMqiuKW9aaxSi'
},
{
userHandle: 'user',
screamId: 'yaagoTiqMqiuKW9aaxSi'
}
]
};
19 changes: 19 additions & 0 deletions backend/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"database": {
"rules": "database.rules.json"
}
}
13 changes: 13 additions & 0 deletions backend/functions/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "6.14.0"
}
}
],
["@babel/preset-flow"]
]
}
1 change: 1 addition & 0 deletions backend/functions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
Loading