{"id":29112483,"url":"https://github.com/7togkid/gaman","last_synced_at":"2025-06-29T11:02:08.366Z","repository":{"id":297470396,"uuid":"996896972","full_name":"7TogkID/gaman","owner":"7TogkID","description":"GamanJS is a modern backend framework built for resilience, scalability, and simplicity.","archived":false,"fork":false,"pushed_at":"2025-06-21T10:58:13.000Z","size":1658,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T12:17:34.443Z","etag":null,"topics":["backend","framework","javascript","js","ts","typescript","web"],"latest_commit_sha":null,"homepage":"https://gaman.github.io/","language":"TypeScript","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/7TogkID.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}},"created_at":"2025-06-05T16:20:57.000Z","updated_at":"2025-06-21T10:58:17.000Z","dependencies_parsed_at":"2025-06-05T16:55:52.998Z","dependency_job_id":"40c22016-f06a-4e21-857b-c2479a748660","html_url":"https://github.com/7TogkID/gaman","commit_stats":null,"previous_names":["7togkid/mydjs","7togkid/gaman"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/7TogkID/gaman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7TogkID%2Fgaman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7TogkID%2Fgaman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7TogkID%2Fgaman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7TogkID%2Fgaman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/7TogkID","download_url":"https://codeload.github.com/7TogkID/gaman/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7TogkID%2Fgaman/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262581282,"owners_count":23331908,"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":["backend","framework","javascript","js","ts","typescript","web"],"created_at":"2025-06-29T11:00:53.643Z","updated_at":"2025-06-29T11:02:08.352Z","avatar_url":"https://github.com/7TogkID.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"right\"\u003e\n  \u003cimg src=\".github/images/indonesia.png\" height=\"23px\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/7TogkID/gaman\"\u003e\n    \u003cimg src=\".github/images/gaman.png\" width=\"25%\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eGamanJS\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eGamanJS is a modern backend framework built for resilience, scalability, and simplicity.\u003c/strong\u003e\n\u003c/p\u003e\n\n---\n\n## 🧠 Philosophy\n\n\"Gaman\" (我慢) — patience, perseverance, and resilience. These principles are at the heart of GamanJS, empowering developers to build robust and modular web applications effortlessly.\n\n## ✨ Packages\n\n| Package                                        | Release Notes |\n| ---------------------------------------------- | ------------- |\n| [gaman](https://github.com/7TogkID/gaman)      | v0.0.21       |\n| [create-gaman](packages/create-gaman)          | v0.0.1        |\n| [@gaman/ejs](packages/gaman-ejs)               | v0.0.11       |\n| [@gaman/static](packages/gaman-static)         | v0.0.3        |\n| [@gaman/cors](packages/gaman-cors)             | v0.0.1        |\n| [@gaman/basic-auth](packages/gaman-basic-auth) | v0.0.1        |\n| [@gaman/cli](packages/gaman-cli)               | v0.0.3        |\n\n## 🚀 Get Started\n\nFor complete documentation, examples, and best practices, visit the **GamanWiki**:  \n[https://github.com/7TogkID/gaman/wiki](https://github.com/7TogkID/gaman/wiki)\n\n### Install the CLI\n\nYou can install the GamanJS CLI globally using your preferred package manager:\n\n```bash\nnpm i -g @gaman/cli\n```\n\n### Create a New Project\n\nTo create a new GamanJS project, use the `gaman new` command:\n\n```bash\ngaman new\n```\n\nThis will scaffold a new GamanJS project with the necessary structure.\n\n### Run Your Project\n\nStart your server with:\n\n```bash\n# Using Node\nnpm run dev\n```\n\n## 🛠 Updating the CLI\n\nTo update your GamanJS CLI to the latest version:\n\n```bash\ngaman upgrade\n```\n\n## 📂 Project Structure\n\nAfter creating a new project, your file structure will look like this:\n\n```css\nsrc/\n├── main.ts\n├── main.block.ts\n```\n\n## ✏️ Example Code\n\nHere’s a quick example to get you started: \u003cbr\u003e\n`src/main.ts`\n\n```ts\nimport mainBlock from \"main.block\";\nimport gaman from \"gaman\";\n\ngaman.serv({\n  blocks: [mainBlock], // your blocks\n  server: {\n    port: 3431, // optional\n    host: \"0.0.0.0\", // optional\n  },\n});\n```\n\n`src/main.block.ts`\n\n```ts\nimport { defineBlock, Response } from \"gaman\";\n\nexport default defineBlock({\n  path: \"/\",\n  all: (ctx) =\u003e {\n    console.log(\"middleware ALL\");\n  },\n  routes: {\n    \"/\": (ctx) =\u003e {\n      return Response.json({ message: \"❤️ Welcome to GamanJS\" });\n    },\n    \"/article/*\": (ctx) =\u003e {\n      ctx.locals.userName = \"Angga7Togk\"; // set data locals\n    },\n    \"/article\": {\n      POST: [\n        async (ctx) =\u003e {\n          const json = await ctx.json();\n          return Response.json(json /**return JSON */, { status: 200 });\n        },\n      ],\n      \"/json\": {\n        GET: (ctx) =\u003e {\n          const userName = ctx.locals.userName;\n\n          // return like Response.json()\n          return {\n            user_name_from_local: userName,\n          };\n        },\n      },\n      \"/text\": {\n        GET: (ctx) =\u003e {\n          const userName = ctx.locals.userName;\n\n          // return like Response.text()\n          return userName;\n        },\n      },\n    },\n  },\n});\n```\n\nHappy coding! ❤️ GamanJS Team\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7togkid%2Fgaman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F7togkid%2Fgaman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7togkid%2Fgaman/lists"}