{"id":13409631,"url":"https://github.com/glpzzz/gateways","last_synced_at":"2026-04-09T12:02:36.967Z","repository":{"id":162582952,"uuid":"388677838","full_name":"glpzzz/gateways","owner":"glpzzz","description":"This sample project is managing gateways - master devices that control multiple peripheral devices.","archived":false,"fork":false,"pushed_at":"2021-07-25T19:48:30.000Z","size":115,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T11:10:43.091Z","etag":null,"topics":["bootstrap5","chai","crud","docker-compose","expressjs","mocha","mongoose","nodejs","rest-api","unit-testing","vue"],"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/glpzzz.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":"2021-07-23T04:33:45.000Z","updated_at":"2023-10-01T19:20:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"65f13ba4-6abd-4a3c-9036-195d5ce51ff3","html_url":"https://github.com/glpzzz/gateways","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/glpzzz%2Fgateways","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glpzzz%2Fgateways/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glpzzz%2Fgateways/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glpzzz%2Fgateways/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glpzzz","download_url":"https://codeload.github.com/glpzzz/gateways/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242756854,"owners_count":20180205,"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":["bootstrap5","chai","crud","docker-compose","expressjs","mocha","mongoose","nodejs","rest-api","unit-testing","vue"],"created_at":"2024-07-30T20:01:02.452Z","updated_at":"2025-12-30T19:57:39.450Z","avatar_url":"https://github.com/glpzzz.png","language":"JavaScript","funding_links":[],"categories":["Academic Examples (Homeworks)"],"sub_categories":[],"readme":"# Gateways\n\n![test workflow](https://github.com/glpzzz/gateways/actions/workflows/test.yml/badge.svg)\n![GitHub top language](https://img.shields.io/github/languages/top/glpzzz/gateways?style=flat)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/glpzzz/gateways?style=flat)\n![Lines of code](https://img.shields.io/tokei/lines/github/glpzzz/gateways?style=flat)\n\n## Description \n\nThis sample project is managing gateways - master devices that control multiple peripheral devices. \n\nYour task is to create a REST service (JSON/HTTP) for storing information about these gateways and their associated devices. This information must be stored in the database. \n\nWhen storing a gateway, any field marked as “to be validated” must be validated and an error returned if it is invalid. Also, no more that 10 peripheral devices are allowed for a gateway.\n\nThe service must also offer an operation for displaying information about all stored gateways (and their devices) and an operation for displaying details for a single gateway. Finally, it must be possible to add and remove a device from a gateway.\n\nEach gateway has:\n- a unique serial number (string), \n- human-readable name (string),\n- IPv4 address (to be validated),\n- multiple associated peripheral devices. \n\nEach peripheral device has:\n- a UID (number),\n- vendor (string),\n- date created,\n- status - online/offline.\n\n## Stack\n\n- Frontend: Vue.js + Bootstrap 5\n- Backend: NodeJS + Express + MongoDB REST API \n\n## How to?\n\n1. Clone this repo: `git clone https://github.com/glpzzz/gateways`\n2. Move to the cloned directory: `cd gateways`\n\n### Production environment\n\n1. Rename the file `.env.template` to `.env` and adjust the variables values properly\n2. Run `docker-compose up`\n3. The app should be ready on http://localhost\n\n### Development environment\n\n1. Rename the file `.env.template` to `.env` and adjust the variables values properly\n2. Execute `npm install` to get all dependencies including dev ones\n3. Run `docker-compose -f docker-compose.dev.yml up` which mounts a volume so you can make changes and the container \nstays in sync.\n4. The app should be ready on http://localhost\n\n### Testing environment\n1. Rename the file `.env.template` to `.env-test` and adjust the variables values properly\n2. Run `docker-compose -f docker-compose.test.yml run node npm run test`\n\n#### Github action\nA Github actions is configured to be executed on every push so tests must be passed for the push (or PR) to be \neffective.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglpzzz%2Fgateways","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglpzzz%2Fgateways","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglpzzz%2Fgateways/lists"}