A full-stack subscription tracking application with Plaid integration for automatic subscription detection from bank transactions. SubSense provides a stunning, real-time dashboard to monitor all your recurring costs.
- Next.js Frontend: Modern App Router architecture, powered by Tailwind CSS and shadcn/ui.
- Dynamic Animations: Framer Motion-powered scroll expansion heroes for a premium landing experience.
- Real-time Dashboard: Live metrics, recent charges, and interactive charts using Recharts for a clean visual representation of subscription spending.
- Plaid Integration: Securely connect your real-world bank accounts to automatically track and detect subscriptions.
- Express / Node.js Backend: Fast and reliable REST API powered by Express.
- Prisma & PostgreSQL: Strong typed ORM interacting with a robust database setup.
Frontend:
- Next.js (App Router)
- React & TypeScript
- Tailwind CSS
- shadcn/ui (Radix)
- Framer Motion
- Recharts
Backend:
- Node.js & Express
- Prisma ORM
- PostgreSQL
- Plaid Link API
- JWT Authentication
- Node.js (v18 or higher recommended)
- npm or yarn
- PostgreSQL database (e.g., Supabase, Neon)
- Plaid API credentials (for bank integration)
git clone https://github.com/Rohan-08-12/SubSense.git
cd SubSenseYou'll need to install dependencies for both the backend and frontend:
# Install backend dependencies
npm install
# Install frontend dependencies
cd frontend
npm install
cd ..Create a .env file in the root directory with the following variables:
# Database
DATABASE_URL="postgresql://user:password@host:5432/database"
# Server
PORT=3000
# JWT Secret
JWT_SECRET="your-secret-key"
# Plaid API
PLAID_CLIENT_ID="your-plaid-client-id"
PLAID_SECRET="your-plaid-secret"
PLAID_ENV="sandbox"# Generate Prisma client
npm run prisma:generate
# Apply migrations
npm run prisma:migrateFrom the root directory, you can start both the Node.js backend and the Next.js frontend concurrently:
npm run dev:allThis starts:
- Backend:
http://localhost:3000 - Frontend:
http://localhost:3001
Backend
# Development mode
npm run dev
# Production mode
npm startFrontend
# Starting the Next.js dev server
npm run frontendSubSense/
├── frontend/ # Next.js Application
│ ├── src/
│ │ ├── app/ # Next.js App Router pages
│ │ ├── components/ # React components (UI, providers)
│ │ └── lib/ # Utility functions and API helpers
│ ├── tailwind.config.ts
│ └── next.config.ts
├── prisma/ # Database Setup
│ ├── schema.prisma # Database schema
│ └── migrations/ # Prisma migrations
├── src/ # Express Backend
│ ├── config/
│ ├── controllers/
│ ├── middleware/
│ ├── routes/
│ └── services/
└── server.js # Backend entry point
POST /api/auth/register– Register a new userPOST /api/auth/login– Login userGET /api/auth/me– Get current user (protected)
POST /api/plaid/link-tokenPOST /api/plaid/exchange-public-tokenGET /api/plaid/accountsPOST /api/plaid/sync-transactions
GET /api/subscriptionsGET /api/subscriptions/statsPOST /api/subscriptions/detectPUT /api/subscriptions/:idDELETE /api/subscriptions/:id
ISC