{"id":23737751,"url":"https://github.com/tkdnbb/node-monorepo","last_synced_at":"2025-10-05T15:51:03.347Z","repository":{"id":266603725,"uuid":"898815464","full_name":"tkdnbb/node-monorepo","owner":"tkdnbb","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-10T09:26:19.000Z","size":981,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T10:31:03.363Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkdnbb.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}},"created_at":"2024-12-05T04:54:52.000Z","updated_at":"2025-02-10T09:26:23.000Z","dependencies_parsed_at":"2025-02-10T10:35:45.709Z","dependency_job_id":null,"html_url":"https://github.com/tkdnbb/node-monorepo","commit_stats":null,"previous_names":["tkdnbb/node-monorepo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdnbb%2Fnode-monorepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdnbb%2Fnode-monorepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdnbb%2Fnode-monorepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdnbb%2Fnode-monorepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkdnbb","download_url":"https://codeload.github.com/tkdnbb/node-monorepo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239877986,"owners_count":19712164,"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-12-31T08:19:08.347Z","updated_at":"2025-10-05T15:50:58.282Z","avatar_url":"https://github.com/tkdnbb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Monorepo\n\nA Node.js monorepo containing multiple packages, with a focus on graph-based image processing and visualization using the nodegrapher library. The project demonstrates how to build web applications that can transform images into spatial graph data.\n\n## Project Structure\n\n```\nnode-monorepo/\n├── packages/\n│   ├── expressdemo/           # Express.js API server with nodegrapher integration\n│   ├── expressdemo-tsclient/  # TypeScript client for the Express demo\n│   └── flow-client/          # Flow client application\n├── package.json              # Root package.json for workspace management\n└── LICENSE                   # BSD 2-Clause License\n```\n\n## Main Features\n\n- **Image to Graph Transformation**: Convert images into graph structures using nodegrapher\n- **Road Network Extraction**: Generate road-like graph networks from images\n- **REST API**: Express.js backend with endpoints for image processing\n- **TypeScript Support**: Full TypeScript implementation for type safety\n- **Monorepo Structure**: Efficient management of multiple related packages\n\n## Packages\n\n### expressdemo\n\nAn Express.js server that provides REST APIs for image processing using nodegrapher. Key features:\n\n- Image upload and processing\n- Graph data extraction\n- Road network generation\n- Duplicate image detection\n- File management with MD5 hashing\n\n#### API Endpoints:\n\n- `POST /api/process-map`: Process an image to extract full graph data\n- `POST /api/process-road`: Process an image to extract road network data\n- `GET /api/graph-data`: Retrieve stored graph data\n- `GET /api/road-graph-data`: Retrieve stored road graph data\n\n### expressdemo-tsclient\n\nA TypeScript client implementation for interacting with the Express demo server.\n\n### flow-client\n\nA client application implementing functionalities of retrieving graph data from the expressdemo server and visualizing it using the NGraph visualization library.\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js (Latest LTS version recommended)\n- npm (comes with Node.js)\n\n### Installation\n\n1. Clone the repository:\n```bash\ngit clone [repository-url]\ncd node-monorepo\n```\n\n2. Install dependencies for all packages:\n```bash\nnpm install\n```\n\n## Available Scripts\n\nFrom the root directory:\n\n```bash\n# Run the Express demo application\nnpm run expressdemo\n\n# Run the Flow client application\nnpm run flow-client\n```\n\n## Development\n\nThis project uses npm workspaces to manage multiple packages. Each package in the `packages/` directory is treated as a separate npm package but shares dependencies and can be managed from the root directory.\n\n### Working with nodegrapher\n\nThe project extensively uses the nodegrapher library for image processing. Key features include:\n\n- Full graph extraction with `processImageToGraph`\n- Road network generation with `saveRoad`\n- Configurable processing parameters\n- Support for various image formats\n\nExample usage in the Express demo:\n\n```typescript\n// Process full graph data\nconst graphData = await GraphService.processFullGraph(imagePath, maxContain);\n\n// Process road network data\nconst roadGraph = await GraphService.processRoadGraph(imagePath, maxContain);\n```\n\n## Development Container\n\nThis project includes a development container configuration for VS Code, which provides a consistent development environment across different machines. The container is configured with:\n\n- Node.js 22 runtime environment\n- Essential build tools and libraries for canvas support\n- Pre-configured VS Code extensions:\n  - ESLint for code linting\n  - Prettier for code formatting\n\n### Prerequisites\n\nTo use the development container:\n1. Install [Docker](https://www.docker.com/get-started) on your machine\n2. Install the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension in VS Code\n\n### Getting Started with Dev Container\n\n1. Clone the repository\n2. Open the project in VS Code\n3. When prompted, click \"Reopen in Container\" or run the \"Dev Containers: Reopen in Container\" command from the Command Palette\n4. The container will build and install all dependencies automatically\n\nThe development container ensures all developers work with the same environment and dependencies, including system-level libraries required for packages like `canvas`.\n\n## License\n\nThis project is licensed under the BSD 2-Clause License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkdnbb%2Fnode-monorepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkdnbb%2Fnode-monorepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkdnbb%2Fnode-monorepo/lists"}