A streamlined expense tracking system that combines WhatsApp messaging with Excel spreadsheets, wrapped in a modern Next.js web interface.
- Daily WhatsApp reminders at 9 PM
- Simple expense logging via WhatsApp messages
- Beautiful web dashboard for expense visualization
- Automatic Excel file generation
- Date range filtering and category breakdowns
- Node.js 18 or later
- npm or yarn
- Twilio account with WhatsApp sandbox enabled
- A public URL for webhook endpoints (e.g., ngrok for local development)
Create a .env.local file in the root directory with the following variables:
TWILIO_ACCOUNT_SID=your_account_sid
TWILIO_AUTH_TOKEN=your_auth_token
TWILIO_WHATSAPP_NUMBER=your_whatsapp_number-
Clone the repository:
git clone <repository-url> cd expense-tracker
-
Install dependencies:
npm install
-
Set up environment variables as described above.
-
Start the development server:
npm run dev
-
Start the reminder script:
npm run reminders
-
WhatsApp Integration:
- Join your Twilio WhatsApp sandbox by sending the code to the provided number
- Send expenses in the format:
Expense: [amount] [category] [note] - Example:
Expense: 25.50 Food & Dining Lunch at cafe
-
Web Dashboard:
- Open
http://localhost:3000in your browser - View your expenses, filter by date range, and see category breakdowns
- Excel files are automatically generated in the
data/expensesdirectory
- Open
npm run dev: Start the development servernpm run build: Build the production applicationnpm run start: Start the production servernpm run reminders: Start the daily reminder scriptnpm run lint: Run ESLintnpm run lint:fix: Fix ESLint issues
src/
├── app/ # Next.js app directory
├── components/ # React components
├── lib/ # Utility functions and shared code
├── scripts/ # Node.js scripts (e.g., reminders)
├── types/ # TypeScript type definitions
└── utils/ # Helper functions
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.