{"id":22938317,"url":"https://github.com/jaycanuck/holidaygift2024","last_synced_at":"2025-04-01T19:33:05.400Z","repository":{"id":267062639,"uuid":"899776354","full_name":"JayCanuck/holidaygift2024","owner":"JayCanuck","description":"Cute little holiday gift webapp for the 2024 holidays, providing redeemable game code keys for specific users","archived":false,"fork":false,"pushed_at":"2024-12-25T22:50:00.000Z","size":4515,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T12:40:35.584Z","etag":null,"topics":["game-codes","gift","holiday","steam","winter","xmas"],"latest_commit_sha":null,"homepage":"https://holidaygift.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JayCanuck.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}},"created_at":"2024-12-07T01:56:43.000Z","updated_at":"2024-12-25T22:50:03.000Z","dependencies_parsed_at":"2024-12-08T04:17:09.661Z","dependency_job_id":"7f651bea-487a-4fd1-a46d-915b450da1bb","html_url":"https://github.com/JayCanuck/holidaygift2024","commit_stats":null,"previous_names":["jaycanuck/holidaygift2024"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayCanuck%2Fholidaygift2024","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayCanuck%2Fholidaygift2024/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayCanuck%2Fholidaygift2024/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayCanuck%2Fholidaygift2024/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayCanuck","download_url":"https://codeload.github.com/JayCanuck/holidaygift2024/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246700843,"owners_count":20819944,"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":["game-codes","gift","holiday","steam","winter","xmas"],"created_at":"2024-12-14T12:17:26.505Z","updated_at":"2025-04-01T19:33:05.378Z","avatar_url":"https://github.com/JayCanuck.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HolidayGift2024\n\nI like to do cute surprises for friends around the holidays. For 2024, I decided to make a quick-n-dirty customized holiday gift website, which can provide customized message for predefined recipients as well as distribute preconfigured Steam game redeemable codes.\n\nRealistically, this also ended up as a fun testbed example single-page Next.js webapp with a threejs 3D photosphere.\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n# or\nbun dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\n## Environment Variable Setup\n\nThis project is designed to use environment variables for assets and game keycode data.\n\n* `NEXT_PUBLIC_BACKGROUND` - An HDR image used for environment background. Any panorama image can be used for this.\n* `NEXT_PUBLIC_BACKGROUND_LOW` - An basic static image used for page background on low-end devices.\n* `NEXT_PUBLIC_ENVELOPE` - An animated envelope model (I used [this one](https://www.fab.com/listings/3e5bfd19-2c9b-45bc-b2b4-0443e9525c9c)). Any similar model with corresponding animations could be used.\n* `NEXT_PUBLIC_ENVELOPE_LOW` - A basic static image used for the envelope on low-end devices.\n* `NEXT_PUBLIC_LETTER` - A jpg image used to provide texture for the letter.\n\nThere's also backend-specific `MYSTERY` environment variable containing a stringified JSON value containing gift game codes and personalized metadata. This is the expected interface for the object:\n\n```ts\ninterface MysteryObject {\n  [userID: string]: {\n    name?: string; // recipient name\n    message?: string; // customized gift message to override default top message\n    footer?: string; // footer message after game codes, right before signature\n    games: {\n      name: string; // game name, not currently used anywhere\n      code: string; // redeemable game code value\n    }[]; // array of the game details\n  }\n}\n```\n\nFor example:\n\n```json\n{\n  \"00000000-0000-0000-0000-000000000000\":{\n    \"name\":\"Mr. Debug\",\n    \"message\":\"Test debug message.\",\n    \"footer\": \"Have a great holidays!\",\n    \"games\":[\n      {\"name\":\"Game 1\",\"code\":\"00000-00000-00000\"},\n      {\"name\":\"Game 2\",\"code\":\"00000-00000-00000\"},\n      {\"name\":\"Game 3\",\"code\":\"00000-00000-00000\"}\n    ]\n  },\n  \"11111111-1111-1111-1111-111111111111\":{\n    \"games\":[\n      {\"name\":\"Game 1\",\"code\":\"00000-00000-00000\"},\n      {\"name\":\"Game 2\",\"code\":\"00000-00000-00000\"},\n      {\"name\":\"Game 3\",\"code\":\"00000-00000-00000\"}\n    ]\n  }\n}\n```\nThen stringify the JSON and store it as a `MYSTERY` environment variable.\n\nUser gifts can then be accessed via unique special `https://webserver/?id=\u003cuserID\u003e` URLs, while anyone visiting the webserver without the proper ID will just get a basic holiday greeting (no gift).\n\n# License\n\nGLB model [\"falling snow loop\"](https://sketchfab.com/3d-models/falling-snow-loop-a19b97d7e64548b998eaeb4d8477c24c), Copyright 2020 Elin Hohler under [CC Attribution 4.0 license](https://creativecommons.org/licenses/by/4.0/)\u003cbr\u003e \nMusic [\"Holiday Homecoming\" by Steve Oxen](https://www.fesliyanstudios.com/royalty-free-music/download/holiday-homecoming/3191)\u003cbr\u003e \nPaper crackle sound effect by [https://pixabay.com](https://pixabay.com)\n\nHoliday Gift 2024 webapp is Copyright 2024, Jason Robitaille under the [Apache-2.0 license](https://www.apache.org/licenses/LICENSE-2.0.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaycanuck%2Fholidaygift2024","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaycanuck%2Fholidaygift2024","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaycanuck%2Fholidaygift2024/lists"}