{"id":26823913,"url":"https://github.com/romantech/project-server","last_synced_at":"2026-05-04T15:32:13.028Z","repository":{"id":190036772,"uuid":"674106772","full_name":"romantech/project-server","owner":"romantech","description":"Personal Project Server","archived":false,"fork":false,"pushed_at":"2025-03-06T14:19:53.000Z","size":763,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T15:28:19.478Z","etag":null,"topics":["express","ioredis","redis","typescript"],"latest_commit_sha":null,"homepage":"","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/romantech.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":"2023-08-03T06:48:30.000Z","updated_at":"2025-03-06T14:19:49.000Z","dependencies_parsed_at":"2023-08-23T00:54:13.806Z","dependency_job_id":"77793ba2-e56b-4f5b-9730-a225f26b69bb","html_url":"https://github.com/romantech/project-server","commit_stats":null,"previous_names":["romantech/project-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantech%2Fproject-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantech%2Fproject-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantech%2Fproject-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantech%2Fproject-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romantech","download_url":"https://codeload.github.com/romantech/project-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246296578,"owners_count":20754635,"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":["express","ioredis","redis","typescript"],"created_at":"2025-03-30T09:17:08.764Z","updated_at":"2026-05-04T15:32:13.020Z","avatar_url":"https://github.com/romantech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Syntax Analyzer\n\nBelow are the API specifications for the [Syntax Analyzer](https://github.com/romantech/syntax-analyzer) project, offering features such as syntax analysis and random sentence generation.\n\n### Analyze Sentence Syntax\n\nThis endpoint uses specified AI models to analyze the syntax of tokenized sentences, breaking them down into grammatical elements for detailed structural insights.\n\n#### Endpoint\n\n```\nPOST /analyzer\n```\n\n#### Request Body\n\n| Field      | Type            | Options                              | Required | Description                                | Constraints                                  |\n| ---------- | --------------- | ------------------------------------ | -------- | ------------------------------------------ | -------------------------------------------- |\n| `model`    | `string`        | `primary`, `primary-ft`, `fast-ft` | Yes      | Analysis model key (provider model alias) | One of: `primary`, `primary-ft`, `fast-ft` |\n| `sentence` | `Array\u003cstring\u003e` | N/A                                  | Yes      | Tokens for analysis                        | Range: 2~20 tokens                           |\n\n\u003e Example Request\n\n```json\n{\n  \"model\": \"fast-ft\",\n  \"sentence\": [\"My\", \"name\", \"is\", \"John\", \".\"]\n}\n```\n\n#### Quota Consumption\n\n- `model=primary`: 2 analysis credits\n- `model=primary-ft`: 2 analysis credits\n- `model=fast-ft`: 1 analysis credit\n\n#### Response\n\n\u003e Analysis Data Model\n\n```tsx\ntype AnalysisSource = 'user' | 'sample';\ntype ISODateString = string;\ntype ConstituentType = 'clause' | 'phrase' | 'token';\n\ntype TConstituent = {\n  id: number; // Random 9-digit number\n  elementId: number; // Constituent ID\n  label: string; // Grammatical label, e.g., \"subject\"\n  abbreviation: string; // Abbreviation, e.g., \"s\"\n  type: ConstituentType; // Type of constituent\n};\n\ntype TSegment = {\n  id: number; // Random 9-digit number\n  begin: number; // Start index\n  end: number; // End index\n  constituents: TConstituent[]; // Segment constituents\n  children: TSegment[]; // Sub-segments\n};\n\ntype TAnalysis = {\n  id: string; // Random 21-byte string\n  source: AnalysisSource; // Data source\n  createdAt: ISODateString; // ISO 8601 timestamp\n  sentence: string[]; // Tokenized sentence\n  rootSegment: TSegment; // Root segment\n  isAnalyzedByGPT: boolean; // AI-analyzed status\n};\n```\n\n\u003cdetails\u003e\u003csummary\u003e200 OK\u003c/summary\u003e\n\u003cbr /\u003e\n\t\n```json\n{\n  \"id\": \"YW6AX-AOZb2-xYXt05xkn\",\n  \"source\": \"user\",\n  \"createdAt\": \"2023-05-10T23:08:08.000Z\",\n  \"sentence\": [\"My\", \"name\", \"is\", \"John\", \".\"],\n  \"rootSegment\": {\n    \"id\": 840296172,\n    \"begin\": 0,\n    \"end\": 5,\n    \"constituents\": [],\n    \"children\": [\n      {\n        \"id\": 987654321,\n        \"begin\": 0,\n        \"end\": 2,\n        \"constituents\": [\n          {\n            \"id\": 456789123,\n            \"elementId\": 1,\n            \"label\": \"subject\",\n            \"abbreviation\": \"s\",\n            \"type\": \"token\"\n          }\n        ],\n        \"children\": []\n      },\n      {\n        \"id\": 789123456,\n        \"begin\": 2,\n        \"end\": 3,\n        \"constituents\": [\n          {\n            \"id\": 321654987,\n            \"elementId\": 2,\n            \"label\": \"verb\",\n            \"abbreviation\": \"v\",\n            \"type\": \"token\"\n          }\n        ],\n        \"children\": []\n      },\n      {\n        \"id\": 654321789,\n        \"begin\": 3,\n        \"end\": 4,\n        \"constituents\": [\n          {\n            \"id\": 654987321,\n            \"elementId\": 5,\n            \"label\": \"object\",\n            \"abbreviation\": \"o\",\n            \"type\": \"token\"\n          }\n        ],\n        \"children\": []\n      },\n      {\n        \"id\": 321789654,\n        \"begin\": 4,\n        \"end\": 5,\n        \"constituents\": [],\n        \"children\": []\n      }\n    ]\n  },\n  \"isAnalyzedByGPT\": true\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e400 Bad Request\u003c/summary\u003e\n\u003cbr /\u003e\n\t\n```json\n{\n  \"errors\": [\n    {\n      \"type\": \"field\",\n      \"value\": \"value that caused the error\",\n      \"msg\": \"Error description\",\n      \"path\": \"field_name\",\n      \"location\": \"body\"\n    }\n  ]\n}\n```\n\u003c/details\u003e\n\n### Generate random sentences\n\nThis endpoint generates random sentences, optionally constrained by sentence count, character limit, and topics.\n\n#### Endpoint\n\n```\nGET /analyzer/random-sentences\n```\n\n#### Request Parameters\n\n| Field        | Type            | Required | Default | Description                    | Constraints  |\n| ------------ | --------------- | -------- | ------- | ------------------------------ | ------------ |\n| `sent_count` | `number`        | No       | `3`     | Quantity of sentences          | Range: 1~5   |\n| `max_chars`  | `number`        | No       | `80`    | Character limit per sentence   | Range: 10~80 |\n| `topics`     | `Array\u003cstring\u003e` | No       | `[]`    | Topics to include in sentences | Max 3 topics |\n\n#### Response\n\n\u003cdetails\u003e\u003csummary\u003e200 OK\u003c/summary\u003e\n\u003cbr /\u003e\n\t\n```json\n[\n  \"Apples are a popular fruit that come in many different varieties.\",\n  \"Apple trees are typically grown in orchards for commercial production.\",\n  \"Apple cider is a refreshing beverage made from pressed apples.\",\n]\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e400 Bad Request\u003c/summary\u003e\n\u003cbr /\u003e\n\t\n```json\n{\n  \"errors\": [\n    {\n      \"type\": \"field\",\n      \"value\": \"value that caused the error\",\n      \"msg\": \"Error description\",\n      \"path\": \"field_name\",\n      \"location\": \"query\"\n    }\n  ]\n}\n```\n\u003c/details\u003e\n\n### Check remaining counts\n\nThis endpoint provides remaining user quotas for syntax analysis and random sentences, resetting daily to 10 and 20, respectively.\n\n#### Endpoint\n\n```\nGET /analyzer/remaining-counts\n```\n\n#### Response\n\n\u003cdetails\u003e\u003csummary\u003e200 OK\u003c/summary\u003e\n\u003cbr /\u003e\n\t\n```json\n{\n  \"analysis\": 10,\n  \"random_sentence\": 20\n}\n```\n- `analysis` : Remaining count for syntax analysis\n- `random_sentence` : Remaining count for random sentence generation\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e400 Bad Request\u003c/summary\u003e\n\u003cbr /\u003e\n\t\n```json\n{\n  \"status\": \"error\",\n  \"message\": \"Error description\"\n}\n```\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromantech%2Fproject-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromantech%2Fproject-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromantech%2Fproject-server/lists"}