{"id":28393826,"url":"https://github.com/aspen-cloud/aspen-sdk","last_synced_at":"2025-06-26T11:30:58.287Z","repository":{"id":43962177,"uuid":"254768524","full_name":"aspen-cloud/aspen-sdk","owner":"aspen-cloud","description":"The developer kit for Aspen ","archived":false,"fork":false,"pushed_at":"2023-01-06T03:08:51.000Z","size":2578,"stargazers_count":1,"open_issues_count":18,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-26T18:14:17.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.aspen.cloud","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/aspen-cloud.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}},"created_at":"2020-04-11T01:15:57.000Z","updated_at":"2020-04-27T04:24:28.000Z","dependencies_parsed_at":"2023-02-05T04:32:26.419Z","dependency_job_id":null,"html_url":"https://github.com/aspen-cloud/aspen-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspen-cloud%2Faspen-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspen-cloud%2Faspen-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspen-cloud%2Faspen-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspen-cloud%2Faspen-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aspen-cloud","download_url":"https://codeload.github.com/aspen-cloud/aspen-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspen-cloud%2Faspen-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257313059,"owners_count":22526015,"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":"2025-05-31T17:09:15.486Z","updated_at":"2025-06-26T11:30:58.282Z","avatar_url":"https://github.com/aspen-cloud.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aspen SDK\n\n**Aspen is currently in private beta** to get a client id please request one [here](https://form.jotform.com/201044739342046)\n\n## Installing\n\n```bash\n$ yarn add @aspen.cloud/aspen-sdk\nor\n$ npm i @aspen.cloud/aspen-sdk\n```\n\n## Getting started\n\n1. Request a client ID [here](https://form.jotform.com/201044739342046)\n2. Initiate the client\n\n```javascript\nimport { createClient } from \"@aspen.cloud/aspen-sdk\";\n\nconst aspen = createClient({\n  clientId: \"your-client-id\",\n});\n```\n\n2. Start login for user\n\n```javascript\naspen.login(); // Redirects user to authentication page and returns with token\n```\n\n2. Save data to the user's database\n\n```javascript\nconst notes = aspen.currentUser().collection(\"notes\");\n\nawait notes.add({\n  text: \"I should buy a giftcards to my favorite restaurants\",\n  type: \"TODO\",\n  isDone: false,\n});\n```\n\nFor all methods you can use on collections [check here](https://github.com/aspen-cloud/aspen-sdk/blob/master/src/Collection.ts)\n\n3. Send a document from the current user to another\n\n```javascript\nconst docForJane = {\n  title: 'Vacation ideas'\n  text: 'How about a stay-cation?'\n  type: 'normal'\n}\nawait aspen.currentUser().sendDocTo(docFormJane, 'jane.doe');\n```\n\n4. Listen to new changes or received docs for user\n\n```javascript\n/**\n * Here we take a message from another user and add it to a comment our note list.\n */\naspen.currentUser().onNewMessage(async (receivedDoc) =\u003e {\n  if (receivedDoc.type === \"comment\") {\n    await aspen.collection(\"notes\").upsert(receivedDoc.noteId, (note) =\u003e {\n      return {\n        ...note,\n        comments: note.comments ? note.comments.append(comment) : [comment],\n      };\n    });\n  }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspen-cloud%2Faspen-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faspen-cloud%2Faspen-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspen-cloud%2Faspen-sdk/lists"}