{"id":15949330,"url":"https://github.com/viniarruda/spotify-project","last_synced_at":"2026-02-17T16:01:53.327Z","repository":{"id":39538886,"uuid":"188440637","full_name":"viniarruda/spotify-project","owner":"viniarruda","description":"A Clone of Spotify create with React using global state management with Context + Hooks","archived":false,"fork":false,"pushed_at":"2023-01-03T22:35:36.000Z","size":7595,"stargazers_count":1,"open_issues_count":22,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-10T23:11:34.769Z","etag":null,"topics":["boilerplate","react","react-context-api","react-hooks","react-hooks-redux","react-state-management","redux","redux-thunk","starter-kit"],"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/viniarruda.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}},"created_at":"2019-05-24T14:56:30.000Z","updated_at":"2020-09-24T19:57:36.000Z","dependencies_parsed_at":"2023-02-01T11:45:31.136Z","dependency_job_id":null,"html_url":"https://github.com/viniarruda/spotify-project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/viniarruda/spotify-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniarruda%2Fspotify-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniarruda%2Fspotify-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniarruda%2Fspotify-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniarruda%2Fspotify-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viniarruda","download_url":"https://codeload.github.com/viniarruda/spotify-project/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniarruda%2Fspotify-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29549212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["boilerplate","react","react-context-api","react-hooks","react-hooks-redux","react-state-management","redux","redux-thunk","starter-kit"],"created_at":"2024-10-07T12:13:55.576Z","updated_at":"2026-02-17T16:01:53.310Z","avatar_url":"https://github.com/viniarruda.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spotify-project\r\n\r\nThis project have 2 structures:\r\n\r\n- **Webpack + Redux** in branch: `webpack`\r\n- **React-scripts + Global State with Context and Hooks** in branch: `master`\r\n\r\nThis project use:\r\n\r\n- React\r\n- Context + Hooks for Global State\r\n- Axios\r\n- React-Player\r\n- LocalStorage for api token\r\n- Styled-components\r\n- FontAwesome\r\n\r\nI use [my boilerplate](https://github.com/viniarruda/react-boilerplate) to create this project, despite using create-react-app, it is fully modified, leaving only the original project react-scripts.\r\n\r\nUse enviroment variables:\r\nIf you need modify, change in file `.env`\r\n\r\n```\r\n\r\nREACT_APP_DEV: http://localhost:8888\r\nREACT_APP_SERVER_PROD = https://spotify-authentication-backend.herokuapp.com\r\nREACT_APP_HML: https://homolog.site.com\r\nREACT_APP_PROD: http://prod.site.com\r\n\r\n```\r\n\r\n### Context + Hooks VS Redux\r\n\r\nI used Context + hooks to create a global State, this method use the hook `useReducer`.\r\nThe method is equals to redux in reducers/actions.\r\n\r\nIn this project the custom hook does the same as the redux thunk. To create a new custom hook, you need to use the prefix use before the name. Example: useCustomHook.\r\n\r\nIf I use redux, I use the structure like this:\r\n\r\n```\r\n    ├── ...\r\n    ├── src\r\n    │   ├── components               # Common components\r\n    │   ├── routes                   # Routes configuration\r\n    │   ├── views                    # Views\r\n    │   ├── store                    # Global state, reducers, actions, queries\r\n    │   │   └── reducers.js          # Combine Reducers\r\n    │   │   └── index.js             # Create store, adding middlewares\r\n    │   │   └── auth                 # Name of props. Ex: Products, Cart, User, Auth\r\n    │   │       └── action-types.js  # The name of actions\r\n    │   │       └── actions.js       # Use createActions for redux-actions\r\n    │   │       └── queries.js       # Axios/Fetch requests\r\n    │   │       └── reducers.js      # Initial State of redux props and reducers\r\n    │   │       └── thunks.js        # Redux thunk to organize and call all the actions/queries\r\n    │   └── utils                    # Helpers (axios, api, storage, etc...)\r\n    ├── index.js                     # Register and initialize the app. Implement the route file\r\n    └── .env                         # Global constants\r\n\r\n```\r\n\r\n## Run\r\n\r\n### Server Project\r\n\r\nThe server is running in Heroku. The first time have a few delay, because the server stay in sleep\r\n\r\n### Client Project\r\n\r\n`git clone git@github.com:viniarruda/spotify-project.git`\r\n\r\n`cd spotify-project`\r\n\r\n`npm install`\r\n\r\n`npm start`\r\n\r\nIf you have any problems, please tell me.\r\n\r\nEnjoy!\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniarruda%2Fspotify-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviniarruda%2Fspotify-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniarruda%2Fspotify-project/lists"}