payNEXT is a digital wallet platform developed for Web Programming Lab II.
The project uses an MVC-based backend and provides API-driven features for common wallet operations, including:
- Wallet balance management
- Transaction history
- Peer-to-peer money requests
- Merchant payments
- User authentication
The application runs as a Docker-based multi-container system.
- 💳 Digital Wallet: Manage wallet balances and transactions.
- 🔒 Automatic HTTPS: Caddy manages HTTPS and Let's Encrypt certificates.
- 🐳 Docker Support: Run the application and its services with Docker Compose.
- Frontend: HTML, CSS, JavaScript
- Web Server: Nginx
- Backend: Node.js, Express.js
- Architecture: MVC
- Database: PostgreSQL 16
- Reverse Proxy: Caddy v2
- SSL/TLS: Let's Encrypt
- Containerization: Docker, Docker Compose
- CI/CD: GitHub Actions
payNEXT uses four main services:
-
Caddy
- Receives incoming web traffic.
- Redirects HTTP traffic to HTTPS.
- Manages Let's Encrypt certificates.
- Routes
/api/*requests to the backend. - Routes frontend requests to Nginx.
-
Web
- Runs Nginx.
- Serves the frontend files.
- Handles client-side routing.
-
API
- Runs the Node.js and Express.js backend.
- Handles authentication and wallet operations.
- Processes transactions and money requests.
- Communicates with PostgreSQL.
-
Database
- Runs PostgreSQL 16.
- Stores users, wallets, transactions, money requests, and other application data.
The request flow looks like this:
User
│
▼
Caddy
│
├── / ──────────► Nginx
│ │
│ ▼
│ Frontend
│
└── /api/* ─────► Node.js
│
▼
PostgreSQL
Install these tools before running the project:
Stop the containers with:
docker compose downTo also remove Docker volumes:
docker compose down -vUse the -v option only when you want to remove the stored local database data.
Request:
{ "email": "user@test.com", "password": "password123", "fullName": "Test User" }Response (201 Created):
{ "success": true, "message": "Registered successfully", "data": { "token": "jwt_string..." } }Request:
{ "email": "user@test.com", "password": "password123" }Response (200 OK):
{ "success": true, "message": "Login successful", "data": { "token": "jwt_string..." } }Requires: Authorization: Bearer <ADMIN_TOKEN>
Response (200 OK):
{
"success": true,
"data": [
{ "id": 1, "email": "admin@test.com", "role": "admin" },
{ "id": 2, "email": "user@test.com", "role": "user" }
]
}If accessed with a standard user token, returns 403 Forbidden.
payNEXT - Powering Your Next Move. Next Generation Digital Wallet.
