jackodsteel / cacophony-browse

The web interface for the Cacophony Project API

Home Page:https://browse.cacophony.org.nz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cacophony-browse

This is a web interface for querying with and interacting with Cacophony Project recordings using the project's API. It is based on the Vue framework and uses Vuex for state management.

Build Setup

# install dependencies
npm install

# create config file
cp dev-config.js.TEMPLATE to dev-config.js
# now edit the config file to point to correct API server

# serve with hot reload at localhost:8080
npm run dev

# build for staging & production with minification
npm run release

For detailed explanation on how things work, consult the docs for vue-loader.

Development

Please follow the Vue style guide for all development: https://vuejs.org/v2/style-guide/#ad

The project is configured to use eslint and prettier. Please ensure your development setup included a recent version of prettier. Pull requests will be checked to ensure there are no code formatting or eslint issues.

To run eslint:

npm run lint

To run eslint and automatically fix issues:

npm run lint:fix

Releases

  • Ensure all changes have been merged and are pulled into the local copy.
  • Tag the release (starting with a "v"), e.g.: git tag -a v1.2.3 -m "1.2.3 release"
  • Push the tag to Github, e.g.: git push origin v1.2.3
  • TravisCI will run the tests, create a release package and create a Github Release

Web Server Configuration

The /srv/cacophony/cacophony-browse directory in the release package should be served by a web server.

Sample configuration for the Caddy web server:

# Update the host and port to match desired
http://localhost:9000 {
    gzip
    root  /srv/cacophony/cacophony-browse

    rewrite {
        ext !.jpg !.png !.svg !.js
        to /index-prod.html  # or index-staging.html
    }
}

About

The web interface for the Cacophony Project API

https://browse.cacophony.org.nz/


Languages

Language:Vue 71.5%Language:JavaScript 23.8%Language:TypeScript 3.8%Language:CSS 0.5%Language:HTML 0.3%Language:Shell 0.1%