A full-stack digital wallet application that enables users to securely register, authenticate, manage wallet balances, transfer funds, and track transaction history.
Built to explore fintech system fundamentals, secure authentication, transaction processing, database transactions, REST API design, and cloud deployment using modern technologies.
- User Registration
- User Login
- JWT Authentication
- Protected API Routes
- Password Hashing using bcrypt
- Wallet Creation
- Wallet Balance Tracking
- Wallet Top-Up
- Peer-to-Peer Transfers
- Transaction History
- Atomic Database Transactions
- Transfer Validation
- Frontend deployed on Vercel
- Backend deployed on Render
- PostgreSQL hosted on Neon
Displays wallet balance, account information, and current wallet status.
Users can top up their wallet balance and transfer funds to other registered users.
Tracks wallet activity including transfers and top-ups with transaction status information.
| Category | Technology |
|---|---|
| Frontend | Next.js, React, TypeScript, Tailwind CSS |
| Backend | Go, Gin |
| Database | PostgreSQL, GORM |
| Authentication | JWT, bcrypt |
| Hosting | Vercel, Render, Neon |
The application follows a monolithic architecture consisting of a Next.js frontend, a Go backend built with Gin, and a PostgreSQL database hosted on Neon.
Flow
- Users interact with the Next.js frontend.
- The frontend communicates with the backend using REST APIs.
- JWT middleware protects secured endpoints.
- Business logic is handled by Go services and route handlers.
- Data is stored in PostgreSQL through GORM.
- Services are deployed on Vercel, Render, and Neon.
- User submits registration details.
- Password is hashed using bcrypt.
- User information is stored in PostgreSQL.
- A wallet is automatically created.
- User submits credentials.
- Credentials are validated.
- JWT token is generated.
- Token is returned to the client.
- Protected endpoints require the token.
Before executing a transfer, the system verifies:
- User authentication
- Recipient existence
- Valid transfer amount
- Sufficient sender balance
Transfers are executed inside a database transaction to ensure consistency.
The system:
- Debits the sender wallet.
- Credits the receiver wallet.
- Creates a transaction record.
- Commits all changes together.
This prevents partial updates and maintains financial consistency.
Stores account information and authentication credentials.
Maintains wallet balances linked to individual users.
Stores transfer and wallet activity records.
- One User owns one Wallet.
- One Wallet can participate in many Transactions.
- Transactions track both sender and receiver wallets.
| Component | Provider |
|---|---|
| Frontend | Vercel |
| Backend | Render |
| Database | Neon PostgreSQL |
.
├── cmd/
│ └── server/
│ └── main.go
│
├── config/
│ └── config.go
│
├── internal/
│ ├── constants/
│ │ └── transaction.go
│ │
│ ├── database/
│ │ └── db.go
│ │
│ ├── handlers/
│ │ ├── auth.go
│ │ ├── health.go
│ │ ├── transaction.go
│ │ ├── user.go
│ │ └── wallet.go
│ │
│ ├── middleware/
│ │ └── jwt.go
│ │
│ ├── models/
│ │
│ ├── routes/
│ │ └── routes.go
│ │
│ └── utils/
│
├── go.mod
├── go.sum
└── README.md
| Method | Endpoint |
|---|---|
| POST | /register |
| POST | /login |
| Method | Endpoint |
|---|---|
| GET | /me |
| Method | Endpoint |
|---|---|
| GET | /wallet |
| POST | /wallet/topup |
| POST | /wallet/transfer |
| Method | Endpoint |
|---|---|
| GET | /transactions |
| Method | Endpoint |
|---|---|
| GET | /health |
- Go 1.24+
- PostgreSQL
- Node.js
- npm
git clone <repository-url>
cd mini-walletgo mod tidyCreate a .env file:
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
DB_NAME=
JWT_SECRET=go run cmd/server/main.goServer starts on:
http://localhost:8080
During development, several real-world engineering challenges were addressed:
- Designing secure JWT authentication workflows
- Implementing password hashing with bcrypt
- Managing wallet balances safely
- Executing atomic money transfers using database transactions
- Structuring a scalable Go backend
- Connecting cloud-hosted PostgreSQL databases
- Deploying services across Render, Neon, and Vercel
- Managing environment variables across environments
- Refresh Tokens
- Email Verification
- Rate Limiting
- Two-Factor Authentication
- Pagination
- Transaction Export (CSV/PDF)
- Audit Logs
- Admin Dashboard
- Real-Time Notifications
- Multi-Currency Support
Farhan
B.Tech Computer Science Engineering
Built as a portfolio project to explore backend engineering, fintech systems, secure authentication, database transactions, and cloud-native deployment.







