{"id":16971769,"url":"https://github.com/julienparis/udata-vue-board","last_synced_at":"2025-06-14T14:06:44.667Z","repository":{"id":39045842,"uuid":"282173590","full_name":"JulienParis/udata-vue-board","owner":"JulienParis","description":"This project aims to provide an independant moderation tool for the data.gouv.fr platform","archived":false,"fork":false,"pushed_at":"2022-12-13T09:15:36.000Z","size":6521,"stargazers_count":0,"open_issues_count":23,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T16:44:01.812Z","etag":null,"topics":["moderation","spa","vuejs"],"latest_commit_sha":null,"homepage":"","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/JulienParis.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}},"created_at":"2020-07-24T09:06:22.000Z","updated_at":"2020-09-15T12:52:46.000Z","dependencies_parsed_at":"2023-01-28T10:16:14.573Z","dependency_job_id":null,"html_url":"https://github.com/JulienParis/udata-vue-board","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JulienParis/udata-vue-board","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienParis%2Fudata-vue-board","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienParis%2Fudata-vue-board/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienParis%2Fudata-vue-board/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienParis%2Fudata-vue-board/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JulienParis","download_url":"https://codeload.github.com/JulienParis/udata-vue-board/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienParis%2Fudata-vue-board/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259827649,"owners_count":22917711,"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":["moderation","spa","vuejs"],"created_at":"2024-10-14T00:54:31.075Z","updated_at":"2025-06-14T14:06:44.636Z","avatar_url":"https://github.com/JulienParis.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MODERATION DASHBOARD FOR [DATAGOUV.FR](https://data.gouv.fr)\n\nThis project aims to provide an independant moderation tool for the data.gouv.fr platform. \n\nIt should allow a datagouv's admin user to log in and do any of the actions it could previously do on the datagouv backoffice (CRUD), but also flag contents/resources/users/orga/... as potentially problematic. Doing so the datagouv moderators/admins team would be able to know which contents were already read, checked, approved by other moderators, and would be able to share the moderation tasks more efficiently amongst the team.\n\n---\n\n## Specs\n\nThe specs and other docs we used at pre-project phases are the following :\n\n- pad specs \u0026 iterations : https://pad.incubateur.net/-_ELVbxhR2GHZ2-vNDwNgg?both\n- pad needs \u0026 goals : https://pad.incubateur.net/NFTUu7o-SO-162K7OHthWw\n- complementary pad : https://pad.incubateur.net/1mOA5ArPRReAdhkdnoJJlg#\n- issues pad : https://pad.incubateur.net/JZt6WQVyRoGQ55FpBZdTsg\n\nThe main goals for this tool are : \n\n- oauth authentication ;\n- CRUD operations on udata collections ;\n- detect \u0026 neutralize chained spams ;\n- flag spammy contents ;\n- watch trolling contents ;\n- watch external links ;\n\nThe development of this dashboard will be iterative, starting with a minimalistic version... We will keep a changelog file on both backend and frontend to keep a trace of the main evolutions.\n\n---\n## Functional diagram\n\ncf : [_link to diagram_](https://app.diagrams.net/#G1dCWjgiiqWmsns34L7TdQ6xX-Ml9CtzOn)\n\n![diagram](./docs/diagrams/TD_MODERATION_DGF-diagram_auth.png)\n\n---\n## Frontend : VueJS\n\n### documentation - [in folder](./frontend/README.md)\n\n### urls\n\n- https://moderation.app.etalab.studio/\n- https://datagouv-tdb-moderation-demo.netlify.app/ [![Netlify Status](https://api.netlify.com/api/v1/badges/8fd5e0aa-46e3-448a-8112-c11c422df840/deploy-status)](https://app.netlify.com/sites/datagouv-tdb-moderation-demo/deploys)\n\n\n### changelog - [in folder](./frontend/CHANGELOG.md)\n\n### notes\n\n- ...\n\n---\n## Backend : Python\n\n### documentation - [in folder](./bbackend/README.md)\n\n### urls\n\n- https://moderation.app.etalab.studio/api\n\n### changelog - [in folder](./backend/CHANGELOG.md)\n\n### notes\n\n- ...\n\n---\n\n## Development\n\nLaunch backend:\n\n```\npython3 -mvenv pyenv\n. pyenv/bin/activate\ncd backend\npython cli.py init-db\nFLASK_DEBUG=1 FLASK_APP=app flask run\n```\n\nLaunch frontend:\n\n```\ncd frontend\ncp .envExample .env\nyarn\nyarn serve\n```\n\nThe frontend is available on http://localhost:8080 and uses the API available at http://localhost:5000.\n\n---\n\n### Production (dokku)\n\nThis project uses two buildpacks, `node` and `python`, to build and install both frontend and backend.\n\nOn the dokku server, prepare the postgres database and create the app:\n\n```\ndokku apps:create datagouv-dashboard-moderation\ndokku postgres:create datagouv-dashboard-moderation\ndokku postgres:link datagouv-dashboard-moderation datagouv-dashboard-moderation\n```\n\nOn local copy:\n\n```\ngit remote add dokku dokku@{host}:datagouv-dashboard-moderation\ngit push dokku master\n```\n\nThe deployment process will run `init-db` thanks to the Procfile.\n\nGet a SSL certificate and redirect to https:\n\n```\ndokku letsencrypt datagouv-dashboard-moderation\n```\n\n:rocket: https://datagouv-dashboard-moderation.{host}/api\n\n### Tweaks\n\n- Use multiple buildpacks, cf `.buildpacks` file.\n- Double `package.json`: node buildpack only works with a `package.json` at the root of the project. The root `package.json` \"proxies\" installation to the `frontend` dir through the `post-install` script. The first `yarn install` install dev dependencies w/ `production=false`, then runs the build in `frontend`, then installs again w/ `production=true` to prune dev dependencies (similar to what the buildpack should be doing on its own but doesn't because our frontend is in a subdirectory).\n- `requirements.txt` is kept at the root of the project for the same reasons.\n- `Procfile` uses `--chdir` for `gunicorn` and `package.json` uses `--cwd` for `yarn`.\n\n## Initial setup\n\nHow this repo has been built (result is commited).\n\n### frontend\n\n```\nyarn global add @vue/cli @vue/cli-service-global\nvue create frontend\n# vue features: vuex, router w/ history mode\n```\n\n```\nrm -rf frontend/.git\ngit init\n```\n\nIn `frontend/vue.config.js`:\n\n```javascript\nmodule.exports = {\n  outputDir: '../dist',\n  assetsDir: 'static'\n}\n```\n\n```\ncd frontend \u0026\u0026 yarn build\n```\n\n### backend\n\n```\npython3 -mvenv pyenv\n. pyenv/bin/activate\nmkdir backend \u0026\u0026 cd backend\n# write code :-)\n```\n\n---\n\n### Development\n\n#### setup\n\n```sh\n# install node dependencies\ncd frontend \u0026\u0026 nvm use \u0026\u0026 yarn\n\n# return to root\ncd ..\n\n# install backend dependencies\npython3 -m venv python_env\nsource python_env/bin/activate\npip install -r requirements.txt\ncd backend\nflask db init\nflask db migrate\n```\n\n#### run locally\n\n```sh\n# rebuild front\ncd frontend \u0026\u0026 nvm use \u0026\u0026 npm run build\n\n# reload backend (backend serves front) with hot reload backend\nflask db upgrade\nexport FLASK_APP=app.py\nexport FLASK_DEBUG=1\nflask run -h localhost -p 8080\n```\n\n\n---\n### Credits\n\nInspiration: https://github.com/oleg-agapov/flask-vue-spa\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienparis%2Fudata-vue-board","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulienparis%2Fudata-vue-board","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienparis%2Fudata-vue-board/lists"}