{"id":23785207,"url":"https://github.com/benjaminadk/youtube-clone","last_synced_at":"2025-09-06T03:31:00.739Z","repository":{"id":97146758,"uuid":"111108688","full_name":"benjaminadk/youtube-clone","owner":"benjaminadk","description":"You Tube Clone Video Tutorial","archived":false,"fork":false,"pushed_at":"2018-06-24T09:04:07.000Z","size":782,"stargazers_count":18,"open_issues_count":0,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T19:39:30.874Z","etag":null,"topics":["apollo","babel","express","graphql","node","react","tutorial"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benjaminadk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-11-17T13:50:54.000Z","updated_at":"2023-07-01T03:33:40.000Z","dependencies_parsed_at":"2023-10-20T18:22:12.129Z","dependency_job_id":null,"html_url":"https://github.com/benjaminadk/youtube-clone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benjaminadk/youtube-clone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminadk%2Fyoutube-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminadk%2Fyoutube-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminadk%2Fyoutube-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminadk%2Fyoutube-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benjaminadk","download_url":"https://codeload.github.com/benjaminadk/youtube-clone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminadk%2Fyoutube-clone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273853146,"owners_count":25179792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apollo","babel","express","graphql","node","react","tutorial"],"created_at":"2025-01-01T13:15:22.392Z","updated_at":"2025-09-06T03:31:00.364Z","avatar_url":"https://github.com/benjaminadk.png","language":"JavaScript","readme":"## You Tube Clone\n\n### Instructions\n\n- `git clone https://github.com/benjaminadk/youtube-clone.git`\n- `cd youtube-clone`\n- `npm install`\n- `cd client`\n- `npm install`\n- create `client/config/dev.js`\n- add your personal keys\n\n### A Full Stack React App Tutorial Series\n\n#### Video 1 - Intro\n\n- initialize project and install express, babel, etc\n\n#### Video 2 - Graphql Basics\n\n- endpoints, graphql, graphiql, schema, resolvers\n\n#### Video 3 - Graphiql\n\n- setup graphiql GUI\n\n#### Video 4 - Mlab\n\n- setup mlab and mongoose\n\n#### Video 5 - User model\n\n- basic user model\n\n#### Video 6 - Passport\n\n- finish models install passport\n\n#### Video 7 - Passport 2\n\n- create a google app\n\n#### Video 8 - Passport 3\n\n- test it out and summary of google oauth20\n\n#### Video 9 - Saving a User\n\n- mongoose basics\n\n#### Video 10 - Refactor Schema\n\n- align with mongoose values\n- install concurrently and create react app\n\n#### Video 11 - Material UI\n\n- install latest material ui and apollo\n\n#### Video 12 - React Router\n\n- basic setup\n\n#### Video 13 - Apollo Frontend Test\n\n- first apollo react component\n\n#### Video 14 - Bug Fixes\n\n- cors, typos, npm packages\n\n#### Video 15 - Navigation\n\n- material ui appbar and drawer\n\n#### Video 16 - Navigation Icons\n\n- link to upload, classes\n\n#### Video 17 - Upload Component\n\n- component style and layout\n- use resource upload background\n\n#### Video 18 Video Model\n\n- create video model on backend\n\n#### Video 19 Json Web Token\n\n- create a json web token on login\n\n#### Video 20 Json Web Token 2\n\n- fetching jwt on frontend\n\n#### Video 21 Json Web Token 3\n\n- finalize jwt fetching\n\n#### Video 22 Json Web Token 4\n\n- transfer jwt to backend\n- add user to context\n\n#### Video 23 Video Upload\n\n- bucket config\n- aws sdk\n\n#### Video 24 Video Upload 2\n\n- send the video to aws\n- axios\n\n#### Video 25 Save Video\n\n- video details and save to database\n\n#### Video 26 Play Video\n\n- finally play a video on the frontend\n\n#### Video 27 Video Details\n\n- views, likes, dislikes, user and video info added to view\n\n#### Video 28 Video Views\n\n- find and update a videos views when the video loads\n\n#### Video 29 Video Likes\n\n- thumbs up and thumbs down\n- complete implementation model, schema, resolvers, mutations, refetchQueries\n\n#### Video 30 Video Share\n\n- modal/dialog for sharing to social media\n- react-share package\n\n#### Video 31 Video Share 2\n\n- more explanations and implementation\n\n#### Video 32 Video Share 3\n\n- setup embed option and time query param\n- use momentjs and query-string\n\n#### Video 33 Video Poster\n\n- total refactor of Upload component\n- add dropzone for poster\n- show poster in Video component\n\n#### Video 34 Comment\n\n- refactor Video main div into two sub components\n- adjust height of certain components\n\n#### Video 35 Comment 2\n\n- comment model, schema, resolvers setup\n- use of mongoose.populate\n- expand our big query for video to include comments\n\n#### Video 36 Comment 3\n\n- slow explanation of client code around comments\n\n#### Video 37 Sub Comment\n\n- remove comments from user model\n- implement sub comments\n\n#### Video 38 Sub Comment 2\n\n- further explanation of sub comment mutation\n\n#### Video 39 Firebase Notification\n\n- see below for setup instructions\n\n#### Video 40 Firebase Notification 2\n\n- getToken\n- backend admin\n\n#### Video 41 My Channel - Videos\n\n- build the My Channel View\n- install react-swipeable-views in client\n\n#### Video 42 My Channel - About\n\n- build the about tab\n- install country-list package\n\n#### Video 43 My Channel - Search\n\n- implement simple search of videos\n\n#### Video 44 Video List 1\n\n- implement basic video list to right of player\n- uses moment to check date and add NEW icon\n\n#### Video 45 Play Pause Feature\n\n- add onClick play/pause toggle to video component\n- use react-transition-group to add animated icon\n\n#### Video 46 Video List 2\n\n- add ability to display video duration on thumbnail\n- uses componentDidUpdate lifecycle method\n\n#### Video 47 Video List 3\n\n- set up menu basics\n- more css crapola\n- some additional explanation of Video 46 points\n\n#### Video 48 Playlists 1\n\n- models, schemas and resolvers for playlists\n- overview of what it looks like in the app\n\n#### Video 49 Playlists 2\n\n- frontend code - state, menu, popovers, checkboxes\n- using componentDidMount\n\n#### Video 50 Playlists 3\n\n- playlists tab - overlay method\n- mutation for adding and removing videos from playlists\n\n#### Video 51 Playlists 4\n\n- allow user to create new playlist when uploading video\n- refetchQueries and moving some reused queries to their own file\n\n#### Video 52 Search Bar 1\n\n- search bar is universal - built into routes/index where BrowserRouter is located\n- basic functionality and landing page for results\n\n#### Video 53 Big Refactor\n\n- upgraded to Material-UI v1 (was beta)\n- refactor around breaking changes\n  - different prop names for MUI components - `onClose` vs `onRequestClose` for modals, menus\n  - use or `variant` instead of `type` props typography\n  - covert inline style props to className using MUI's `withStyles` component\n  - work with theme creation\n- upgraded React and ReactDOM\n- refactored backend - removed babel and thus `import` statements\n  - use CommonJs `require` statements\n  - no great advantage and an extract build step with babel\n- added aws credentials to resolver files in aws s3 instansiation\n  - credentials go into `dev.js` now\n- fixing small bugs\n\n#### Video 54 More Refactor\n\n- improving Video Component and all its sub components\n- authenticate mutation to avoid making a user log in over and over\n- Private Routes so unauthorized users cannot use the cool parts of the app\n- general styling, upgrading and bug fixing\n\n#### Resources\n\n```\n   \"proxy\": {\n     \"/auth/*\": {\n       \"target\": \"http://localhost:3001\"\n     }\n   },\n```\n\n- **_Upload Background_**\n  - https://s3-us-west-1.amazonaws.com/youtube-clone-assets/upload-background.svg\n- **_YTC Notification Logo_**\n  - https://s3-us-west-1.amazonaws.com/youtube-clone-assets/icon.png\n- **_Sample AWS S3 Bucket Policy_**\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Id\": \"S3-Console-Auto-Gen-Policy-1501076877929\",\n    \"Statement\": [\n        {\n            \"Sid\": \"S3PolicyStmt-DO-NOT-MODIFY-1501076877929\",\n            \"Effect\": \"Allow\",\n            \"Principal\": {\n                \"Service\": \"s3.amazonaws.com\"\n            },\n            \"Action\": \"s3:PutObject\",\n            \"Resource\": \"arn:aws:s3:::\u003cyour bucket name\u003e/*\",\n            \"Condition\": {\n                \"StringEquals\": {\n                    \"aws:SourceAccount\": \"056188042019\",\n                    \"s3:x-amz-acl\": \"bucket-owner-full-control\"\n                },\n                \"ArnLike\": {\n                    \"aws:SourceArn\": \"arn:aws:s3:::\u003cyour bucket name\u003e\"\n                }\n            }\n        }\n    ]\n}\n```\n\n- **_Sample Bucket CORS Policy_**\n\n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cCORSConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\"\u003e\n\u003cCORSRule\u003e\n    \u003cAllowedOrigin\u003e\u003cyour website url\u003e\u003c/AllowedOrigin\u003e\n    \u003cAllowedMethod\u003ePOST\u003c/AllowedMethod\u003e\n    \u003cAllowedMethod\u003ePUT\u003c/AllowedMethod\u003e\n    \u003cAllowedMethod\u003eDELETE\u003c/AllowedMethod\u003e\n    \u003cMaxAgeSeconds\u003e10000\u003c/MaxAgeSeconds\u003e\n    \u003cAllowedHeader\u003e*\u003c/AllowedHeader\u003e\n\u003c/CORSRule\u003e\n\u003cCORSRule\u003e\n    \u003cAllowedOrigin\u003e*\u003c/AllowedOrigin\u003e\n    \u003cAllowedMethod\u003eGET\u003c/AllowedMethod\u003e\n    \u003cMaxAgeSeconds\u003e3000\u003c/MaxAgeSeconds\u003e\n    \u003cAllowedHeader\u003eAuthorization\u003c/AllowedHeader\u003e\n\u003c/CORSRule\u003e\n\u003c/CORSConfiguration\u003e\n```\n\n- **_Firebase Cloud Messaging_**\n- Frontend\n\n  - `npm install -S firebase` in client directory\n  - create `firebase-messaging-sw.js` in client/src/public\n  - add `\"gcm_sender_id\": \"103953800507\"` to `manifest.json` - number is universal\n  - create `fire.js` with config information in client/src\n  - import config into your root javascript file - webpack will bundle\n  - **_Example fire.js_**\n\n    ```\n    import firebase from 'firebase'\n\n    const config = {\n      messagingSenderId: \"\u003cyour sender id\u003e\"\n    }\n\n    export default firebase.initializeApp(config)\n    ```\n\n- Backend\n  - `npm install -S firebase-admin` in root directory\n  - firebase settings - Firebase Admin SDK - Generate New Private Key\n  - create a file the configs admin\n  - keeping privateKey hidden is important\n  - **_Example firebase/index.js_**\n\n```\nimport admin from 'firebase-admin'\nimport keys from '../config/keys'\n\nadmin.initializeApp({\n  credential: admin.credential.cert({\n    projectId: \"\u003cyour project id\u003e\",\n    clientEmail: \"\u003cyour firebase email\u003e\",\n    privateKey: keys.firebaseKey\n  })\n})\n\nconsole.log('FIREBASE INITIALIZED')\n```\n\n#### Important Links\n\n##### [Apollo 2.0](https://www.apollographql.com/)\n\n##### [Express](https://expressjs.com/)\n\n##### [Babel](https://babeljs.io/)\n\n##### [Passport](http://www.passportjs.org/)\n\n##### [Create React App](https://github.com/facebookincubator/create-react-app)\n\n##### [Material UI 1.0](https://material-ui-next.com/)\n\n##### [AWS Credentials Docs](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html)\n\n##### [AWS Javascript SDK Docs](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/welcome.html)\n\n##### [React Share](https://github.com/nygardk/react-share)\n\n##### [Query String](https://github.com/sindresorhus/query-string)\n\n##### [Moment js](https://momentjs.com/)\n\n##### [Firebase](https://firebase.google.com/)\n\n##### [React Swipeable Views](https://react-swipeable-views.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjaminadk%2Fyoutube-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenjaminadk%2Fyoutube-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjaminadk%2Fyoutube-clone/lists"}