{"id":23143615,"url":"https://github.com/digitalinteraction/poster-vote-frontend","last_synced_at":"2026-02-02T06:35:11.737Z","repository":{"id":146138438,"uuid":"360192865","full_name":"digitalinteraction/poster-vote-frontend","owner":"digitalinteraction","description":"The Vue.js based web app for Poster Vote","archived":false,"fork":false,"pushed_at":"2023-05-11T12:44:08.000Z","size":3139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T12:14:29.567Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://postervote.openlab.ncl.ac.uk/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitalinteraction.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-21T14:05:27.000Z","updated_at":"2024-11-08T12:31:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"7caae5bb-85d6-40ff-825a-ecb6f1ecbcc0","html_url":"https://github.com/digitalinteraction/poster-vote-frontend","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/digitalinteraction/poster-vote-frontend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Fposter-vote-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Fposter-vote-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Fposter-vote-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Fposter-vote-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalinteraction","download_url":"https://codeload.github.com/digitalinteraction/poster-vote-frontend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Fposter-vote-frontend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262528227,"owners_count":23324517,"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","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":[],"created_at":"2024-12-17T15:13:51.028Z","updated_at":"2026-02-02T06:35:06.704Z","avatar_url":"https://github.com/digitalinteraction.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PosterVote frontend\n\nThis is the repo for the PosterVote front end source code.\nIt is a [VueJs](https://vuejs.org/) app written in JavaScript and deployed through [Docker](https://www.docker.com/).\nIt is a [PWA](https://developers.google.com/web/progressive-web-apps/)\nserved inside a single `index.html` file which is compiled through the\n[vue cli](https://cli.vuejs.org/) using [Webpack](https://webpack.js.org/).\n\n[What is PosterVote?](https://github.com/digitalinteraction/poster-vote)\n\n\u003c!-- toc-head --\u003e\n\n## Table of Contents\n\n- [Development](#development)\n  - [Setup](#setup)\n  - [Regular use](#regular-use)\n  - [Irregular use](#irregular-use)\n  - [Structure](#structure)\n  - [Code formatting](#code-formatting)\n- [Deployment](#deployment)\n  - [Building the image](#building-the-image)\n  - [Using the image](#using-the-image)\n- [Future Work](#future-work)\n\n\u003c!-- toc-tail --\u003e\n\n## Development\n\n### Setup\n\nTo develop on this repo you will need to have [Docker](https://www.docker.com/) and\n[node.js](https://nodejs.org) installed on your dev machine and have an understanding of them.\nThis guide assumes you have the repo checked out and are on macOS, but equivalent commands are available.\n\nYou'll only need to follow this setup once for your dev machine.\n\n```bash\n# Install dependencies\nnpm install\n\n# Setup the development api server\n# -\u003e Fill in your SENDGRID_TOKEN, see https://app.sendgrid.com/settings/api_keys\ncp .env.api.example .env.api.local\nnano .env.api.local\n\n# Start up a mysql and api instance using docker\n# -\u003e See `docker-compose.yml` for how it works\n# -\u003e Remember to stop these containers when you've finished with 'docker-compose stop'\ndocker-compuse up -d\n\n# Run the database migrations\ndocker-compose exec api cli\n```\n\n### Regular use\n\nThese are the commands you'll regularly run to develop the API, in no particular order.\n\n```bash\n# Run the webpack server\n# -\u003e Runs on http://localhost:8080\n# -\u003e Stop with Ctrl+C\n# -\u003e Watches for changes and hot reloads in the browse\nnpm run serve\n\n# Stop development containers when you've finished developing\ndocker-compose stop\n```\n\n### Irregular use\n\nThese are commands you might need to run but probably won't, also in no particular order.\n\n```bash\n# Generate the table of contents for this readme\n# -\u003e It'll replace content between the toc-head and toc-tail HTML comments\nnpm run gen-readme-toc\n\n# Manually lint code with vue-cli-service\nnpm run lint\n\n# Manually format code\n# -\u003e This repo is setup to automatically format code on git-push\nnpm run format\n\n# Manually build all assets (html, css, js \u0026 images)\n# -\u003e Runs both the other build commands together\n# -\u003e Writes to dist/\nnpm run build\n\n# Generates sized favicons based on `public/large-icon.png`\nnode tools/genFavicon.js\n```\n\n### Structure\n\n| Folder         | Use                                                          |\n| -------------- | ------------------------------------------------------------ |\n| public         | Static assets to be served by nginx                          |\n| src            | The location of the source code                              |\n| src/assets     | Assets to be compiled in with webpack                        |\n| src/components | Custom Vue components                                        |\n| src/services   | Custom js services to access things, i.e. the postervote api |\n| src/views      | Custom Vue components to be routed to                        |\n| tools          | Scripts to ease development                                  |\n\n### Code formatting\n\nThis repo uses [Prettier](https://prettier.io/) to automatically format code to a consistent standard.\nIt works using the [husky](https://www.npmjs.com/package/husky)\nand [lint-staged](https://www.npmjs.com/package/lint-staged) npm packages to\nautomatically format code whenever code is commited.\nThis means that code that is pushed to the repo is always formatted to a consistent standard.\n\nYou can manually run the formatter with `npm run format` if you want.\n\nPrettier is slightly configured in [.prettierrc.yml](/.prettierrc.yml)\nand also ignores files using [.prettierignore](/.prettierignore).\n\n## Deployment\n\n### Building the image\n\nThis repo uses a [GitLab CI](https://about.gitlab.com/product/continuous-integration/)\nto build a Docker image when you push a git tag.\nThis is designed to be used with the `npm version` command so all docker images are [semantically versioned](https://semver.org/).\nThe `:latest` docker tag is not used.\n\nThis job runs using the [.gitlab-ci.yml](/.gitlab-ci.yml) file which\nruns a docker build using the [Dockerfile](/Dockerfile)\nand **only** runs when you push a [tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging).\n\nIt pushes these docker images to the GitLab registry of the repo.\nA slight nuance is that it will replace a preceding `v` in tag names, formatting `v1.0.0` to `1.0.0`.\n\n```bash\n# Deploy a new version of the CLI\nnpm version # major | minor | patch | --help\ngit push --tags\n```\n\n### Using the image\n\nWith this docker image you can easily deploy it to your server using docker-compose.\nThis repo uses [configurable nginx](https://github.com/robb-j/configurable-nginx/)\nto allow docker environment variables be set inside the JavaScript PWA.\nYou can set where the api is as seen below.\n\n```yml\nversion: '3'\n\nservices:\n  web:\n    image: openlab.ncl.ac.uk:4567/poster-vote/vue-frontend:1.0.0\n    restart: unless-stopped\n    ports:\n      - 80:80\n    environment:\n      - CONFIG_KEYS=API_URL\n      - API_URL=https://api.postervote.example.io\n```\n\n## Future Work\n\n- Only show your posters on `/posters` (if you visted another and its cached)\n\n---\n\n\u003e The code on https://github.com/digitalinteraction/poster-vote-frontend is a mirror of https://openlab.ncl.ac.uk/gitlab/poster-vote/vue-frontend\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalinteraction%2Fposter-vote-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalinteraction%2Fposter-vote-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalinteraction%2Fposter-vote-frontend/lists"}