{"id":25583011,"url":"https://github.com/manouslinard/smart-city-app","last_synced_at":"2026-04-04T10:30:14.911Z","repository":{"id":172838388,"uuid":"634679180","full_name":"manouslinard/smart-city-app","owner":"manouslinard","description":"Smart City app - Collects data from cities around the world!","archived":false,"fork":false,"pushed_at":"2024-08-10T17:06:00.000Z","size":12038,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-11T09:03:27.404Z","etag":null,"topics":["api","hackathon","nodered"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/manouslinard.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":"2023-04-30T22:25:42.000Z","updated_at":"2024-08-10T17:06:03.000Z","dependencies_parsed_at":"2023-07-09T10:32:32.208Z","dependency_job_id":null,"html_url":"https://github.com/manouslinard/smart-city-app","commit_stats":null,"previous_names":["manouslinard/smart-city-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manouslinard%2Fsmart-city-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manouslinard%2Fsmart-city-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manouslinard%2Fsmart-city-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manouslinard%2Fsmart-city-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manouslinard","download_url":"https://codeload.github.com/manouslinard/smart-city-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239964515,"owners_count":19725952,"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":["api","hackathon","nodered"],"created_at":"2025-02-21T05:58:47.410Z","updated_at":"2026-04-04T10:30:14.761Z","avatar_url":"https://github.com/manouslinard.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart City App\nThis is a smart city app that saves many cities (and their rankings, weather and other data). Also in the \u003cstrong\u003ehackathon\u003c/strong\u003e folder of this repo (view README in hackathon folder for more info), there are solutions for the \u003cstrong\u003ehackathon 2023 challenges\u003c/strong\u003e.You can view a detailed description of the entire project and the challenges [here](/files/Assignment_Internet-Services.pdf). You can checkout the app for yourself by installing [Node-RED](https://nodered.org/). Before you run the app, you should follow the prerequisites and configuration steps specified in the corresponding sections of this README.\n\n---\n## Prerequisites - Docker Installation:\nBefore you start this app, it is recommended to install a docker image that was developed for the common-functions challenge of \u003cstrong\u003ehackathon 2023\u003c/strong\u003e. Here are the commands to install and run this image:\n```\ndocker pull kazakos13/common-functions\ndocker run -p 8080:8080 -it kazakos13/common-functions\n```\nIf you dont want to install this docker image you should not encounter any problems in the execution of the app, because some local flows were developed, which have the same functions as the docker image (and they are executed if the docker image is not running).\n\u003cbr\u003e\nYou can also read the overview of the details of the docker image [here](https://hub.docker.com/r/kazakos13/common-functions).\n\n---\n## Configuration:\nThe \u003cstrong\u003eonly\u003c/strong\u003e diagram needed for import in order for the project to run is the gui_res.json (you can import it in node-red). Once you do that, please refer to the following configuration steps:\n\n* ### Account Configuration\n\nTo configure your account settings, follow these steps:\n\n1. Open the `GUI_RES` flow and locate the `init GUI` node.\n2. Click on the node to access the configuration options.\n3. In the configuration panel, you will find several required keys and usernames.\n4. Provide your Geonames username by entering it in the `GEONAMES_USERNAME` input field. This is necessary for the app to function properly.\n5. Additionally, you need to enter your API keys for the OpenWeatherMap, Weather API, and Tomorrow API. Insert your keys in the `OPENWEATHER_KEY`, `WEATHERAPI_KEY`, and `TOMORROW_KEY` inputs, respectively.\n   - Note: If you leave these keys empty or as \"yourkey\", the app will not produce errors, but you may experience data loss in the GUI, particularly in the current weather section.\n6. Lastly, if desired, you can configure the `MAP_URL` by changing the domain to which the map URL points.\n\nBy following these configuration steps, you can ensure that the app works correctly and displays accurate information.\n\n* ### RabbitMQ Config:\nFor these dataflow diagrams, this package is installed (from manage pallete):\u003cbr\u003e\n\u003cstrong\u003e@node-red-tools/node-red-contrib-amqp\u003c/strong\u003e\n\u003cbr\u003e\nOnce you created the rabbitmq user and vhost (with correct permissions - if you dont have any user ready, see RabbitMQ Installation section) go to the GUI City Results dataflow in the amqp server node (it is called amq.direct in the dataflow) and click on the edit button of the server (which should be localhost:5672). Then, set the username and password in the Security tab with the ones you put in the commands above. Also in the Connection tab, add the vhost name you specified in the commands above.\n\u003cbr\u003e\nLastly, put the USERNAME and PASSWORD in every http request of \"Create AMQP User\" dataflow (in the username and password). You should also put the username in the \"RABBIT \u0026 MAP CONFIG\" component of the initial Ergasia - GUI diagram.\n\n* ### RabbitMQ Installation:\n\nIf you \u003cstrong\u003edo not\u003c/strong\u003e have RabbitMq Installed, follow these steps:\nFirst, run the following in your terminal:\n\n```\nsudo apt-get install rabbitmq-server\nsudo rabbitmq-plugins enable rabbitmq_management\nsudo rabbitmqctl add_user USERNAME PWD\nsudo rabbitmqctl set_user_tags USERNAME administrator\nsudo ufw allow 15672\n```\nThen, you should create a vhost and give permissions (replace VHOST_NAME with \"testing\" or any other name you want, just keep in mind that you will also need to change it in the dataflow diagram):\n```\nsudo rabbitmqctl add_vhost VHOST_NAME\nsudo rabbitmqctl set_permissions -p VHOST_NAME USERNAME \".\" \".\" \".*\"\n```\nAlso you will need to \u003cstrong\u003ebind\u003c/strong\u003e a queue to the vhost in gui (go to http://localhost:15672 and login with the credentials you put earlier). To do that, go to queues section then click on your virtual host, go to bindings, \"Add binding to this queue\" and put amq.direct in \"From exchange\" label. Then click on bind.\n\u003cbr\u003e\nThen to add this user to the dataflow you can follow the rest of the steps as shown in the RabbitMQ Config Section.\n\n---\n## How to run the app\nThe \u003cstrong\u003eonly\u003c/strong\u003e diagram needed for import in order for the project to run is the gui_res.json (you can import it in node-red). Once you do that and you have done the configuration correctly, press deploy (in node-red) and go to http://127.0.0.1:1880/ui.\n\u003cbr\u003eThere you will find the gui of the app. You should press the \"Reset\" button in order to initialize the dropdown list with the available countries. Once you choose a country, click on next to see its cities and their data.\n\n\n---\n## Other links:\n* [Project Documentation](/files/Assignment_Internet-Services.pdf)\n* [Project Presentation](/files/Smart_City_App_Presentation.pdf)\n* [Hackathon Presentation](/files/PHYSICS_Hackathon_Presentation.pdf)\n* [App Video Showcase](https://youtu.be/Vl41Rlwa7sM)\n* [Weather Code Website](https://www.nodc.noaa.gov/archive/arc0021/0002199/1.1/data/0-data/HTML/WMO-CODE/WMO4677.HTM)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanouslinard%2Fsmart-city-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanouslinard%2Fsmart-city-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanouslinard%2Fsmart-city-app/lists"}