Skip to content
CC Search Beta is a new search frontend for CC-licensed works across the internet.
Branch: master
Clone or download
Latest commit 826863f May 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Add the CircleCI configuration file Apr 18, 2019
.github Updated PR template so that using it automatically closes fixed issues. Apr 19, 2019
build copy all img assets on build Apr 25, 2019
config extract image info component Apr 25, 2019
src doesn't break search results if logo isnt found May 6, 2019
static Fixes for peer review Sep 26, 2018
test doesn't break search results if logo isnt found May 6, 2019
.babelrc Setting up initial structure Jul 17, 2018
.cc-metadata.yml Fixed key name in metadata file. Mar 9, 2019
.editorconfig removed unnecessary whitespace in editorconfig Feb 14, 2019
.eslintignore Setting up initial structure Jul 17, 2018
.eslintrc.js search by creator checkbox Feb 21, 2019
.gitignore Setting up initial structure Jul 17, 2018
.postcssrc.js Setting up initial structure Jul 17, 2018
CODEBASE.md Codebase documentation Apr 12, 2019
CODEOWNERS CODEOWNERS file Apr 11, 2019
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Apr 11, 2019
CONTRIBUTING.md Clarified that contributors need to open an issue. May 2, 2019
Dockerfile fix issue with node_modules Jan 28, 2019
LICENSE Create LICENSE Jul 17, 2018
README.md Enabled the dev server to run a non-HTTPS version of the site locally. Mar 26, 2019
docker-compose.yml fix issue with node_modules Jan 28, 2019
index.html Merge branch 'master' into favicon May 2, 2019
package-lock.json streamline attribution button Apr 25, 2019
package.json streamline attribution button Apr 25, 2019

README.md

cccatalog-frontend

About

Repository containing the CC Search frontend application. This web app contains all the UI which communicates with the CC Search API to get the data that is rendered in the browser.

CC Search is an interface to search for content that is licensed under Creative Commons licenses or in the public domain.

The frontend app is built using Vue.JS, Babel and Webpack.

Getting Started

Run the following commands in order to have the code up and running on your machine:

# installs dependencies
$ npm install

# Builds and serves assets with hot-reload 
$ npm run dev

Docker setup

Alternatively, you can use Docker to build and run the application. You just have to run:

$ docker-compose up

You should now have the application running and accessible at https://localhost:8443 (note: it runs on https://, not http://). Since it runs on HTTPS, you will probably see a invalid certificate privacy notice on your browser when accessing it. Just follow your browser's instructions to continue and access the website anyway.

If you absolutely need a non-HTTP version, run npm run dev-insecure instead of npm run dev. This is not recommended for most uses.

You don't need to have the CC Search API running locally to be able to run the frontend application. It's configured to communicate, by default, with the API that's already publicly available. If you wish, you can change the URL of the API that's used during development at https://github.com/creativecommons/cccatalog-frontend/blob/master/config/dev-env.js#L7

Running tests

You can run the tests by executing:

npm run test

localhost tunneling

If you want to make your local development server accessible to the internet (for testing or showing someone something you're working on), you can use ngrok. Follow the documentation on the ngrok site to install it and set it up. Once you have it installed, get the development server for CC Search running and in a separate window/tab, run:

# The extra parameters are required to ensure that ngrok redirects to the HTTPS version of the site
# and that the host header matches one that is accepted by the server
# (ngrok's default hostname is randomly generated and is not whitelisted).
ngrok http https://localhost:8443 -host-header="localhost:8443"

If you need to run a HTTP version (for example, if you're testing against third-party websites that do not accept the self-signed cerificate generated by the dev server), run the dev server using npm run dev-insecure and use the following command to start ngrok:

ngrok http 8443 -host-header="localhost:8443"

Deployment

Details about how to deploy the frontend code can be found on the CC Wiki (Accessible to CC Staff only).

You can’t perform that action at this time.