{"id":28256051,"url":"https://github.com/tencentedgeone/paddle-subscription-starter","last_synced_at":"2025-06-16T13:32:29.797Z","repository":{"id":293173644,"uuid":"983188556","full_name":"TencentEdgeOne/paddle-subscription-starter","owner":"TencentEdgeOne","description":"Paddle subscription starter template based on Next.js, Paddle, Supabase and EdgeOne Pages.","archived":false,"fork":false,"pushed_at":"2025-05-14T10:09:49.000Z","size":146,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-25T16:46:49.361Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/TencentEdgeOne.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":"2025-05-14T02:42:08.000Z","updated_at":"2025-05-14T10:09:53.000Z","dependencies_parsed_at":"2025-05-14T04:04:23.830Z","dependency_job_id":"91f19801-da96-4eda-b8c3-ad2b2ba5dcf9","html_url":"https://github.com/TencentEdgeOne/paddle-subscription-starter","commit_stats":null,"previous_names":["tencentedgeone/paddle-subscription-starter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TencentEdgeOne/paddle-subscription-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentEdgeOne%2Fpaddle-subscription-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentEdgeOne%2Fpaddle-subscription-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentEdgeOne%2Fpaddle-subscription-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentEdgeOne%2Fpaddle-subscription-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TencentEdgeOne","download_url":"https://codeload.github.com/TencentEdgeOne/paddle-subscription-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentEdgeOne%2Fpaddle-subscription-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260169003,"owners_count":22969101,"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-19T22:15:25.260Z","updated_at":"2025-06-16T13:32:29.777Z","avatar_url":"https://github.com/TencentEdgeOne.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Paddle Subscription Starter\n\nThis is a demonstration application showcasing login, registration, and subscription features using EdgeOne Pages and Supabase authentication.\n\n## Features\n\n- User authentication (login/register) via Supabase\n- Email verification flow\n- Subscription plans with different pricing tiers\n- Subscription management\n- Protected dashboard for subscribed users\n\n## Technology Stack\n\n- **Frontend**: Next.js (Static Site Generation)\n- **Components**: Custom components with shadcn/ui\n- **Styling**: Tailwind CSS\n- **Backend**: EdgeOne Functions for APIs\n- **Authentication**: Supabase Authentication\n- **Database**: Supabase (PostgreSQL)\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18+ and npm\n- Supabase account and project\n\n### Supabase Setup\n\n1. Create a new Supabase project at [https://supabase.com](https://supabase.com)\n2. In your Supabase dashboard, go to Authentication \u003e Settings and:\n   - Configure Email authentication provider\n   - Enable \"Confirm email\" feature if desired\n3. Get your Supabase URL and API keys from Project Settings \u003e API\n\n### Paddle Setup\n#### Paddle Setup\n\n1. Create a new Paddle account at [https://paddle.com](https://paddle.com)\n2. In your Paddle control panel, find your product and create a new product\n3. Get your Paddle API key\n\n#### Paddle Product Setup\n\n1. In your Paddle control panel, find your product and click \"Edit\"\n2. In the \"Prices\" tab, set your product's price and subscription plan\n3. In the \"Webhook\" tab, set your Webhook URL to `https://yourdomain.com/api/paddle/webhook`\n\n### Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/yourusername/paddle-subscription-demo.git\ncd paddle-subscription-demo\n```\n\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n### Development\n\n#### Environment Variables\n```\n# Add the following environment variables for handling cross-origin issues during local debugging\nNEXT_PUBLIC_DEV=true\nNEXT_PUBLIC_API_URL_DEV=http://localhost:8088/\nFRONT_END_URL_DEV=http://localhost:3000/\n\n# Supabase Configuration\nSUPABASE_URL=https://xxxxxx.supabase.co\nSUPABASE_ANON_KEY=xxxxxxxx\nSUPABASE_SERVICE_ROLE_KEY=xxxxxxxxxx\n\n# Paddle Configuration\nNEXT_PUBLIC_PADDLE_ENVIRONMENT=sandbox\nPADDLE_API_KEY=pdl_sdbx_apikey_xxxxxx\nNEXT_PUBLIC_PADDLE_CLIENT_TOKEN=test_xxxxxxx\nPADDLE_WEBHOOK_SECRET=pdl_ntfset_xxxxxxxxx\n```\n\nAcquisition Methods:\n| Variable | Purpose | Acquisition Method |\n| --- | --- | --- |\n| SUPABASE_URL | Supabase request URL | Obtained from Supabase Dashboard \u003e Project Settings \u003e Data API tab |\n| SUPABASE_ANON_KEY | Public key used for initiating Supabase requests | Obtained from Supabase Dashboard \u003e Project Settings \u003e Data API tab |\n| SUPABASE_SERVICE_ROLE_KEY | Key used for initiating non-public Supabase requests | Obtained from Supabase Dashboard \u003e Project Settings \u003e Data API tab |\n| NEXT_PUBLIC_PADDLE_ENVIRONMENT | Paddle project environment | 'production' or 'sandbox' |\n| PADDLE_API_KEY | API Key for interactions between functions and Paddle | Created under [Paddle \u003e Developer tools \u003e Authentication](https://sandbox-vendors.paddle.com/authentication-v2) |\n| NEXT_PUBLIC_PADDLE_CLIENT_TOKEN | Key used by the client for interactions with Paddle | Created under [Paddle \u003e Developer tools \u003e Authentication](https://sandbox-vendors.paddle.com/authentication-v2) |\n| PADDLE_WEBHOOK_SECRET | Key for identifying the source of Webhook requests, ensuring security | Created under [Paddle \u003e Developer tools \u003e Notifications](https://sandbox-vendors.paddle.com/notifications) |\n\n#### Local Development\n\n1. Start the Next.js development server:\n\n```bash\nnpm run dev\n```\n\n2. In a separate terminal, start the EdgeOne Functions development server:\n\n```bash\nnpm run functions:dev\n```\n\n3. Open [http://localhost:3000](http://localhost:3000) in your browser to see the application.\n\n## Project Structure\n\n- `/src` - Next.js frontend code\n  - `/app` - Next.js app directory\n  - `/components` - React components\n  - `/lib` - Utility functions\n- `/functions` - EdgeOne Functions for backend APIs\n  - `/auth` - Authentication APIs integrated with Supabase\n  - `/subscription` - Subscription APIs (subscribe, status, cancel)\n  - `/lib` - Shared utilities for EdgeOne Functions\n\n## Database Design\n\nIn a production environment, you would extend the Supabase database with:\n\n- `subscriptions` table - Store subscription information\n- `plans` table - Store plan details\n\n## Deployment\n\nThis application is designed to be deployed to EdgeOne Pages. Follow the EdgeOne documentation for deployment instructions.\n\nMake sure to add all environment variables in your EdgeOne Pages dashboard.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencentedgeone%2Fpaddle-subscription-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftencentedgeone%2Fpaddle-subscription-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencentedgeone%2Fpaddle-subscription-starter/lists"}