{"id":24168558,"url":"https://github.com/madeofpendletonwool/squarespace-rewards-system","last_synced_at":"2025-09-19T06:29:45.445Z","repository":{"id":209464932,"uuid":"724111314","full_name":"madeofpendletonwool/squarespace-rewards-system","owner":"madeofpendletonwool","description":"A rewards system for squarespace stores that creates points per dollar spent","archived":false,"fork":false,"pushed_at":"2023-12-06T02:46:49.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-11T03:46:23.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/madeofpendletonwool.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":"2023-11-27T12:23:27.000Z","updated_at":"2023-11-27T13:18:23.000Z","dependencies_parsed_at":"2025-06-07T09:39:28.046Z","dependency_job_id":"18e9ce1d-07fa-4f45-a3de-4588e02ca305","html_url":"https://github.com/madeofpendletonwool/squarespace-rewards-system","commit_stats":null,"previous_names":["madeofpendletonwool/squarespace-rewards-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/madeofpendletonwool/squarespace-rewards-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeofpendletonwool%2Fsquarespace-rewards-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeofpendletonwool%2Fsquarespace-rewards-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeofpendletonwool%2Fsquarespace-rewards-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeofpendletonwool%2Fsquarespace-rewards-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madeofpendletonwool","download_url":"https://codeload.github.com/madeofpendletonwool/squarespace-rewards-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeofpendletonwool%2Fsquarespace-rewards-system/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269933165,"owners_count":24499222,"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-08-11T02:00:10.019Z","response_time":75,"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-01-12T22:15:25.296Z","updated_at":"2025-09-19T06:29:40.365Z","avatar_url":"https://github.com/madeofpendletonwool.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# squarespace-rewards-system\n A rewards system for squarespace stores that creates points per dollar spent\n\n\n## Installation\n\nTo use, dump this information into the user-data of linode as you kick off the server\n\nEnsure you replace the environment vars at the top:\nGOOGLE_CREDENTIALS_BASE64: \nSECRET_KEY: \nSQUARESPACE_API: \nGOOGLE_SHEET_NAME: \nDOMAIN_NAME:\n\n```#!/bin/bash\n# Google json key\nexport GOOGLE_CREDENTIALS_BASE64='your_base64_encoded_string_here'\n# Secret key to access the credit count info\nexport SECRET_KEY=''\n# Squarespace key to access order info\nexport SQUARESPACE_API=''\n# Google Sheet Name\nexport GOOGLE_SHEET_NAME=''\n# Domain Name for Squarespace\nexport DOMAIN_NAME=''\n\n# Update and upgrade the server\napt-get update -y \u0026\u0026 apt-get upgrade -y\n\n# Install Docker\n# Add Docker's official GPG key:\napt-get update\napt-get install ca-certificates curl gnupg -y\ninstall -m 0755 -d /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/debian/gpg |  gpg --dearmor -o /etc/apt/keyrings/docker.gpg\nchmod a+r /etc/apt/keyrings/docker.gpg\n\n# Add the repository to Apt sources:\necho \\\n  \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \\\n  $(. /etc/os-release \u0026\u0026 echo \"$VERSION_CODENAME\") stable\" | \\\n  tee /etc/apt/sources.list.d/docker.list \u003e /dev/null\napt-get update\n\n# Install docker\napt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y\n\n# Start Docker and enable it to run on boot\nsystemctl start docker\nsystemctl enable docker\n\n# Pull your Docker image from Docker Hub\n# Replace 'your_docker_image' with your actual Docker image name\ndocker pull madeofpendletonwool/squarespace-sheet-updater:latest\n\n# Run your Docker container\n# Make sure to replace 'your_docker_image' and set any necessary environment variables\ndocker run -d --restart unless-stopped --name squarespace-sheet-updater -p 443:443 -p 80:80 \\\n-e GOOGLE_CREDENTIALS_BASE64=\"$GOOGLE_CREDENTIALS_BASE64\" \\\n-e SECRET_KEY=\"$SECRET_KEY\" \\\n-e SQUARESPACE_API=\"$SQUARESPACE_API\" \\\n-e GOOGLE_SHEET_NAME=\"$GOOGLE_SHEET_NAME\" \\\n-e DOMAIN_NAME=\"$DOMAIN_NAME\" \\\nmadeofpendletonwool/squarespace-sheet-updater:latest\n```\n\nMake requests like this:\n\n```\ncurl -X POST http://linode-ip:80/get-credits -H \"Content-Type: application/json\" -d '{\"name\": \"Test Name\", \"email\": \"test@example.com\", \"secret_key\": \"your-secret-key\"}'\n```\n\n\nBelow is the code for the javascript form to pull credits from the linode server ensure you update the secret_key with the one input into the linode server and the linode server ip.\n\n```html\n\u003cform id=\"creditQueryForm\"\u003e\n    \u003cinput type=\"text\" id=\"name\" placeholder=\"Name\"\u003e\n    \u003cinput type=\"email\" id=\"email\" placeholder=\"Email\"\u003e\n    \u003cbutton type=\"submit\"\u003eCheck Credits\u003c/button\u003e\n\u003c/form\u003e\n\u003cdiv id=\"result\"\u003e\u003c/div\u003e\n\n\u003cscript\u003e\n    document.getElementById('creditQueryForm').addEventListener('submit', function(e) {\n        e.preventDefault();\n\n        const secret_key = 'your-secret-key';\n        const api_endpoint = 'https://your-linode-server:443/get-credits';  // Adjust with your actual API endpoint\n\n        const name = document.getElementById('name').value;\n        const email = document.getElementById('email').value;\n\n        fetch(api_endpoint, {\n            method: 'POST',\n            headers: {\n                'Content-Type': 'application/json',\n            },\n            body: JSON.stringify({\n                name: name,\n                email: email,\n                secret_key: secret_key  // Include the secret key in the request\n            }),\n        })\n        .then(response =\u003e {\n            if (!response.ok) {\n                throw new Error('Network response was not ok ' + response.statusText);\n            }\n            return response.json();\n        })\n        .then(data =\u003e {\n            document.getElementById('result').textContent = 'Credits: ' + data.credits;\n        })\n        .catch(error =\u003e {\n            console.error('Error:', error);\n            document.getElementById('result').textContent = 'Error: ' + error.message;\n        });\n    });\n\u003c/script\u003e\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadeofpendletonwool%2Fsquarespace-rewards-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadeofpendletonwool%2Fsquarespace-rewards-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadeofpendletonwool%2Fsquarespace-rewards-system/lists"}