A full-stack expense tracking application built with React (Frontend) and Spring Boot (Backend) that helps users manage and visualize their expenses.
- ✨ Add, view, and delete expenses
- 📊 Visual expense analysis with charts
- 📱 Responsive design for all devices
- 💾 File-based persistent storage
- 🔄 Real-time updates
- 📈 Monthly expense trends
- 🎨 Clean and intuitive UI
- React 18
- TypeScript
- Tailwind CSS
- Chart.js & React-Chartjs-2
- Axios
- Lucide React (Icons)
- Vite (Build tool)
- Spring Boot 3.2.3
- Java 17
- Maven
- Jackson (JSON processing)
- File System Storage
- Node.js (v18 or higher)
- Java JDK 17
- Maven
- Clone the repository
git clone https://github.com/yourusername/expense-tracker.git
cd expense-tracker
- Backend Setup
cd backend
mvn clean install
mvn spring-boot:run
The backend server will start on http://localhost:8080
- Frontend Setup
cd frontend
npm install
npm run dev
The frontend development server will start on http://localhost:5173
src/
├── components/ # React components
│ ├── charts/ # Chart components
│ ├── expense/ # Expense-related components
│ └── form/ # Reusable form components
├── hooks/ # Custom React hooks
├── services/ # API services
├── types/ # TypeScript interfaces
├── utils/ # Utility functions
└── constants/ # Application constants
src/main/java/com/example/expensetracker/
├── controller/ # REST controllers
├── model/ # Data models
├── service/ # Business logic
└── ExpenseTrackerApplication.java
# application.properties
server.port=8081
spring.jackson.date-format=yyyy-MM-dd
spring.jackson.time-zone=UTC
// api.ts
const API_URL = 'http://localhost:8081/api/expenses';
- Small, focused components
- Clear separation of concerns
- Reusable utility functions
- Type safety with TypeScript
- Proper error handling
- Component modularity
- Service Layer Pattern
- DTO Pattern
- Dependency Injection
- Thread-safe operations
- Proper exception handling
- CORS configuration
- Input validation
- CORS protection
- Error handling
- Safe file system operations
- Type checking
GET /api/expenses - Retrieve all expenses
POST /api/expenses - Create a new expense
DELETE /api/expenses/{id} - Delete an expense
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request