{"id":20862372,"url":"https://github.com/dnum-mi/basegun","last_synced_at":"2025-07-29T11:32:35.585Z","repository":{"id":39589362,"uuid":"417524172","full_name":"dnum-mi/basegun","owner":"dnum-mi","description":"Web app for identifying a firearm based on a picture","archived":false,"fork":false,"pushed_at":"2025-07-21T07:04:04.000Z","size":180739,"stargazers_count":16,"open_issues_count":34,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-21T09:14:16.590Z","etag":null,"topics":["classification-model","firearms","python","pytorch","vue"],"latest_commit_sha":null,"homepage":"https://basegun.interieur.gouv.fr/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnum-mi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-15T14:13:08.000Z","updated_at":"2025-05-30T13:14:31.000Z","dependencies_parsed_at":"2023-10-12T19:32:07.871Z","dependency_job_id":"21c1e850-219e-4c99-b6ba-9adc9afef4fa","html_url":"https://github.com/dnum-mi/basegun","commit_stats":null,"previous_names":["dnum-mi/basegun","datalab-mi/basegun"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/dnum-mi/basegun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnum-mi%2Fbasegun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnum-mi%2Fbasegun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnum-mi%2Fbasegun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnum-mi%2Fbasegun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnum-mi","download_url":"https://codeload.github.com/dnum-mi/basegun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnum-mi%2Fbasegun/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267678448,"owners_count":24126333,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["classification-model","firearms","python","pytorch","vue"],"created_at":"2024-11-18T05:21:07.154Z","updated_at":"2025-07-29T11:32:35.579Z","avatar_url":"https://github.com/dnum-mi.png","language":"Vue","readme":"# Basegun\n\n## Project context\nAccording to the [French gun legislator](https://www.interieur.gouv.fr/ministere/organisation/secretariat-general/service-central-des-armes-et-explosifs), 20 000 firearms are seized each year in France, 15 to 20% of which are misidentified or unidentified.\nThis leads to errors in the legal classification of weapons and has the following consequences:\n* A lack of criminal prosecution, or conversely, unjustified prosecution\n* Over-solicitation of firearms experts\n* Erroneous sales of weapons subject to authorization by civilian gunsmiths\n\n**Project summary**  \nDevelop an app for the law enforcement forces where they just need to take a photo of a firearm to obtain an identification result.\n\n**History of the product:**\n* 2021/09/13: the Direction of Numeric of French Ministy of the Interior hires [a developer and a data scientist](https://eig.etalab.gouv.fr/defis/basegun/) to develop a Minimum Viable Product for 10 months.\n* 2022/03: first prototype in production (basegun.fr)\n* 2022/09: tests with real users from police and gendarmerie\n* 2024/02: solution deployed to all professional mobile phones of gendarmerie forces in France on https://basegun.interieur.gouv.fr\n\n## Technical Stack\n[![Static Badge](https://img.shields.io/badge/Vue%203-4FC08D?style=for-the-badge\u0026logo=vuedotjs\u0026logoColor=white)](https://vuejs.org/)\u0026nbsp;\n[![Static Badge](https://img.shields.io/badge/FastAPI-009485?style=for-the-badge\u0026logo=fastapi\u0026logoColor=white)](https://fastapi.tiangolo.com/)\u0026nbsp;\n[![forthebadge made-with-vue](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\u0026nbsp;\n[![Static Badge](https://img.shields.io/badge/Python-FFDF76?style=for-the-badge\u0026logo=python)](https://www.python.org/)\u0026nbsp;\n[![Static Badge](https://img.shields.io/badge/Vite-646CFF?style=for-the-badge\u0026logo=vite\u0026logoColor=white)](https://vitejs.dev/)\u0026nbsp;\n[![Static Badge](https://img.shields.io/badge/Pinia-ffd859?style=for-the-badge)](https://pinia.vuejs.org/)\u0026nbsp;\n[![forthebadge made-with-vue](https://img.shields.io/badge/UnoCSS-CC6699?style=for-the-badge\u0026logo=unocss)](https://vue-chartjs.org/)\n\n### Linter\n[![Generic badge](https://img.shields.io/badge/RUFF-4C4C4C?style=for-the-badge\u0026logo=ruff)](https://github.com/astral-sh/ruff)\u0026nbsp;\n[![Generic badge](https://img.shields.io/badge/eslint-3A33D1?style=for-the-badge\u0026logo=eslint\u0026logoColor=white)](https://eslint.org/)\u0026nbsp;\n[![Generic badge](https://img.shields.io/badge/prettier-1A2C34?style=for-the-badge\u0026logo=prettier\u0026logoColor=F7BA3E)](https://prettier.io/)\n\n### DSFR (French State Design System)\n\n[![Generic badge](https://img.shields.io/badge/Vue-DSFR-%23180880?style=for-the-badge\u0026logo=vuedotjs\u0026logoColor=white\u0026labelColor=4FC08D)](https://vue-ds.fr/)\n\n### Requirements\nDependancies :\n\n[![Generic badge](https://img.shields.io/badge/PNPM-4C4C4C?style=for-the-badge\u0026logo=pnpm)](https://pnpm.io/)\u0026nbsp;\n\n[![Generic badge](https://img.shields.io/badge/PIP-4C4C4C?style=for-the-badge\u0026logo=pypi)](https://packaging.python.org/en/latest/tutorials/installing-packages/)\u0026nbsp;\n\n[![Generic badge](https://img.shields.io/badge/Make-4C4C4C?style=for-the-badge\u0026logo=ankermake\u0026logoColor=orange)](https://www.gnu.org/software/make/manual/make.html)\u0026nbsp;\n\n[![Generic badge](https://img.shields.io/badge/Docker-4C4C4C?style=for-the-badge\u0026logo=docker)](https://www.docker.com/)\u0026nbsp;\n\n[![Generic badge](https://img.shields.io/badge/Docker-Compose-4C4C4C?style=for-the-badge\u0026logo=docker)](https://docs.docker.com/compose/)\u0026nbsp;\n\nSee also [Debugging](https://github.com/dnum-mi/Basegun/blob/develop/backend/README.md#debugging) section for all the env variables needed for the website to work fully operationally.\n\n## Setup project for development\n\n### Build containers\n\n```bash\n# install in dev mode\nmake build\n```\n\n### Launch containers\n```bash\n# run\nmake up\n\n# stop\nmake down\n```\n\n### Setup frontend and launch using Vite\nUse ``pnpm install`` on ``frontend`` folder\n\nUse ``pnpm run start`` for start the website with Vite\n\n### Lints and fixes files\nUse ``pre-commit run --all-files`` for linting on frontend and backend folders\n\n\n## Debugging\n\n* If the interface of the website does not appear on ``http://localhost:5173``, there is an issue with frontend. In terminal, run `docker logs basegun-frontend`\n\n* If the interface shows up properly but there is a bug at image upload, there is an issue with the backend. Try to find error log:\n    * In terminal, run `docker logs basegun-backend`\n    * If you cannot access terminal or don't see anything, go to `http://localhost:5000/logs` to see latest logs.\n\n* Beside frontend and backend services, we use some containers in dev which simulate some services provided by our cloud provider: s3 storage, mail server... See our [infrastructure repo](https://github.com/dnum-mi/basegun-infra) for more info about app architecture.\n\n## Testing the website like you were a police or gendarme user with Keycloak\n1. Set your User Agent to 'SAID'\n2. Go to ``http://localhost:5173/expert-contact``.\nThis will redirect you to a login page where you have two options :\n* If you want to test the police path, use `police` as username and `password` as password.\n* For the gendarmerie path, use `gendarmerie` as username and `password` as password.\n(see [keyclock conf](https://github.com/dnum-mi/basegun/blob/develop/keycloak/realm-export.json))\n\n## Release an official version of code\n1. Update tag in Makefile\n2. `make tag`\nThis will create a draft release in github (to validate) and some docker image packages with this tag.\n\u003e If you made a tagging error, run `make untag`. This will delete the tag locally and in the remote.\n\n## Licence\nDue to its usage of python library [Ultralytics](https://github.com/ultralytics/ultralytics/blob/main/LICENSE), BaseGun uses copyleft [GNU Affero General Public License v3.0 (AGPL-3.0)](https://www.data.gouv.fr/fr/pages/legal/licences/).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnum-mi%2Fbasegun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnum-mi%2Fbasegun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnum-mi%2Fbasegun/lists"}