{"id":27334891,"url":"https://github.com/dmuth/ticket-sales","last_synced_at":"2025-10-09T12:05:01.519Z","repository":{"id":8617532,"uuid":"10259523","full_name":"dmuth/ticket-sales","owner":"dmuth","description":"A proof of concept node.js server I put together to handle locking and claiming of seats at an event.","archived":false,"fork":false,"pushed_at":"2020-09-03T22:23:23.000Z","size":26,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-12T14:51:26.757Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmuth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-24T04:57:23.000Z","updated_at":"2020-09-03T22:22:42.000Z","dependencies_parsed_at":"2022-08-24T02:51:07.902Z","dependency_job_id":null,"html_url":"https://github.com/dmuth/ticket-sales","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dmuth/ticket-sales","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fticket-sales","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fticket-sales/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fticket-sales/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fticket-sales/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmuth","download_url":"https://codeload.github.com/dmuth/ticket-sales/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fticket-sales/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001441,"owners_count":26083078,"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-09T02:00:07.460Z","response_time":59,"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-04-12T14:46:34.279Z","updated_at":"2025-10-09T12:05:01.474Z","avatar_url":"https://github.com/dmuth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ticket-sales\n\nA proof of concept node.js server I put together to handle locking and claiming of seats at an event.\n\n## Installation\n\nMake sure you have node.js on your system of at least version 0.6.  If you're on a Mac \nand have Homebrew installed, just type `brew install node`.\n\nNext, clone this project:\n\n    git clone git@github.com:dmuth/ticket-sales.git\n\nInstall the NPM modules:\n\n    npm install\n    \nRun the unit tests (if you like):\n\n    npm test\n    \nPlay around with the test script (if you like):\n\n    ./test.sh\n    \nTo start the server:\n\n    node ./main.js\n    \n## Event data structure\n\nThis is a standard Javascript object:\n\n    {\n    name: \"name of the event\",\n    _comment: \"Comment for programmers inspecting this data structure\",\n    sections: { \n        orchestra: { // A sample section. We can have as many of these as we want.\n            a: { // Row A. This can be an arbitrary string.\n                \"1\": { // Our individual seat\n                    status: \"available\" // By default the status is available.  Can also be \"locked\" and \"sold\"\n                    expires: (integer) // When a locked seat expires. This is a time_t.\n                }\n            }\n        }\n    }\n\n\n## HTTP API Endpoints\n\n- `/` - Hello world!\n- `/seat/check/:section/:row/:seat` - Check if a certain seat is available\n- `/seat/lock/:section/:row/:seat` - Lock a certain seat\n- `/seat/claim/:section/:row/:seat` - Claim a locked seat that has been sold externally\n- `/seat/unlock/:section/:row/:seat` - Unlock a seat\n- `/seat/num_available` - How many seats are available?\n\n\n## Future enchancements\n\n- Find rows of seats that are together\n\n\n## Scaling up\n\nThis will work only on a single server for now.  In the future, I would look into using Dyanmo DB\ninstead of internal data structures for storing event seats.  The round trip time to Dynamo should \nbe on the order of 1-2 milliseconds, which is plenty fast enough for intended use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmuth%2Fticket-sales","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmuth%2Fticket-sales","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmuth%2Fticket-sales/lists"}