Skip to content

Commit 41fbf8b

Browse files
committed
Added license, checking readme
1 parent 5b356f3 commit 41fbf8b

File tree

3 files changed

+104
-56
lines changed

3 files changed

+104
-56
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020-present, Towhid Kashem
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+74-55
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,107 @@
1-
<h1 align="center">👻 SnapChat clone</h1>
1+
<h1 align="center">👻 SnapChat Clone</h1>
22

3-
<h2 align="center">
4-
<a href="https://google.com">[LIVE DEMO]</a>
5-
</h2>
6-
<p align="middle">
7-
<a href="public/github/snapchat.mp4">
8-
<img src="public/github/snapchat.gif" width="400" />
9-
</a>
10-
</p>
11-
<p align="middle">
12-
👆Click the image for a video showing what you can currently do!
13-
</p>
3+
# ⚡️Breakdown
144

15-
# ⚡️ Breakdown
5+
<div style="overflow:hidden;vertical-align:top">
6+
<p style="float:left;width:35%;margin:0">
7+
<a href="public/github/snapchat.mp4">
8+
<img src="public/github/snapchat.gif" />
9+
<br />
10+
👆Click to see all implemented features
11+
</a>
12+
</p>
13+
<div style="float:left;width:50%">
14+
15+
<h2 align="center">
16+
<a href="https://google.com">[LIVE DEMO]</a>
17+
</h2>
1618

