-
-
Notifications
You must be signed in to change notification settings - Fork 306
feat: add dodo as a payment provider #980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
atybdot
wants to merge
35
commits into
AmanVarshney01:main
Choose a base branch
from
atybdot:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
29375ce
feat(auth): introduce environment variable processor
atybdot e15eaad
feat(auth): implement astro dashboard template
atybdot 5b081b7
feat(auth): refine react nextjs dashboard component
atybdot e4093cd
feat(auth): adjust react nextjs dashboard page entry
atybdot 6b254f7
feat(auth): refine react router dashboard template
atybdot a035d4b
feat(auth): introduce solidjs dashboard template
atybdot 6b37f47
refactor(auth): update solidjs auth client logic
atybdot 3d378eb
feat(auth): refine svelte dashboard template
atybdot 51d686a
refactor(auth): update svelte auth client logic
atybdot 5f6d003
feat(auth): refine tanstack router dashboard template
atybdot 9ad347d
feat(auth): add server base logic (part 5)
atybdot ad322e1
feat(auth): add better-auth client for Astro and React Base
atybdot 784ce88
setup(env): add server environment variable template
atybdot 4dcc7cf
test(payments): Add payments-dodo CLI tests
atybdot b72c27c
feat(auth): Enhance Nuxt better-auth template with dashboard and clie…
atybdot eec8787
refactor(auth): Update Tanstack Start React dashboard template
atybdot 6bee74b
add dodo option in CLI
atybdot 041fe8e
refactor(payments): update payments dependency processor
atybdot 430d2f5
enable in web front-end
atybdot 47dd1a3
feat(deps): Add utility for dependency management in template generator
atybdot 04a5537
feat(infra): Add Alchemy run script template sections
atybdot e332be1
chore(templates): Regenerate template metadata
atybdot 30f04d9
chore: include remaining changes in packages/template-generator/src/t…
atybdot aab4e66
chore: include remaining changes in packages/template-generator/templ…
atybdot 0b7975d
chore: include remaining changes in packages/template-generator/templ…
atybdot 73c737d
chore: include remaining changes in packages/template-generator/templ…
atybdot cb429ef
chore: include remaining changes in packages/template-generator/templ…
atybdot 9d650d7
chore: include remaining changes in packages/template-generator/templ…
atybdot f6aeaa4
chore: include remaining changes in packages/template-generator/templ…
atybdot de2af42
chore: include remaining changes in packages/template-generator/templ…
atybdot 07f4ea1
chore: include remaining changes in packages/template-generator/templ…
atybdot 054607c
feat:init mcp setup
atybdot 90263aa
chore:add docs for dodo
atybdot 2af43f2
fix:missing imports
atybdot 8351acb
Merge branch 'main' into main
atybdot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| import { describe, expect, it } from "bun:test"; | ||
| import path from "node:path"; | ||
|
|
||
| import fs from "fs-extra"; | ||
|
|
||
| import { create } from "../src/index"; | ||
|
|
||
| const SMOKE_DIR_PATH = path.join(import.meta.dir, "..", ".smoke"); | ||
|
|
||
| describe("Dodo payments generation", () => { | ||
| it("emits Dodo deps and env vars for a reference stack", async () => { | ||
| const projectPath = path.join(SMOKE_DIR_PATH, "dodo-reference-stack"); | ||
| await fs.remove(projectPath); | ||
|
|
||
| const result = await create(projectPath, { | ||
| frontend: ["next"], | ||
| backend: "hono", | ||
| runtime: "node", | ||
| database: "none", | ||
| orm: "none", | ||
| api: "trpc", | ||
| auth: "better-auth", | ||
| payments: "dodo", | ||
| addons: ["turborepo"], | ||
| examples: ["none"], | ||
| dbSetup: "none", | ||
| webDeploy: "none", | ||
| serverDeploy: "none", | ||
| install: false, | ||
| git: true, | ||
| packageManager: "bun", | ||
| disableAnalytics: true, | ||
| directoryConflict: "overwrite", | ||
| }); | ||
|
|
||
| expect(result.isOk()).toBe(true); | ||
|
|
||
| const authPkgPath = path.join(projectPath, "packages", "auth", "package.json"); | ||
| const webPkgPath = path.join(projectPath, "apps", "web", "package.json"); | ||
| const serverEnvPath = path.join(projectPath, "apps", "server", ".env"); | ||
| const paymentsPath = path.join(projectPath, "packages", "auth", "src", "lib", "payments.ts"); | ||
| const successPath = path.join( | ||
| projectPath, | ||
| "apps", | ||
| "web", | ||
| "src", | ||
| "app", | ||
| "payment", | ||
| "success", | ||
| "page.tsx", | ||
| ); | ||
|
|
||
| const authPkg = await fs.readJson(authPkgPath); | ||
| const webPkg = await fs.readJson(webPkgPath); | ||
| const serverEnv = await fs.readFile(serverEnvPath, "utf8"); | ||
|
|
||
| expect(authPkg.dependencies?.["@dodopayments/better-auth"]).toBeDefined(); | ||
| expect(authPkg.dependencies?.dodopayments).toBeDefined(); | ||
| expect(webPkg.dependencies?.["@dodopayments/better-auth"]).toBeDefined(); | ||
| expect(serverEnv).toContain("DODO_PAYMENTS_API_KEY="); | ||
| expect(serverEnv).toContain("DODO_PAYMENTS_WEBHOOK_SECRET="); | ||
| expect(serverEnv).toContain("DODO_PAYMENTS_ENVIRONMENT="); | ||
| expect(await fs.pathExists(paymentsPath)).toBe(true); | ||
| expect(await fs.pathExists(successPath)).toBe(true); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the placeholder Dodo icon reference or provide a safe fallback.
The inline note indicates the asset is not ready yet, so this entry can render a broken icon in the UI. Please either ship the icon asset now or use a temporary fallback until it exists.