{"id":16751925,"url":"https://github.com/colthreepv/ntm-connect","last_synced_at":"2025-03-16T05:16:09.678Z","repository":{"id":251496966,"uuid":"837578648","full_name":"colthreepv/ntm-connect","owner":"colthreepv","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-16T09:37:03.000Z","size":1629,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T10:02:30.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/colthreepv.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":"2024-08-03T11:45:56.000Z","updated_at":"2025-01-16T09:37:05.000Z","dependencies_parsed_at":"2024-08-03T13:58:05.486Z","dependency_job_id":"2b8ac37c-fc0d-4382-983c-ca77cfc447db","html_url":"https://github.com/colthreepv/ntm-connect","commit_stats":null,"previous_names":["colthreepv/ntm-clientportal","colthreepv/ntm-connect"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colthreepv%2Fntm-connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colthreepv%2Fntm-connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colthreepv%2Fntm-connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colthreepv%2Fntm-connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colthreepv","download_url":"https://codeload.github.com/colthreepv/ntm-connect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826787,"owners_count":20354222,"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-10-13T02:45:20.775Z","updated_at":"2025-03-16T05:16:09.659Z","avatar_url":"https://github.com/colthreepv.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ntm-connect\n\n## Design\n\nWebsite is on `portal.ntm-connect.online`, project running this is serverful.\nWhen user clicks a salePoint, makes an ajax request to create-session for the specific subdomain, ex: `esi-maiorana-843d.ntm-connect.online/api/session`\nThis will create 2 sessions:\n\n- JSESSIONID from device\n- session from firebase\n\nSo serverful should have only:\n/api/sale-points\n/\\* - website\n\nproxy should have all the other endpoints\n\n### Regarding development\n\nWebsite is on `http://ntm-connect.local:3000`, project running this is web, it will proxy requests to serverful.\nAlso `proxy` project should be running.\n\nWhen a user clicks a salePoint, shows a progress on the table, until it's green or red.\nIf green-light, the user can click again to open the portal in a new tab, redirecting to `http://esi-maiorana-843d.ntm-connect.local:3004/boss`\n\nThis requires the developer to have an etc/hosts file similar to this:\n\n```text\n127.0.0.1 ntm-connect.local\n127.0.0.1 esi-magliana-0265.ntm-connect.local\n127.0.0.1 esi-nettunense-8d37.ntm-connect.local\n127.0.0.1 esi-monterotondo-383d.ntm-connect.local\n127.0.0.1 esi-velletri-ebdd.ntm-connect.local\n127.0.0.1 esi-aprilia-3f7a.ntm-connect.local\n127.0.0.1 esi-romanina-c2dd.ntm-connect.local\n```\n\nOpen: http://ntm-connect.local:3000/\n\n### Locally test proxying\n\nUse something like this\n\n```bash\ncurl -vkL -H \"Cookie: JSESSIONID=node01sdwb4l77sv941pqgn2qrat6s6818.node0;\" https://94.138.189.89/boss/\n```\n\n### Setting up environment variables\n\n1. Create a `.env.sh` file based on the `.env.example.sh` template.\n2. Source the environment variables:\n\n```bash\nsource .env.sh\n```\n\n```bash\npnpm i\npnpm dev\n```\n\nexpected output:\n\n```shell\n$ pnpm dev\n\n\u003e ntm-connect@0.0.0-devonly dev /home/valerio/projects/valerio/ntm-devportal\n\u003e pnpm run -r dev\n\nScope: 5 of 6 workspace projects\npackages/api dev$ tsx watch src/index.ts\n│ No migrations to run\n│ Server is running on port 3003\n└─ Running...\npackages/proxy dev$ tsx watch src/index.ts\n│ No migrations to run\n│ Server is running on port 3004\n└─ Running...\npackages/web dev$ next dev\n│   ▲ Next.js 14.2.5\n│   - Local:        http://localhost:3000\n│   - Environments: .env.local\n│  ✓ Starting...\n│  ✓ Ready in 1720ms\n└─ Running...\n```\n\n## Docker build\n\n```shell\ndocker build -f docker/Dockerfile.proxy -t ntm-connect/proxy:latest .\ndocker build -f docker/Dockerfile.web -t ntm-connect/web:latest .\ndocker build -f docker/Dockerfile.taskrunner -t ntm-connect/taskrunner:latest .\n```\n\n## Seed database\ncd packages/shared\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolthreepv%2Fntm-connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolthreepv%2Fntm-connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolthreepv%2Fntm-connect/lists"}