The Expense Calculator is a fullstack web application designed to simplify daily budget management. This application allows users to track their expenses in real time, categorize them and get a complete view of their spending habits.
The backend is built in pure PHP, without framework, with a simplified MVC architecture to ensure code maintainability. Data is stored in a MySQL database with proper transaction management.
Endpoints are RESTful: POST to add, PUT to modify, DELETE to delete. Each request is validated on the server to prevent SQL injection.
A main table depenses with columns: id, description, amount, category, date, user_id. SQL queries use prepared statements for security.
Simple authentication system with PHP sessions. Each user only sees their expenses thanks to session verification and user_id in database.
Managing synchronization between frontend and backend was key learning. I discovered the importance of validating data on both sides and gracefully handling network errors.