Skip to content

Commit 659e69f

Browse files
committed
init
0 parents  commit 659e69f

21 files changed

+3248
-0
lines changed

Diff for: .eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

Diff for: .gitignore

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
.env
31+
32+
# vercel
33+
.vercel
34+
35+
# typescript
36+
*.tsbuildinfo
37+
next-env.d.ts

Diff for: README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## btcpayserver-nextjs
2+
3+
## Usage
4+
5+
Use [clovyr.app](https://clovyr.app/)'s free plan (7-day free trial) for [testing BTCPayServer](https://clovyr.app/apps/btcpayserver).
6+
7+
After testing, you can use Lunanode or [Voltage Cloud's hosted BTCPayServer](https://www.youtube.com/playlist?list=PLuMtKGSqizH2sxmKdy52gdbqSVKkyLX-t) Plan for $8/month or buy a VPS from Kyun Host ($16/month) to self-host it yourself using [btcpayserver-docker](https://github.com/btcpayserver/btcpayserver-docker).
8+
9+
Use [Sparrow Wallet](https://bitcoiner.guide/sparrow/) to test Bitcoin Payments using [testnet](https://www.youtube.com/watch?v=7JJkLW4SHKQ).
10+
11+
### .env
12+
13+
```bash
14+
NODE_ENV=development
15+
NEXT_PUBLIC_BASE_URL=http://localhost:3000
16+
17+
# BTCPayServer Testnet Keys
18+
# Go to `Account > Manage Account > API Keys under Account Settings > Generate API Key > Give Permissions btcpay.store.canviewinvoices & btcpay.store.cancreateinvoice`
19+
BTCPAY_API_KEY=xxxx
20+
# Root URL in Web Browser suffixed with `/api/v1`
21+
BTCPAY_URL=<https-base-url-of-hosted-btcpayserver>/api/v1
22+
# Create Store (or select already existing Store) & go to `Settings` to find `Store ID` under `Store Settings > General`
23+
BTCPAY_STORE_ID=xxxx
24+
# Under `Settings > Store Settings > Webhooks` => Payload URL = http://localhost:3000/api/btcpayserver/webhook (replace http://localhost:3000 with ngrok url as localhost (specifically, http) won't work with webhooks) & Events > Send Me Everything
25+
BTCPAY_WEBHOOK_SECRET=xxxx
26+
27+
NEXT_PUBLIC_EBOOK_PRICE=57
28+
29+
NEXT_TELEMETRY_DISABLED=1
30+
```
31+
32+
Run `pnpm dev` in one terminal and `pnpm ngrok:listen` in another terminal. `ngrok` is needed for webhooks as webhooks don't work on http, they need https.
33+
34+
> Make sure to set up [ngrok](https://ngrok.com) with [static domain](https://ngrok.com/blog-post/free-static-domains-ngrok-users).

Diff for: next.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {}
3+
4+
module.exports = nextConfig

Diff for: package.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "btcpayserver-nextjs",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint",
10+
"clean": "rimraf .next",
11+
"ngrok:listen": "ngrok http --domain=early-kind-chimp.ngrok-free.app 3000"
12+
},
13+
"dependencies": {
14+
"@paralleldrive/cuid2": "^2.2.2",
15+
"next": "14.0.4",
16+
"react": "^18",
17+
"react-dom": "^18",
18+
"valibot": "^0.25.0"
19+
},
20+
"devDependencies": {
21+
"@types/node": "^20",
22+
"@types/react": "^18",
23+
"@types/react-dom": "^18",
24+
"autoprefixer": "^10.0.1",
25+
"eslint": "^8",
26+
"eslint-config-next": "14.0.4",
27+
"postcss": "^8",
28+
"rimraf": "^5.0.5",
29+
"tailwindcss": "^3.3.0",
30+
"typescript": "^5"
31+
}
32+
}

0 commit comments

Comments
 (0)