├── .editorconfig
├── .env.sample
├── .gitignore
├── .travis.yml
├── LICENSE
├── Makefile
├── README.md
├── config
├── aliases.js
├── env.js
├── jest
│ ├── cssTransform.js
│ └── fileTransform.js
├── paths.js
├── polyfills.js
├── webpack.config.dev.js
├── webpack.config.prod.js
└── webpackDevServer.config.js
├── package-lock.json
├── package.json
├── public
├── favicon.ico
├── favicon.png
├── icon_feedcast.png
├── index.html
├── locales
│ ├── en
│ │ └── translations.json
│ └── pt
│ │ └── translations.json
└── manifest.json
├── scripts
├── build.js
├── start.js
└── test.js
├── src
├── actions
│ ├── categories.js
│ ├── channels.js
│ ├── episodes.js
│ ├── index.js
│ └── player.js
├── components
│ ├── ChannelCard
│ │ ├── ChannelCard.js
│ │ └── index.js
│ ├── ChannelEpisodes
│ │ ├── ChannelEpisode.js
│ │ ├── ChannelEpisodes.js
│ │ └── index.js
│ ├── EpisodeCard
│ │ ├── EpisodeCard.jsx
│ │ ├── EpisodeCardList.js
│ │ ├── EpisodeCardList.spec.js
│ │ └── index.js
│ ├── FeedcastLoader.jsx
│ ├── Pagination.jsx
│ ├── PlayerFooter
│ │ ├── Player.jsx
│ │ └── index.js
│ ├── QueueEpisodes
│ │ ├── index.js
│ │ └── queueEpisode.js
│ └── Search.jsx
├── i18n.js
├── images
│ └── logo.svg
├── index.js
├── libs
│ └── feedcast-client
│ │ └── index.js
├── pages
│ ├── Page
│ │ ├── Footer.js
│ │ ├── Page.js
│ │ ├── SideBar.js
│ │ └── index.js
│ ├── categories
│ │ ├── CategoriesList.jsx
│ │ └── index.js
│ ├── category
│ │ ├── Category.js
│ │ └── index.js
│ ├── channel
│ │ ├── Channel.js
│ │ └── index.js
│ ├── channels
│ │ ├── ChannelList.js
│ │ └── index.js
│ ├── episode
│ │ └── index.js
│ ├── episodeslist
│ │ ├── EpisodesList.js
│ │ └── index.js
│ ├── home
│ │ ├── Home.js
│ │ ├── Home.spec.js
│ │ ├── __snapshots__
│ │ │ └── Home.spec.js.snap
│ │ ├── components
│ │ │ ├── ChannelCard.js
│ │ │ ├── LatestEpisodes
│ │ │ │ ├── LatestEpisodes.js
│ │ │ │ ├── LatestEpisodes.spec.js
│ │ │ │ └── index.js
│ │ │ ├── categoriesChannelList.jsx
│ │ │ └── categoriesSidebar.jsx
│ │ └── index.js
│ └── queue
│ │ ├── Queue.js
│ │ ├── Queue.spec.js
│ │ └── index.js
├── reducers
│ ├── categories.js
│ ├── channels.js
│ ├── episodes.js
│ ├── index.js
│ └── player.js
├── sagas
│ ├── categories.js
│ ├── channels.js
│ ├── episodes.js
│ ├── index.js
│ └── player.js
├── scripts
│ ├── helpers.js
│ ├── helpers
│ │ └── dictionary.js
│ ├── registerServiceWorker.js
│ └── rollbar.js
├── store.js
├── styles
│ ├── App.sass
│ ├── EpisodeCard.sass
│ ├── EpisodesList.sass
│ ├── FeedcastLoader.sass
│ ├── Pagination.sass
│ ├── PlayerFooter.sass
│ ├── channel.sass
│ ├── channelList.sass
│ ├── constants.sass
│ ├── episode.sass
│ ├── home.sass
│ ├── index.sass
│ ├── mixins.sass
│ ├── queue.sass
│ └── search.sass
├── sw.js
└── tests
│ ├── .gitkeep
│ ├── PlayerFooter
│ └── Player.test.js
│ ├── components
│ └── ChannelEpisodes
│ │ ├── ChannelEpisode.spec.js
│ │ ├── EpisodeCard
│ │ ├── EpisodeCard.spec.js
│ │ └── __snapshots__
│ │ │ └── EpisodeCard.spec.js.snap
│ │ └── __snapshots__
│ │ └── ChannelEpisode.spec.js.snap
│ ├── fixtures
│ └── valid_audio.mp3
│ ├── helpers.js
│ ├── pages
│ ├── EpisodesList.spec.js
│ ├── __snapshots__
│ │ └── EpisodesList.spec.js.snap
│ ├── category
│ │ ├── Category.spec.js
│ │ └── __snapshots__
│ │ │ └── Category.spec.js.snap
│ ├── channel
│ │ ├── Channel.spec.js
│ │ ├── ChannelContainer.spec.js
│ │ └── __snapshots__
│ │ │ ├── Channel.spec.js.snap
│ │ │ └── ChannelContainer.spec.js.snap
│ └── channels
│ │ ├── ChannelList.spec.js
│ │ └── __snapshots__
│ │ └── ChannelList.spec.js.snap
│ ├── reducers
│ └── player.spec.js
│ └── setup.js
└── static.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | # This file is for unifying the coding style for different editors and IDEs.
2 | # More information at http://EditorConfig.org
3 |
4 | # No .editorconfig files above the root directory
5 | root = true
6 |
7 | [*]
8 | indent_style = space
9 | indent_size = 2
10 | charset = utf-8
11 | trim_trailing_whitespace = true
12 | insert_final_newline = true
13 |
14 | [package.json]
15 | indent_size = 2
16 |
--------------------------------------------------------------------------------
/.env.sample:
--------------------------------------------------------------------------------
1 | # Scott API
2 | REACT_APP_API_HOST=https://api.beta.feedcast.io/
3 |
4 | # Google Analytics Key
5 | REACT_APP_GA=UA-XXXXXXX
6 |
7 | #A shortname is the unique identifier assigned to a Disqus site
8 | REACT_APP_DISQUS_SHORTNAME=default
9 |
10 | #Link to feedback form
11 | REACT_APP_FEEDBACK_FORM_URL=http://url.to.form.com
12 |
13 | #Rollbar post_client_item access token
14 | REACT_APP_ROLLBAR_ACCESS_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Dependencies
2 | /node_modules
3 |
4 | # Testing
5 | /coverage
6 |
7 | # Production
8 | /build
9 |
10 | # Environment
11 | .env
12 | .env.local
13 | .env.development.local
14 | .env.test.local
15 | .env.production.local
16 |
17 | # Logs
18 | npm-debug.log*
19 | yarn-debug.log*
20 | yarn-error.log*
21 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "7"
4 | notifications:
5 | slack: feed-cast:AMVxmn8Y5Pw93TOy80zAafLU
6 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: default
2 | default: install
3 |
4 | .PHONY: install
5 | install:
6 | npm i
7 |
8 | .PHONY: setup
9 | setup:
10 | cp .env.sample .env.local
11 |
12 | .PHONY: start
13 | start:
14 | npm start
15 |
16 | .PHONY: test
17 | test:
18 | npm run test
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hurley [](https://travis-ci.org/feedcast/hurley)
2 |
3 | 
4 |
5 | A ReactJS based client listen podcast on all browsers.
6 |
7 | ## Setup
8 |
9 | To install the dependencies run:
10 |
11 | ```sh
12 | make install
13 | ```
14 |
15 | To setup the environment run:
16 |
17 | ```sh
18 | make setup
19 | ```
20 |
21 | > Remember to read the [environment](#environment) section.
22 |
23 | To run the project:
24 |
25 | ```sh
26 | make start
27 | ```
28 |
29 | To run the tests:
30 |
31 | ```sh
32 | make test
33 | ```
34 |
35 | ### Environment
36 | > Variables to configure the build
37 |
38 | * `REACT_APP_API_HOST` - URL for [feedcast/scott](https://github.com/feedcast/scott) running instance.
39 | * `REACT_APP_GA` - Key for Google Analytics
40 | * `REACT_APP_DISQUS_SHORTNAME` - A shortname is the unique identifier assigned to a Disqus site
41 | * `REACT_APP_FEEDBACK_FORM_URL` - Link to feedback form
42 | * `REACT_APP_ROLLBAR_ACCESS_TOKEN` - Rollbar post_client_item access token
43 |
44 | ## Support
45 |
46 | Please [open an issue](https://github.com/feedcast/hurley/issues/new) for support.
47 |
--------------------------------------------------------------------------------
/config/aliases.js:
--------------------------------------------------------------------------------
1 | const paths = require('./paths');
2 |
3 | module.exports = {
4 | // Support React Native Web
5 | // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
6 | 'react-native': 'react-native-web',
7 | 'feedcast-client': paths.appSrc + '/libs/feedcast-client',
8 | 'app': paths.appSrc,
9 | };
10 |
--------------------------------------------------------------------------------
/config/env.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const fs = require('fs');
4 | const path = require('path');
5 | const paths = require('./paths');
6 |
7 | // Make sure that including paths.js after env.js will read .env variables.
8 | delete require.cache[require.resolve('./paths')];
9 |
10 | const NODE_ENV = process.env.NODE_ENV;
11 | if (!NODE_ENV) {
12 | throw new Error(
13 | 'The NODE_ENV environment variable is required but was not specified.'
14 | );
15 | }
16 |
17 | // https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
18 | var dotenvFiles = [
19 | `${paths.dotenv}.${NODE_ENV}.local`,
20 | `${paths.dotenv}.${NODE_ENV}`,
21 | // Don't include `.env.local` for `test` environment
22 | // since normally you expect tests to produce the same
23 | // results for everyone
24 | NODE_ENV !== 'test' && `${paths.dotenv}.local`,
25 | paths.dotenv,
26 | ].filter(Boolean);
27 |
28 | // Load environment variables from .env* files. Suppress warnings using silent
29 | // if this file is missing. dotenv will never modify any environment variables
30 | // that have already been set.
31 | // https://github.com/motdotla/dotenv
32 | dotenvFiles.forEach(dotenvFile => {
33 | if (fs.existsSync(dotenvFile)) {
34 | require('dotenv').config({
35 | path: dotenvFile,
36 | });
37 | }
38 | });
39 |
40 | // We support resolving modules according to `NODE_PATH`.
41 | // This lets you use absolute paths in imports inside large monorepos:
42 | // https://github.com/facebookincubator/create-react-app/issues/253.
43 | // It works similar to `NODE_PATH` in Node itself:
44 | // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
45 | // Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
46 | // Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
47 | // https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421
48 | // We also resolve them to make sure all tools using them work consistently.
49 | const appDirectory = fs.realpathSync(process.cwd());
50 | process.env.NODE_PATH = (process.env.NODE_PATH || '')
51 | .split(path.delimiter)
52 | .filter(folder => folder && !path.isAbsolute(folder))
53 | .map(folder => path.resolve(appDirectory, folder))
54 | .join(path.delimiter);
55 |
56 | // Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
57 | // injected into the application via DefinePlugin in Webpack configuration.
58 | const REACT_APP = /^REACT_APP_/i;
59 |
60 | function getClientEnvironment(publicUrl) {
61 | const raw = Object.keys(process.env)
62 | .filter(key => REACT_APP.test(key))
63 | .reduce(
64 | (env, key) => {
65 | env[key] = process.env[key];
66 | return env;
67 | },
68 | {
69 | // Useful for determining whether we’re running in production mode.
70 | // Most importantly, it switches React into the correct mode.
71 | NODE_ENV: process.env.NODE_ENV || 'development',
72 | //Feedcast Envrionment Variables
73 | FEEDCAST_API_HOST: process.env.FEEDCAST_API_HOST || '',
74 | FEEDCAST_GA: process.env.FEEDCAST_GA || '',
75 | // Useful for resolving the correct path to static assets in `public`.
76 | // For example,
.
77 | // This should only be used as an escape hatch. Normally you would put
78 | // images into the `src` and `import` them in code to get their paths.
79 | PUBLIC_URL: publicUrl,
80 | }
81 | );
82 | // Stringify all values so we can feed into Webpack DefinePlugin
83 | const stringified = {
84 | 'process.env': Object.keys(raw).reduce((env, key) => {
85 | env[key] = JSON.stringify(raw[key]);
86 | return env;
87 | }, {}),
88 | };
89 |
90 | return { raw, stringified };
91 | }
92 |
93 | module.exports = getClientEnvironment;
94 |
--------------------------------------------------------------------------------
/config/jest/cssTransform.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | // This is a custom Jest transformer turning style imports into empty objects.
4 | // http://facebook.github.io/jest/docs/tutorial-webpack.html
5 |
6 | module.exports = {
7 | process() {
8 | return 'module.exports = {};';
9 | },
10 | getCacheKey() {
11 | // The output is always the same.
12 | return 'cssTransform';
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/config/jest/fileTransform.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const path = require('path');
4 |
5 | // This is a custom Jest transformer turning file imports into filenames.
6 | // http://facebook.github.io/jest/docs/tutorial-webpack.html
7 |
8 | module.exports = {
9 | process(src, filename) {
10 | return `module.exports = ${JSON.stringify(path.basename(filename))};`;
11 | },
12 | };
13 |
--------------------------------------------------------------------------------
/config/paths.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const path = require('path');
4 | const fs = require('fs');
5 | const url = require('url');
6 |
7 | // Make sure any symlinks in the project folder are resolved:
8 | // https://github.com/facebookincubator/create-react-app/issues/637
9 | const appDirectory = fs.realpathSync(process.cwd());
10 | const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
11 |
12 | const envPublicUrl = process.env.PUBLIC_URL;
13 |
14 | function ensureSlash(path, needsSlash) {
15 | const hasSlash = path.endsWith('/');
16 | if (hasSlash && !needsSlash) {
17 | return path.substr(path, path.length - 1);
18 | } else if (!hasSlash && needsSlash) {
19 | return `${path}/`;
20 | } else {
21 | return path;
22 | }
23 | }
24 |
25 | const getPublicUrl = appPackageJson =>
26 | envPublicUrl || require(appPackageJson).homepage;
27 |
28 | // We use `PUBLIC_URL` environment variable or "homepage" field to infer
29 | // "public path" at which the app is served.
30 | // Webpack needs to know it to put the right