{"id":50440879,"url":"https://github.com/bilgesucakir/stitch-grapher","last_synced_at":"2026-05-31T19:02:13.000Z","repository":{"id":356760572,"uuid":"1233937704","full_name":"bilgesucakir/stitch-grapher","owner":"bilgesucakir","description":"Java-based crochet pattern engine for topology-aware parsing, stitch connectivity graph modeling, and visualization.","archived":false,"fork":false,"pushed_at":"2026-05-26T14:00:11.000Z","size":448,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-26T15:31:11.643Z","etag":null,"topics":["crochet-pattern","cytoscape","data-structures","domain-modeling","dsl","graph","graph-theory","graph-visualization","java","oop","parser","parsing","spring-boot","threejs","topology"],"latest_commit_sha":null,"homepage":"","language":"Java","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/bilgesucakir.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-09T14:39:40.000Z","updated_at":"2026-05-26T14:06:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bilgesucakir/stitch-grapher","commit_stats":null,"previous_names":["bilgesucakir/stitch-grapher"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bilgesucakir/stitch-grapher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilgesucakir%2Fstitch-grapher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilgesucakir%2Fstitch-grapher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilgesucakir%2Fstitch-grapher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilgesucakir%2Fstitch-grapher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bilgesucakir","download_url":"https://codeload.github.com/bilgesucakir/stitch-grapher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilgesucakir%2Fstitch-grapher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33744447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"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":["crochet-pattern","cytoscape","data-structures","domain-modeling","dsl","graph","graph-theory","graph-visualization","java","oop","parser","parsing","spring-boot","threejs","topology"],"created_at":"2026-05-31T19:02:11.891Z","updated_at":"2026-05-31T19:02:12.994Z","avatar_url":"https://github.com/bilgesucakir.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stitch-grapher\n\nJava-based stitch connectivity graph engine for topology-aware crochet pattern parsing and modeling.\n\n## Overview\n\nStitch-grapher is a Spring Boot application that processes crochet patterns in text format and visualizes them as connectivity graphs. It models crochet stitches as a hierarchical abstraction layer, enabling complex pattern analysis and visualization.\n\n## Features\n\n### Currently Implemented\n- Parse text-based crochet patterns into a structured format\n- Support common pattern syntax\n  - Repeats like `(sc, inc)x6`, numeric prefixes like `3sc`\n- Validate patterns for correctness\n- Support increase (`inc`), decrease (`dec`), chain (`ch`), magic ring (`mr`) operations\n- Model stitch relationships as a graph \n  - How stitches connect to each other\n- Visualize patterns:\n  - 2D layout for flat crochet\n  - 3D circular layout for amigurumi-style patterns\n- Support multiple stitch types SC, HDC, DC, HTR, TR, SLST\n- Handle row direction for flat patterns\n- Expose a REST API to generate graphs from patterns\n\n### To Be Implemented\n- Better visualization of 3d circular patterns and 2d flat patterns\n- Turn, fasten off operations\n\n## A Basic Example\n\n- **Input Pattern**:\n  - `3ch`\n  - `inc sc inc`\n  - `2dec sc`\n  - `FLAT`\n- **Output**: Sample graph visualization showing stitch connections and hierarchy\n\n![img.png](img.png)\n- First row produces 3 stitches. Second row has 2 increase operations using row 1 stitches (1x2 + 1 + 1x2), resulting in 5 stitches. Row 3 has 2 decrease operations using row 2 stitches ((1+1)/2 + (1+1)/2 + 1), resulting in 3 stitches.\n- So if you have an increase operation, you should have 2 child nodes in the next step. \n- If you have a decrease operation, you should have 2 parent nodes in the previous step.\n- If you have a normal stitch, you should have 1 parent node in the previous step and 1 child node in the next step.\n\n## More Complex Example\n\n- **Input Pattern**:\n    - `mr`\n    - `6sc`\n    - `6inc`\n    - `(sc, inc)x6`\n    - `(2sc, inc)x6`\n    - `(3sc, inc)x6`\n    - `30sc`\n    - `30sc`\n    - `30sc`\n    - `(3sc, dec)x6`\n    - `(2sc, dec)x6`\n    - `(sc, dec)x6`\n    - `6dec`\n    - `CIRCULAR`\n- **Output**: Sample graph visualization showing stitch connections and hierarchy\n  - Screenshot from front:\u003cbr\u003e![img_1.png](img_1.png)\n  - Screenshot from the top:\u003cbr\u003e![img_2.png](img_2.png)\n- Row stitches: 6 → 12 → 18 → 24 → 30 → 30 → 30 → 24 → 18 → 12 → 6\n\n## Prerequisites\n\n- Java 17+\n- Maven 3.8+\n- Spring Boot 3.x\n\n## Getting Started\n\n1. Clone the repository\n2. Build the project: `mvn clean install`\n3. Run the application: `mvn spring-boot:run`\n4. Open your browser and navigate to `http://localhost:8080`\n\n## API Usage\n\n### Graph Generation Endpoint\n\n**POST** `/api/graph`\n\nAccepts a JSON payload with crochet pattern rows and returns a graph representation.\n\n**Request Example:**\n```json\n{\n  \"rows\": [\n    \"3ch\"\n  ], \n  \"mode\": \"FLAT\"\n}\n```\n\n**Response Example:**\n```json\n{\n  \"nodes\": [\n    {\n      \"id\": \"5ebe4049-239a-4bba-b337-6648d3646009\",\n      \"label\": \"CH\",\n      \"row\": 0,\n      \"position\": 0,\n      \"direction\": \"LEFT_TO_RIGHT\"\n    },\n    {\n      \"id\": \"604dbe0d-5dae-485f-bb1d-0c715395c801\",\n      \"label\": \"CH\",\n      \"row\": 0,\n      \"position\": 1,\n      \"direction\": \"LEFT_TO_RIGHT\"\n    },\n    {\n      \"id\": \"3d04c832-a2f0-4a2b-8730-b21134b874b0\",\n      \"label\": \"CH\",\n      \"row\": 0,\n      \"position\": 2,\n      \"direction\": \"LEFT_TO_RIGHT\"\n    }\n  ],\n  \"edges\": [\n    {\n      \"source\": \"5ebe4049-239a-4bba-b337-6648d3646009\",\n      \"target\": \"604dbe0d-5dae-485f-bb1d-0c715395c801\"\n    },\n    {\n      \"source\": \"604dbe0d-5dae-485f-bb1d-0c715395c801\",\n      \"target\": \"3d04c832-a2f0-4a2b-8730-b21134b874b0\"\n    }\n  ]\n}\n```\n\n## Technologies\n\n- **Spring Boot** - Web framework\n- **Maven** - Build and dependency management\n- **Java 17+** - Programming language\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilgesucakir%2Fstitch-grapher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilgesucakir%2Fstitch-grapher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilgesucakir%2Fstitch-grapher/lists"}