It allows users to track their personal debts, manage IOUs, and maintain a clear ledger of financial transactions with secure authentication and a modern UI.
The project demonstrates strong fundamentals in Full-Stack Development, NoSQL database design, secure server actions, and responsive layout.
➡️ See Coinly in action: https://coinly0203.vercel.app/
- Secure User Registration & Login (JWT & bcrypt)
- Robust Input Validation using Zod
- Protection against NoSQL Injection vulnerabilities
- Create new IOU transactions (Borrow/Lend)
- Repay debts and track partial settlements
- View detailed ledger balances opening and closing across transactions
- Manage contacts and their associated debts
- View all active debts and IOUs
- Filter and review settled vs pending balances
- Detailed transaction history per contact
- Architecture: Next.js App Router (React Server Components & Server Actions)
- Authentication: Custom JWT Authorization
- Database Design: MongoDB (NoSQL) with Strict Mongoose Schemas
- UI: Responsive, mobile-first design using Tailwind CSS
- Programming Language: TypeScript
- Framework: Next.js
- Frontend: React, Tailwind CSS
- Database: MongoDB (Mongoose)
- Validation: Zod
- Version Control: Git & GitHub
coinly/
├── src/
│ ├── app/ # Next.js App Router (pages, layouts, auth/API logic)
│ ├── actions/ # Next.js Server Actions (ledger calculations, DB queries)
│ ├── components/ # Reusable UI components (IOUContactCard, modals, etc.)
│ ├── models/ # Mongoose database schemas (User, Contact, Entry)
│ └── lib/ # Utility functions and database connection
├── package.json # Project dependencies and scripts
└── tailwind.config.ts # Tailwind CSS configuration
- Handles secure authentication and user profiles.
- Represents individuals with whom the user has financial transactions.
- Tracks contact info and real-time overall balance.
- Represents individual debt creation or repayment transactions.
- One-to-Many
1 User➝Multiple Contacts1 Contact➝Multiple Transactions
- Clone the repository
git clone https://github.com/your-username/coinly.git
cd coinly- Install dependencies
npm install- Set up environment variables
Create a
.env.localfile in the root directory and configure your MongoDB URI and JWT Secret:
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret- Run the development server
npm run dev- Open browser and visit:
http://localhost:3000/- Multi-currency support
- Data export functionality (CSV/PDF)
- Dark mode configuration
- Financial charts and analytics
Current stack runs on free tiers. Recommended upgrade path for stable lifetime use:
| Service | Current | Recommended | Cost |
|---|---|---|---|
| MongoDB Atlas | M0 (Free, 512MB, shared) | M2 (Shared, dedicated RAM) | ~$9/mo |
| Vercel | Hobby (10s timeout, cold starts) | Pro (warmed functions, 60s timeout) | ~$20/mo |
| Upstash Redis | Free tier | Free tier (sufficient for personal use) | Free |
Why Atlas M2? The M0 free cluster uses a shared connection pool and has no dedicated RAM. As your data grows, query performance degrades. M2 gives a dedicated RAM allocation and a much better connection pool — for ~$9/mo it's the single most impactful infrastructure upgrade.
Cold start note: Vercel serverless functions spin down after inactivity. Your first load of the day is slow because of this + a new MongoDB connection being established. Vercel Pro's "always-warm" feature eliminates this.
- Contributions, issues, and feature requests are welcome!
- Feel free to fork this repo and submit pull requests.
- This project is open-source and available under the MIT License