TowhidKashem / snapchat-clone
- пятница, 17 июля 2020 г. в 00:23:35
TypeScript
👻 A SnapChat clone built with React, Redux and Typescript. Styled with SASS. Tested with Cypress, Jest and Enzyme. Linted with Eslint and formatted with Prettier!
React
common directory houses all shared componentsStorybookRedux
ducks proposal to bundle action types, creators
and reducers all in one file (removing the need to jump around)
thunk for async operationsRedux Devtools Extension for ease of development
SASS
Typescript
Jest and EnzymeCypress
data attributes instead of classes or ids as
these can change often causing tests to break
EslintPrettier (ran as a pre-commit git
hook) before it gets pushed to the repo
Run these commands in the terminal:
$ git clone git@github.com:TowhidKashem/snapchat-clone.git
$ cd snapchat-clone$ npm install
gulp to concatenate, minify and transpile the files
located in public/filters/source/*.js into a single
file called filters.min.js
.env.sample file at the root of the project to
just .env
REACT_APP_MAP_BOX_API_KEY=<REPLACE_WITH_API_KEY>
REACT_APP_MAP_BOX_API_KEY=xy.abc123$ npm start
https://localhost:3000/
https certificate. The
getUserMedia API used by the camera requires
the https protocol so we run the dev server in
https mode.
| Step 1 | Step 2 | Step 3 |
|---|---|---|
|
|
|
|
|
|---|---|
|
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. Where it's not obvious which buttons actually work I added red box-shadows as guides. |
|
|
|---|---|
Storybook is used to showcase the app's custom
component library. You can run Storybook using the command
|
Redux Devtools Extension is implemented in the app, it makes things like viewing the state tree, state flow and debugging much easier, to use it you need to install the browser extension here or here |
public/filters/src/*.js, run the command
npm run gulp watchJS so that your changes get picked up
baseUrl is set to the src directory
in tsconfig so you can use clean import paths like
import Foo from 'common/Foo'; instead of messy ones like
import Foo from '../../common/Foo';. You can also use these in
the SASS files, e.g. @import '~styles/foo`;
/public/api/*.json
Please note I won't be accepting PR's on this project since it's part of my personal portfolio. You're more than welcome to fork and maintain your own version if you like!
The Snapchat name, artwork, trademark are all property of Snap Inc. This project is provided for educational purposes only. It is not affiliated with and has not been approved by Snap Inc.