{"id":19308000,"url":"https://github.com/srijanmukherjee/paywall-demo","last_synced_at":"2026-04-15T14:33:50.887Z","repository":{"id":209928083,"uuid":"724762535","full_name":"srijanmukherjee/paywall-demo","owner":"srijanmukherjee","description":"Demonstration of a credit system","archived":false,"fork":false,"pushed_at":"2023-11-30T14:20:32.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-07T05:47:21.424Z","etag":null,"topics":["backend","credit-system","expressjs","paywall","stripe"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/srijanmukherjee.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":"2023-11-28T18:39:24.000Z","updated_at":"2023-11-29T20:53:13.000Z","dependencies_parsed_at":"2025-01-06T01:33:02.715Z","dependency_job_id":null,"html_url":"https://github.com/srijanmukherjee/paywall-demo","commit_stats":null,"previous_names":["srijanmukherjee/paywall-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/srijanmukherjee/paywall-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srijanmukherjee%2Fpaywall-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srijanmukherjee%2Fpaywall-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srijanmukherjee%2Fpaywall-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srijanmukherjee%2Fpaywall-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srijanmukherjee","download_url":"https://codeload.github.com/srijanmukherjee/paywall-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srijanmukherjee%2Fpaywall-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31845849,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T13:28:40.153Z","status":"ssl_error","status_checked_at":"2026-04-15T13:28:29.396Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["backend","credit-system","expressjs","paywall","stripe"],"created_at":"2024-11-10T00:13:17.632Z","updated_at":"2026-04-15T14:33:50.854Z","avatar_url":"https://github.com/srijanmukherjee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demonstration of a paywall using expressjs\n\n## Running instruction\n\n### Development Mode\n\n```sh\n# install dependencies\nyarn\n\n# Run the server\nyarn dev\n\n# Start stripe local listener\nstripe listen --forward-to localhost:8000/webhook\n```\n\n## Environment variables\n\n```shell\n# Server settings\nNODE_ENV=development\nSERVER_PORT=8000\nHOST=http://127.0.0.1:8000\n\nRESEND_API_KEY=\nMONGO_CONNECTION_URI=\"mongodb://root:toor@localhost:27017/paywall_demo?authSource=admin\"\n\n# Run the command `openssl rand -base64 60`\nJWT_TOKEN_SECRET=\nJWT_EXPIRE=1h\n\n# Stripe API settings\nSTRIPE_SECRET_KEY=\n# generated by stripe listen --forward-to localhost:8000/webhook (in test environment)\nSTRIPE_WEBHOOK_SECRET=whsec_...\n```\n\n## Endpoints\n\n| method | endpoint                     | description                                                                                                            |\n| ------ | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n| GET    | `/`                          | test endpoint                                                                                                          |\n| POST   | `/signup`                    | user registration                                                                                                      |\n| POST   | `/login`                     | login user                                                                                                             |\n| GET    | `/account`                   | get logged in user details                                                                                             |\n| GET    | `/verify-account/:token`     | Email verification                                                                                                     |\n| PUT    | `/account/password`          | Reset password for authenticated user                                                                                  |\n| GET    | `/account/credits`           | Get available credits                                                                                                  |\n| GET    | `/packages`                  | Get available credit packages that can be bought                                                                       |\n| POST   | `/packages`                  | Create a new credit package                                                                                            |\n| POST   | `/packages/buy`              | Buy a credit package                                                                                                   |\n| GET    | `/packages/transactions`     | Get all credit purchase transactions                                                                                   |\n| GET    | `/packages/transactions/:id` | Get more information about a particular credit purchase transaction (TODO)                                             |\n| GET    | `/resources`                 | Fetch all resources                                                                                                    |\n| POST   | `/resources`                 | Create new resource                                                                                                    |\n| GET    | `/resources/:id`             | Fetch a particular resource. If it's a paid resource, resource data will be shown only if user has bought the resource |\n| POST   | `/resources/:id/buy`         | Buy a resource                                                                                                         |\n| GET    | `/transactions`              | Fetch all resource transactions for a user                                                                             |\n| POST   | `/webhook`                   | Stripe webhook endpoint                                                                                                |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrijanmukherjee%2Fpaywall-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrijanmukherjee%2Fpaywall-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrijanmukherjee%2Fpaywall-demo/lists"}