@@ -28,15 +28,7 @@ Graphical view of monthly transactions.
28
28
User selects a bank and amount.
29
29
Creates an on-ramp transaction (status: Processing).
30
30
Redirects to bank site; after payment, the bank calls the /hdfcWebhook endpoint (bank-webhook app).
31
- On webhook, the backend updates the user's balance and transaction status to Success.
32
- sample Postman Post Req:
33
- {
34
- "token": "232.23011382469227",
35
- "user_identifier": "2",
36
- "amount": "10000",
37
- "PaymentResponse":"Success"
38
- }
39
- ![ postman webhook call] ( image.png )
31
+
40
32
4 . P2P Transfer
41
33
User enters recipient's number and amount.
42
34
Backend validates recipient, checks balance, and performs atomic transfer (debit sender, credit receiver, create transfer record).
@@ -48,6 +40,15 @@ P2P Transactions: Shows last 5 sent/received transfers, with direction, amount,
48
40
All Transactions: Tabular view of all user transactions.
49
41
6 . Bank Webhook
50
42
Receives POST requests from banks after payment.
43
+ On webhook, the backend updates the user's balance and transaction status to Success.
44
+ sample Postman Post Req:
45
+ {
46
+ "token": "232.23011382469227",
47
+ "user_identifier": "2",
48
+ "amount": "10000",
49
+ "PaymentResponse":"Success"
50
+ }
51
+ ![ postman webhook call] ( image.png )
51
52
Validates payload, updates user balance and transaction status.
52
53
Codebase Structure
53
54
user-app: Next.js frontend (dashboard, auth, API routes).
@@ -71,4 +72,54 @@ Frontend: Next.js, React, Tailwind CSS, Radix UI, custom UI library.
71
72
Backend: Next.js API routes, Express (webhook), Prisma, PostgreSQL.
72
73
Auth: NextAuth.js.
73
74
State: React hooks, Recoil (planned).
74
- Dev Tools: Turborepo, ESLint, Prettier, Docker.
75
+ Dev Tools: Turborepo, ESLint, Prettier, Docker.
76
+
77
+
78
+ AWS SETUP
79
+
80
+ Can Run entire Turborepo in ec2 for simplification, but here dockerizing separately and adding workflows for learing.
81
+ ec2-t3micro
82
+ security group: open ssh,http,https ports
83
+
84
+ connect using keypair: chmod 400 Vpay-keypair.pem
85
+ cp Vpay-keypair.pem ~ /.ssh/
86
+ ssh -i ~ /.ssh/Vpay-keypair.pem ubuntu@"public-ip-address"
87
+
88
+ ngnix:
89
+ server {
90
+ server_name Vpay.starzc.com;
91
+
92
+ location / {
93
+ proxy_pass http://localhost:3005;
94
+ proxy_http_version 1.1;
95
+ proxy_set_header Upgrade $http_upgrade;
96
+ proxy_set_header Connection 'upgrade';
97
+ proxy_set_header Host $host;
98
+ proxy_cache_bypass $http_upgrade;
99
+
100
+
101
+ }
102
+
103
+
104
+ }
105
+
106
+ server {
107
+ server_name Vpaybankwebhook.starzc.com;
108
+
109
+ location / {
110
+ proxy_pass http://localhost:3003;
111
+ proxy_http_version 1.1;
112
+ proxy_set_header Upgrade $http_upgrade;
113
+ proxy_set_header Connection 'upgrade';
114
+ proxy_set_header Host $host;
115
+ proxy_cache_bypass $http_upgrade;
116
+
117
+
118
+ }
119
+
120
+
121
+
122
+ }
123
+ sudo nginx -t
124
+ sudo nginx -s reload
125
+ Install certbot for https :https://certbot.eff.org/instructions?ws=nginx&os=snap
0 commit comments