{"id":30913077,"url":"https://github.com/bytrangle/solar-power-app","last_synced_at":"2025-09-09T22:50:54.529Z","repository":{"id":308516891,"uuid":"1031662496","full_name":"bytrangle/solar-power-app","owner":"bytrangle","description":"A demo app that displays real-time kwh used and kwh generated for each house installed with solar panels. Fork from Redis University.","archived":false,"fork":false,"pushed_at":"2025-08-06T14:37:46.000Z","size":4210,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-02T05:53:06.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/bytrangle.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,"zenodo":null}},"created_at":"2025-08-04T06:32:40.000Z","updated_at":"2025-08-06T14:37:50.000Z","dependencies_parsed_at":"2025-08-06T11:41:40.032Z","dependency_job_id":"b03fe1ef-edf7-476b-8445-70a4a4559994","html_url":"https://github.com/bytrangle/solar-power-app","commit_stats":null,"previous_names":["bytrangle/solar-power-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bytrangle/solar-power-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytrangle%2Fsolar-power-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytrangle%2Fsolar-power-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytrangle%2Fsolar-power-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytrangle%2Fsolar-power-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytrangle","download_url":"https://codeload.github.com/bytrangle/solar-power-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytrangle%2Fsolar-power-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274375500,"owners_count":25273829,"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-09-09T02:00:10.223Z","response_time":80,"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":[],"created_at":"2025-09-09T22:50:52.996Z","updated_at":"2025-09-09T22:50:54.515Z","avatar_url":"https://github.com/bytrangle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RediSolar for Node.js\n\n![Preview of running application - Solar Site Map with markers](preview.png)\n\n# Introduction\n\nThis is the sample application codebase for RU102JS, [Redis for JavaScript Developers](https://university.redis.io/learningpath/jjzus2xg4rjdrt) on [Redis University](https://university.redis.com).\n\nSolutions to the course programming challenges can be found on the `solutions` branch.\n\n# Prerequisites\n\nIn order to start and run this application, you will need:\n\n- [Node.js](https://nodejs.org/en/download/) (We recommend using the current Long Term Stable version and have tested with version 18.4.2).\n- npm (installed with Node.js).\n- Access to a local or remote installation of [Redis Stack](https://redis.io/docs/stack/get-started/install/) - local preferred, we provide a Docker Compose file in this repo, read on for details.\n\nIf you're using Windows, check out the following resources for help with running Redis:\n\n- [Redis Blog - Running Redis on Windows 10](https://redis.com/blog/redis-on-windows-10/)\n- [Microsoft - Windows Subsystem for Linux Installation Guide for Windows 10](https://docs.microsoft.com/en-us/windows/wsl/install-win10)\n\n# Setup\n\nTo get started, clone this repository:\n\n```\n$ git clone https://github.com/redislabs-training/ru102js.git\n$ cd ru102js\n```\n\nNow install the dependencies:\n\n```\n$ npm install\n```\n\nYou'll also need to have a Redis Stack instance running.  Either [install it locally](https://redis.io/docs/stack/get-started/install/), or use the Docker Compose file provided:\n\n- Install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/).\n- Start up the Docker daemon.  \n- Run ```docker-compose up -d``` in the project directory.  This command will give you Redis Stack on localhost port 6379 with no password required.  The container will persist Redis data to the ```redisdata``` folder.\n\nYou should see the following once the command has successfully run:\n\n```\nCreating network \"ru102js_default\" with the default driver\nCreating redis_ru102js ... done\n```\n\nYou'll also see the ```redis_ru102js``` container running if you open up the Docker app.  \n\nIf you want to shut down the Redis Stack container, use:\n\n```\ndocker-compose down\n```\n\n# Configuration\n\nThe application uses a configuration file, `config.json` to specify the port that it listens\non plus some logging parameters and how it connects to a database.\n\nThe supplied `config.json` file is already set up to use Redis on localhost port 6379. Change these values if your Redis instance is on another host or port, or requires a password to connect.\n\n```\n{\n  \"application\": {\n    \"port\": 8081,\n    \"logLevel\": \"debug\",\n    \"dataStore\": \"redis\"\n  },\n  \"dataStores\": {\n    \"redis\": {\n      \"host\": \"localhost\",\n      \"port\": 6379,\n      \"password\": null,\n      \"keyPrefix\": \"ru102js\"\n    }\n  }\n}\n```\n\nThe `keyPrefix` for Redis is used to namespace all the keys that the application generates or\nreferences. So for example a key `sites:999` would be `ru102js:sites:999` when written to Redis.\n\n# Load Sample Data\n\nTo load sample site data and sample metrics, run:\n\n```\nnpm run load src/resources/data/sites.json flushdb\n```\n\n`flushdb` is optional, and will erase ALL data from Redis before inserting the sample data.\n\nThe application uses the key prefix `ru102js` by default, so you should be able to use the\nsame Redis instance for this application and other data if necessary.\n\n# Development Workflow\n\nIn order to speed up development, you can run the application using `nodemon`, so that any\nchanges to source code files cause the server to reload and start using your changes.\n\n```\nnpm run dev\n```\n\nEdit code, application will hot reload on save.\n\nIf you want to run without `nodemon`, use:\n\n```\nnpm start\n```\n\nBut you will then need to stop the server and restart it when you change code.\n\n# Accessing the Front End Web Application\n\nYou should be able to see the front end solar dashboard app at:\n\n```\nhttp://localhost:8081/\n```\n\n# Running Tests\n\nThe project is setup to use [Jest](https://jestjs.io/en/) for testing. To run all tests:\n\n```\nnpm test\n```\n\nTo run a specific suite of tests (e.g. those in `tests/basic.test.js`):\n\n```\nnpm test -t basic\n```\n\nTo run Jest continuously in watch mode, which gives you access to menus allowing you to run\nsubsets of tests and many more options:\n\n```\nnpm testdev\n```\n\n# Optional (But recommended): RedisInsight\n\nRedisInsight is a graphical tool for viewing data in Redis and managing Redis server instances.  You don't need to install it to be successful with this course, but we recommend it as a good way of viewing data stored in Redis.\n\nTo use RedisInsight, you'll need to [download it](https://redis.io/docs/ui/insight/) then point it at your Redis instance.  Check out the [RedisInsight documentation](https://redis.io/docs/ui/insight/) for help.\n\nIf you're using the Docker Compose file provided with this course to run Redis Stack, you can optionally choose to access a web-based version of Redis Stack at `http://localhost:8001` whenever the container is running.\n\n# Linting\n\nThis project uses [ESLint](https://eslint.org/) with a slightly modified version of the\n[Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript).\n\n- The file `.eslintrc` contains a short list of rules that have been disabled for this project.\n- The file `.eslintignore` contains details of paths that the linter will not consider when\n  linting the project.\n\nTo run the linter:\n\n```\nnpm run lint\n```\n\n# Need Help / Join our Community\n\nIf you need help with the course or want to chat to your fellow students and the wider Redis community, please [join us on our Discord server](https://discord.gg/V2jj3qW).\n\n# Subscribe to our YouTube Channel / Follow us on Twitch\n\nWe'd love for you to [check out our YouTube channel](https://youtube.com/redisinc), and subscribe if you want to see more Redis videos!  We also stream regularly on our [Twitch.tv channel](https://www.twitch.tv/redisinc) - follow us to be notified when we're live or checkout our [streaming schedule](https://developer.redis.com/redis-live/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytrangle%2Fsolar-power-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytrangle%2Fsolar-power-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytrangle%2Fsolar-power-app/lists"}