{"id":28436876,"url":"https://github.com/moleculerjs/project-demo","last_synced_at":"2025-06-27T20:32:22.993Z","repository":{"id":50388746,"uuid":"241954097","full_name":"moleculerjs/project-demo","owner":"moleculerjs","description":"Demo Project. Generated by official \"project\" template","archived":false,"fork":false,"pushed_at":"2025-06-11T20:04:36.000Z","size":34,"stargazers_count":6,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T14:40:05.168Z","etag":null,"topics":["demo","moleculer"],"latest_commit_sha":null,"homepage":"https://project-demo-production.up.railway.app/","language":"JavaScript","has_issues":false,"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/moleculerjs.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,"zenodo":null}},"created_at":"2020-02-20T18:02:04.000Z","updated_at":"2025-06-11T20:04:40.000Z","dependencies_parsed_at":"2023-10-16T02:41:41.792Z","dependency_job_id":"410ec681-2b33-4d54-a5b3-89ed7a378006","html_url":"https://github.com/moleculerjs/project-demo","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"d83426b59db22c31e162ce1d06237785005b4c56"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moleculerjs/project-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleculerjs%2Fproject-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleculerjs%2Fproject-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleculerjs%2Fproject-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleculerjs%2Fproject-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moleculerjs","download_url":"https://codeload.github.com/moleculerjs/project-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleculerjs%2Fproject-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260985166,"owners_count":23092885,"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":["demo","moleculer"],"created_at":"2025-06-05T23:07:50.040Z","updated_at":"2025-06-27T20:32:22.930Z","avatar_url":"https://github.com/moleculerjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Moleculer](https://badgen.net/badge/Powered%20by/Moleculer/0e83cd)](https://moleculer.services)\n\n# project-demo\nThis is a [Moleculer](https://moleculer.services/)-based microservices project. Generated with the [Moleculer CLI](https://moleculer.services/docs/0.15/moleculer-cli.html).\n\n## Template architecture\nMoleculer supports different [deployment modes](https://moleculer.services/docs/0.15/clustering.html). The figures below represent the deployment and production architectures.\nSwitching between the architectures is [automatically](https://moleculer.services/docs/0.15/clustering.html) handled by moleculer. To run in dev mode use `npm run dev`, for production mode run `npm run dc:up`.\n\n### Development architecture view\n\n```mermaid\nflowchart LR\n    classDef svc fill:lightblue\n    classDef brk fill:#fff2cc\n    classDef ext fill:violet\n\n    U(User browser)\n    U --\u003e A\n    \n    subgraph node1 [Monolith Node]\n    style node1 fill:#dae8fc,stroke:#c9d7eb\n    A(\"**API Gateway**\n    -HTTP Server\n    -GraphQL Server\n    -Socket.IO Server\n    \")\n    A --\u003e B\n\n    B((Service Broker))\n\n    G(Greeter Service):::svc\n    B \u003c--\u003e G\n    \n    P(Products Service):::svc\n    DA(Database Adapter)\n    B \u003c--\u003e P\n    P \u003c--\u003e DA\n    DB[(MongoDB server)]:::ext\n    DA \u003c--\u003e DB\n    \n    I(Inventory Service):::svc\n    CH(Channel Adapter)\n    B \u003c--\u003e I\n    I \u003c--\u003e CH\n    CH \u003c--\u003e Redis:::ext\n    \n    O(Orders Service):::svc\n    WF(Workflow Adapter)\n    B \u003c--\u003e O\n    O \u003c--\u003e WF\n    WF \u003c--\u003e Redis:::ext\n    \n    end\n\n    style B fill:orange\n    style A fill:lightgreen\n    style U fill:lightcyan\n    style node1 fill:#dae8fc,stroke:#c9d7eb\n```\n\n### Production architecture view\n\n```mermaid\nflowchart LR\n    classDef svc fill:lightblue\n    classDef brk fill:#fff2cc\n    classDef ext fill:violet\n\n    TX{ NATS Transporter}:::ext\n\n    subgraph node1 [Node 1]\n    style node1 fill:#dae8fc,stroke:#c9d7eb\n    A(\"**API Gateway**\n    -HTTP Server\n    -GraphQL Server\n    -Socket.IO Server\n    \")\n    style A fill:lightgreen\n    B1((Service Broker)):::brk\n    A --\u003e B1\n    end\n    B1 --\u003e TX\n    U(User browser)\n    style U fill:lightcyan\n    U --\u003e A\n\n    subgraph node2 [Node 2]\n    style node2 fill:#dae8fc,stroke:#c9d7eb\n    B2((Service Broker)):::brk\n    G(Greeter Service):::svc\n    B2 \u003c--\u003e G\n    end\n    TX --\u003e B2\n\n    subgraph node3 [Node 3]\n    style node3 fill:#dae8fc,stroke:#c9d7eb\n    B3((Service Broker)):::brk\n    P(Products Service):::svc\n    DA(Database Adapter)\n    B3 \u003c--\u003e P\n    P \u003c--\u003e DA\n    end\n    TX --\u003e B3\n    DB[(MongoDB server)]:::ext\n    DA \u003c--\u003e DB\n\n    subgraph node4 [Node 4]\n    style node4 fill:#dae8fc,stroke:#c9d7eb\n    B4((Service Broker)):::brk\n    I(Inventory Service):::svc\n    CH(Channel Adapter)\n    B4 \u003c--\u003e I\n    I \u003c--\u003e CH\n    end\n    TX --\u003e B4\n    CH \u003c--\u003e Redis:::ext\n\n    subgraph node5 [Node 5]\n    style node5 fill:#dae8fc,stroke:#c9d7eb\n    B5((Service Broker)):::brk\n    O(Orders Service):::svc\n    WF(Workflow Adapter)\n    B5 \u003c--\u003e O\n    O \u003c--\u003e WF\n    end\n    TX --\u003e B5\n    WF \u003c--\u003e Redis:::ext\n```\n\n## Usage\nStart the project with `npm run dev` command. \nAfter starting, open the http://localhost:3000/ URL in your browser. \nOn the welcome page you can test the generated services via API Gateway and check the nodes \u0026 services.\n\nOpen the http://localhost:3000/graphql URL in your browser to access the GraphQL Playground.\n\nIn the terminal, try using [Moleculer REPL](https://moleculer.services/docs/0.15/moleculer-repl.html) by running the following commands:\n- `nodes` - List all connected nodes.\n- `services` - List all the available services.\n- `actions` - List all registered service actions.\n- `info` - List node info (e.g., IP, memory usage).\n- `call greeter.hello` - Call the `greeter.hello` action.\n- `call greeter.welcome --name John` - Call the `greeter.welcome` action with the `name` parameter.\n- `call products.list` - List the products (call the `products.list` action).\n\n\n## Services\n- **api**: API Gateway services\n- **greeter**: Sample service with `hello` and `welcome` actions.\n- **products**: Sample DB service. To use with MongoDB, set `DB_URI` environment variables and install MongoDB adapter with `npm install mongodb`.\n- **inventory**: Sample service with a single [`channel` handler](https://github.com/moleculerjs/moleculer-channels) that uses persistent queues to reliably process the messages.\n- **workflows**: Workflow sample service.\n\n## Mixins\n- **db.mixin**: Database access mixin for services. Based on [moleculer/database](https://github.com/moleculerjs/database)\n\n\n## Useful links\n\n* Moleculer website: https://moleculer.services/\n* Moleculer Documentation: https://moleculer.services/docs/0.15/\n* Moleculer Database service: https://github.com/moleculerjs/database\n* Moleculer API Gateway: https://moleculer.services/docs/0.15/moleculer-web.html\n* Moleculer GraphQL Gateway: https://github.com/moleculerjs/moleculer-apollo-server\n* Moleculer Socket.IO Gateway: https://github.com/moleculerjs/moleculer-io\n* Moleculer Channels: https://github.com/moleculerjs/moleculer-channels\n* Moleculer Workflows: https://github.com/moleculerjs/workflows\n\n## NPM scripts\n\n- `npm run dev`: Start development mode (load all services locally with hot-reload \u0026 REPL)\n- `npm run start`: Start production mode (set `SERVICES` env variable to load certain services)\n- `npm run cli`: Start a CLI and connect to production. Don't forget to set production namespace with `--ns` argument in script\n- `npm run lint`: Run ESLint\n- `npm run ci`: Run continuous test mode with watching\n- `npm test`: Run tests \u0026 generate coverage report\n- `npm run dc:up`: Start the stack with Docker Compose\n- `npm run dc:down`: Stop the stack with Docker Compose\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoleculerjs%2Fproject-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoleculerjs%2Fproject-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoleculerjs%2Fproject-demo/lists"}