{"id":20774175,"url":"https://github.com/pchmn/opower","last_synced_at":"2025-10-12T20:05:49.208Z","repository":{"id":117650786,"uuid":"57907462","full_name":"pchmn/opower","owner":"pchmn","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-17T03:39:19.000Z","size":285,"stargazers_count":0,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T07:44:22.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pchmn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-05-02T17:27:11.000Z","updated_at":"2016-05-02T17:28:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"73ea134d-9299-47c8-944d-087e8d32c2d8","html_url":"https://github.com/pchmn/opower","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchmn%2Fopower","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchmn%2Fopower/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchmn%2Fopower/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchmn%2Fopower/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pchmn","download_url":"https://codeload.github.com/pchmn/opower/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243112191,"owners_count":20238182,"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-11-17T12:28:35.091Z","updated_at":"2025-10-12T20:05:44.155Z","avatar_url":"https://github.com/pchmn.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TP Opower\n\nLe tp sur Opower comprenant la partie `JPA` ainsi que la partie `AngularJS` a été réalisé en utilisant [`jhipster`](https://jhipster.github.io).\n\n## Création des entités\nAfin de créer les entités `Person`, `House`, `Device` et `Heater` nous avons utilisé `JDL Studio` qui va générer un fichier `.jh`. Ensuite il a suffit d'appliquer la commande suivante dans le terminal : \n```sh\nyo jhipster:import-jdl generatedFile.jh\n```\nNotre fichier JDL avec les entités, les relations et le diagramme UML est disponible à cette adresse : [http://jhipster.github.io/jdl-studio/](http://jhipster.github.io/jdl-studio/#view/entity%20Person%20%7B%0A%20%20%20%20name%20String%2C%0A%20%20%20%20email%20String%0A%7D%0A%0Aentity%20House%20%7B%0A%09name%20String%2C%0A%20%20%20%20size%20Integer%2C%0A%20%20%20%20nbRoom%20Integer%0A%7D%0A%0Aentity%20Device%20%7B%0A%09name%20String%2C%0A%20%20%20%20conso%20Integer%0A%7D%0A%0Aentity%20Heater%20%7B%0A%09name%20String%2C%0A%20%20%20%20conso%20Integer%0A%7D%0A%0Arelationship%20ManyToMany%20%7B%0A%09Person%7Bfriend%7D%20to%20Person%7BfriendOf%7D%0A%7D%0A%0Arelationship%20OneToMany%20%7B%0A%20%20%20%20House%7Binhabitant%7D%20to%20Person%7Bhouse%7D%0A%7D%0A%0Arelationship%20OneToMany%20%7B%0A%09House%7Bdevice%7D%20to%20Device%7Bhouse%7D%0A%7D%0A%0Arelationship%20OneToMany%20%7B%0A%09House%7Bheater%7D%20to%20Heater%7Bhouse%7D%0A%7D)\n\n## Configuration de la base de données\nAvant de builder le projet, il est nécessaire de bien configurer la base de données pour le projet.\n\nDans un premier temps il faut créer une base de données MySQL avec un nom au choix (par exemple `opower`).\n\nEnsuite il faut configurer la connexion à cette base dans le fichier `src/main/resources/config/application-dev.yml` en y modifiant ces lignes : \n```yaml\n    datasource:\n        driver-class-name: com.mysql.jdbc.jdbc2.optional.MysqlDataSource\n        url: jdbc:mysql://localhost:3306/opower # nom de la base créée\n        name: opower # nom de la base créée\n        username: root # nom utilisateur mysql\n        password: root # password utilisateur mysql\n```\n\n## Builder le projet\n\nA la racine du projet effectuer ces commandes :\n\nInstallation des dépendances du package.json (outils pour le développement : `Bower`, ...) : \n```sh\nnpm install\n```\nInstallation de l'outil de commande de `Grunt` : \n```sh\nnpm install -g grunt-cli\n```\nInstallation des dépendances du bower.json (librairies CSS/JS : `bootstrap`, `angular`, ...) : \n```sh\nbower install\n```\nLancer le projet. L'application sera ensuite disponible à l'adresse `http://127.0.0.1:8080` : \n```sh\nmvn\n```\nPour lancer le serveur grunt en parallèle du serveur créé par la commande `mvn`, il suffit de lancer la commande `grunt` dans un nouvel onglet du terminal.\n\n\u003cbr\u003e\n###### Clément Goachet - Paul Chemin\n\n\u003cbr\u003e\n# README généré par jhipster\n\nThis application was generated using JHipster, you can find documentation and help at [https://jhipster.github.io](https://jhipster.github.io).\n\nBefore you can build this project, you must install and configure the following dependencies on your machine:\n\n1. [Node.js][]: We use Node to run a development web server and build the project.\n   Depending on your system, you can install Node either from source or as a pre-packaged bundle.\n\nAfter installing Node, you should be able to run the following command to install development tools (like\n[Bower][] and [BrowserSync][]). You will only need to run this command when dependencies change in package.json.\n\n    npm install\n\nWe use [Grunt][] as our build system. Install the grunt command-line tool globally with:\n\n    npm install -g grunt-cli\n\nRun the following commands in two separate terminals to create a blissful development experience where your browser\nauto-refreshes when files change on your hard drive.\n\n    mvn\n    grunt\n\nBower is used to manage CSS and JavaScript dependencies used in this application. You can upgrade dependencies by\nspecifying a newer version in `bower.json`. You can also run `bower update` and `bower install` to manage dependencies.\nAdd the `-h` flag on any command to see how you can use it. For example, `bower update -h`.\n\n# Building for production\n\nTo optimize the opower client for production, run:\n\n    mvn -Pprod clean package\n\nThis will concatenate and minify CSS and JavaScript files. It will also modify `index.html` so it references\nthese new files.\n\nTo ensure everything worked, run:\n\n    java -jar target/*.war --spring.profiles.active=prod\n\nThen navigate to [http://localhost:8080](http://localhost:8080) in your browser.\n\n# Testing\n\nUnit tests are run by [Karma][] and written with [Jasmine][]. They're located in `src/test/javascript` and can be run with:\n\n    grunt test\n\n\n\n# Continuous Integration\n\nTo setup this project in Jenkins, use the following configuration:\n\n* Project name: `opower`\n* Source Code Management\n    * Git Repository: `git@github.com:xxxx/opower.git`\n    * Branches to build: `*/master`\n    * Additional Behaviours: `Wipe out repository \u0026 force clone`\n* Build Triggers\n    * Poll SCM / Schedule: `H/5 * * * *`\n* Build\n    * Invoke Maven / Tasks: `-Pprod clean package`\n* Post-build Actions\n    * Publish JUnit test result report / Test Report XMLs: `build/test-results/*.xml`\n\n[JHipster]: https://jhipster.github.io/\n[Node.js]: https://nodejs.org/\n[Bower]: http://bower.io/\n[Grunt]: http://gruntjs.com/\n[BrowserSync]: http://www.browsersync.io/\n[Karma]: http://karma-runner.github.io/\n[Jasmine]: http://jasmine.github.io/2.0/introduction.html\n[Protractor]: https://angular.github.io/protractor/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchmn%2Fopower","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpchmn%2Fopower","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchmn%2Fopower/lists"}