1719
- Built with `React`
1820
- Functional components using hooks
1921
- Feature based folder structure
2022
- `common` directory for shared components
2123
- Bootstraped using `Create React App`
2224
- Global state management via `Redux`
23-
- Follows the modular [ducks](https://github.com/erikras/ducks-modular-redux) proposal to bundle action types, creators and reducers all in one file
25+
- Follows the modular [ducks](https://github.com/erikras/ducks-modular-redux) proposal to bundle action types, creators and reducers all in one file (reducing the need to jump around)
2426
- Flat state tree (avoids deeply nested properties)
2527
- Follows official Redux styleguide recomendations for naming actions and action types, e.g. `camera/photosFetched` vs `SET_PHOTOS`
2628
- Uses `thunk` middleware for async operations
2729
- Type checked with `Typescript`
2830
- Unit tested with `Jest` and `Enzyme`
29-
- End-to-end tested in `Cypress`
31+
- End-to-end tested with `Cypress`
3032
- Custom component library showcased in `Storybook`
3133
- Linted using `Eslint`
3234
- Code is auto formatted using `Prettier` (ran as a pre-commit git hook) before it gets pushed to the repo
35+
- Feels close to a native app if you "add to homescreen" on mobile
36+
37+
<h2 align="center">
38+
<a href="https://google.com">[LIVE DEMO]</a>
39+
</h2>
40+
41+
</div>
42+
</div>
3343

3444
# 💿 Installation
3545

3646
Run these commands in the terminal:
3747

38-
- `> git clone [email protected]:TowhidKashem/snapchat-clone.git`
39-
- `> cd snapchat-clone`
40-
- `> npm install`
41-
- This will:
42-
- Install the dependencies in package.json
43-
- Checkout [jeelizFaceFilter](https://github.com/jeeliz/jeelizFaceFilter_) package (used for filters) and set it to the last version this project was tested and confirmed to work with
44-
- Run `gulp` to concatenate, minify and transpile the files located in `public/filters/source/*.js` into a single file called `filters.min.js`
45-
- This part is optional but strongly recomended, without it you won't be able to view any of the snap map features:
46-
- Make a Mapbox account and [get a free API key](https://docs.mapbox.com/help/glossary/access-token/)
47-
- Rename the `.env.sample` file at the root of the project to just `.env`
48-
- Inside enter your new API key, for example:
49-
- Before: `REACT_APP_MAP_BOX_API_KEY=<REPLACE_WITH_API_KEY>`
50-
- After: `REACT_APP_MAP_BOX_API_KEY=az.xyz123`
51-
- `> npm start`
52-
- The app should open automatically in your browser at `https://localhost:3000/`
53-
- In Chrome you will receive a "Your connection is not private" error
54-
- Click "Advanced" > "Proceed to localhost (unsafe)"
48+
1. `> git clone [email protected]:TowhidKashem/snapchat-clone.git`
49+
2. `> cd snapchat-clone`
50+
3. `> npm install`
51+
52+
- This will:
53+
- Install the dependencies in package.json
54+
- Checkout [jeelizFaceFilter](https://github.com/jeeliz/jeelizFaceFilter_) package (used for the filters) and set it to the last version this project was tested and confirmed to work with
55+
- Run `gulp` to concatenate, minify and transpile the files located in `public/filters/source/*.js` into a single file called `filters.min.js`
56+
57+
4. This part is optional but strongly recomended, without it you won't be able to view any of the snap map features:
58+
59+
- Make a Mapbox account and [get a free API key](https://docs.mapbox.com/help/glossary/access-token/)
60+
- Rename the `.env.sample` file at the root of the project to just `.env`
61+
- Inside enter your new API key, for example:
62+
- Before: `REACT_APP_MAP_BOX_API_KEY=<REPLACE_WITH_API_KEY>`
63+
- After: `REACT_APP_MAP_BOX_API_KEY=xy.abc123`
64+
65+
5. `> npm start`
66+
67+
- The app should open automatically in your browser at `https://localhost:3000/`
68+
- In Chrome you will receive a "Your connection is not private" error
69+
- Click "Advanced" > "Proceed to localhost (unsafe)"
70+
- You'll get this warning because the app uses a self signed `https` certificate. The `getUserMedia` API used by the camera requires the `https` protocol so we run the dev server in https mode.
5571

5672
<p align="middle">
5773
<img src="public/github/https-step-1.png" width="400" />
5874
<img src="public/github/https-step-2.png" width="400" />
5975
</p>
6076

61-
You'll get this warning because the app uses a self signed `https` certificate. The `getUserMedia` API used by the camera requires the `https` protocol so we run the dev server in https mode.
62-
63-
- After this you will be prompted to give access to your webcam, click "Allow"
77+
6. After this you will be prompted to give access to your webcam, click "Allow"
6478

6579
<p align="middle">
66-
<img src="public/github/camera-access.png" width="400" />
80+
<img src="public/github/camera-access.png" width="300" />
6781
</p>
6882

69-
- You're all set up!
83+
7. You're all set!
7084

7185
# 🦮 Guides
7286

73-
Not all the buttons are actionable, many of them are there just for show since this is a minimal demo. The video at the top of this README shows all the things you can currently do.
87+
<div style="overflow:hidden">
88+
<img src="public/github/guide.png" width="150" style="float:left;margin-right:20px" />
89+
90+
Not all the buttons are actionable, many of them are there just for show since this is a minimal demo. [This video]() shows all the things you can currently do.
7491

7592
Where it's not obvious which buttons actually work I added a red box-shadow as guide:
7693

77-
<p align="middle">
78-
<img src="public/github/guide.png" width="300" />
79-
</p>
94+
</div>
8095

8196
# 🛠 Tooling
8297

83-
- The app has it's own component library and uses Storybook to showcase them. You can run Storybook using the command `npm run storybook`.
84-
8598
<p align="middle">
86-
<img src="public/github/storybook.png" width="600" />
99+
<img src="public/github/storybook.png" width="400" />
100+
<img src="public/github/redux-extension.png" width="400" />
87101
</p>
88102

89-
- The Redux Devtools Extension is implemented in the app, it makes things like viewing the state, state flow and debugging much easier, you can install the browser extension [here](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en) or [here](https://addons.mozilla.org/en-US/firefox/addon/reduxdevtools/).
90-
91-
<p align="middle">
92-
<img src="public/github/redux-extension.png" width="600" />
93-
</p>
103+
- The app has it's own component library and uses Storybook to showcase it. You can run Storybook using the command `npm run storybook`.
104+
- The Redux Devtools Extension is implemented in the app, it makes things like viewing the state, state flow and debugging much easier, to use it you need to install the browser extension [here](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en) or [here](https://addons.mozilla.org/en-US/firefox/addon/reduxdevtools/).
94105

95106
# 🧪 Testing
96107

@@ -119,17 +130,25 @@ There are two types of tests in the app (end to end and unit).
119130

120131
## Unit tests:
121132

133+
<div style="overflow:hidden">
134+
<img src="public/github/unit-tests.png" width="150" style="float:left;margin-right:40px" />
135+
122136
- All the shared components in the `common` directory have unit tests inside their respective folders. They end with a `*.test.tsx` extension.
123-
- To run the unit test suite use the command `npm run test` then enter `a` to run all tests
124-
- These tests are also automatically run on each commit, if there are any failures the commit will also fail
137+
- To run the unit test suite use the command `npm run test` then enter `a` to run all tests
138+
- These tests are also automatically run on each commit, if there are any failures the commit will also fail
139+
</div>
125140

126-
<p align="middle">
127-
<img src="public/github/unit-tests.png" width="400" />
128-
</p>
141+
# 📝 Misc Notes
142+
143+
- In addition to running on the localhost domain the app is also available on your network at `https://192.168.0.185:3000` (useful for viewing on mobile)
144+
- If you want to make changes to the filter files, run the command `cd filters && gulp watchJS` to watch for changes
145+
- If you want to browse the production build run the commands `npm run build && npm run serve`, then navigate to `http://localhost:5000` locally or `http://192.168.0.185:5000` on the network
146+
- Webpack root dir is set to `src` which means we can use clean import paths like these `import Foo from common/Foo` vs messy relative paths like `import Foo from ../../common/Foo`
147+
- This is purely a front end demo project, the "api" is nothing but a bunch of hard coded json files located in `/public/api/*.json`. All data is dummy data!
129148

130149
# ⚠️ Contributing
131150

132-
**Please note I will not be accepting PR's on this project** since it is part of my personal portfolio. You're more than welcome to fork and maintain your own version if you like!
151+
Please note **I will not be accepting PR's on this project** since it is part of my personal portfolio. You're more than welcome to fork and maintain your own version if you like!
133152

134153
# ⚖️ License
135154

TODO.txt

+9-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,12 @@ Last:
77

88
git ignoew .env file
99

10-
test windows
10+
test windows
11+
12+
mention dummy api?
13+
14+
get rid of actual address from screenshots
15+
16+
how to not push .env file to github pages but still work?
17+
18+
styled with scss

0 commit comments

Comments
 (0)