{"id":31556866,"url":"https://github.com/json-ms/sandbox-vue3","last_synced_at":"2025-10-04T23:15:03.615Z","repository":{"id":290941533,"uuid":"976058956","full_name":"JSON-ms/sandbox-vue3","owner":"JSON-ms","description":"A Vue3 Sandbox JSON.ms version that comes fully configured to jumpstart your new project..","archived":false,"fork":false,"pushed_at":"2025-05-01T12:41:04.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T05:13:03.845Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JSON-ms.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":"2025-05-01T12:15:22.000Z","updated_at":"2025-05-01T12:41:07.000Z","dependencies_parsed_at":"2025-05-01T13:48:04.850Z","dependency_job_id":"55738dea-3485-4a81-920f-1e5fc8d1d469","html_url":"https://github.com/JSON-ms/sandbox-vue3","commit_stats":null,"previous_names":["json-ms/sandbox-vue3"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JSON-ms/sandbox-vue3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSON-ms%2Fsandbox-vue3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSON-ms%2Fsandbox-vue3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSON-ms%2Fsandbox-vue3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSON-ms%2Fsandbox-vue3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JSON-ms","download_url":"https://codeload.github.com/JSON-ms/sandbox-vue3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSON-ms%2Fsandbox-vue3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278386130,"owners_count":25978113,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2025-10-04T23:15:00.451Z","updated_at":"2025-10-04T23:15:03.609Z","avatar_url":"https://github.com/JSON-ms.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @jsonms/sandbox-vue3\n\n## Installation\n\n1. Clone the repository\n```bash\ngit clone https://github.com/JSON-ms/sandbox-vue3.git\ncd sandbox-vue3\n```\n\n2. Install dependencies\n\nUsing NPM\n```bash\nnpm install\n```\n\nUsing Yarn:\n```bash\nyarn\n```\n\nOpen your browser and navigate to http://localhost:3000 (or the port specified in the terminal) to see your application in action.\n\n## Connecting to JSON.ms\n\n1. Create a JSON.ms account: Go to [JSON.ms](https://json.ms) and create an account if you don't have one.\n\n2. Create a new JSON project: Prepare a new YAML structure and setup your endpoint to match your local JSON.ms handler endpoint (**not the one from this project**). Check the Integration panel on [JSON.ms](https://json.ms) for more information.\n\n3. Synchronize your project with your local `/src/jms` folder.\n\n4. Adjust `/src/plugins/jsonms.ts` to match your needs.\n\n## Setup Environment Variables\n\n1. Copy `.env.example` to `.env.development` and adjust with your settings. \n\n## Running the Project\n\nAfter installing the dependencies, you can run the development server:\n\nUsing NPM:\n```bash\nnpm run dev\n```\n\nUsing Yarn:\n```bash\nyarn dev\n```\n\n## Usage in Templates\n\nHere's a complete example using content, markdown and files. \n\n```ts\nimport { marked } from \"marked\";\nimport { useJsonMs } from \"@/plugins/jsonms\";\n\nconst { data, locale, getFilePath } = useJsonMs();\n```\n\nThe `userJsonMs()` composable returns `data`, `locale` and `getFilePath`. You can use these variables to populate your views and display media content.\n\nHere's a stripped-down example:\n\n```vue\n\u003cheader\u003e\n  \n  \u003c!-- LOGO --\u003e\n  \u003cimg :src=\"getFilePath(data.default.logo)\" /\u003e\n  \n  \u003c!-- TITLE --\u003e\n  \u003ch1\u003e{{ data.default.title[locale] }}\u003c/h1\u003e\n  \n  \u003c!-- BODY (MARKDOWN FORMAT) --\u003e\n  \u003cdiv v-html=\"marked.parse(data.default.body[locale])\" /\u003e\n\u003c/header\u003e\n```\n\nA couple of things are worth noticing here:\n\n1. Files must be loaded with `getFilePath`. Do not concatenate with a server address before since files are not always addresses, but sometimes in base64 format.\n2. Multilingual data always end with the locale. \n3. Data in markdown format must be parsed using a 3rd party library. In this case, we chose `marked` which does the job perfectly.\n\n## Project Structure\n\nThe project structure is as follows:\n\n```\nsandbox-vue3/\n├── public/                    # Static assets\n├── src/                       # Source files\n│   ├── components/            # Vue components\n│   ├── views/                 # Views for routing\n│   ├── router/index.ts        # Vue Router configuration\n│   ├── jms/                   # Synced files from json.ms\n│   ├── plugins/jsonsms.ts     # JSON.ms configurations\n│   ├── App.vue                # Main App component\n│   └── main.js                # Entry point\n├── .gitignore                 # Git ignore file\n├── index.html                 # Main HTML file\n├── package.json               # Project metadata and dependencies\n└── vite.config.js             # Vite configuration\n```\n\n## Contributing\nContributions are welcome! Please feel free to submit a pull request or open an issue.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjson-ms%2Fsandbox-vue3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjson-ms%2Fsandbox-vue3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjson-ms%2Fsandbox-vue3/lists"}