Elisabeth, Developer Mage

Expense Calculator ✨

Tech Stack : HTML, CSS, PHP, JavaScript, MySQL

Duration : 2 semaines / 2 semanas / 2 weeks

Gallery - Screenshots

Interface principale du calculateur Page d'inscription Dashboard calculateur

Overview

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.

Visitor Features

  • ✨ Add Expenses : Intuitive interface to quickly record your expenses
  • πŸ“ Edit and Delete : Modify or delete your entries at will
  • πŸ“Š Categorization : Organize your expenses by categories (food, entertainment, transport, etc.)
  • πŸ“Š Real-time tracking: The total updates instantly
  • πŸ’Ύ πŸ’Ύ Data persistence: Your expenses are saved to MySQL database

Backend Architecture

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.

Backend Explanations

πŸ”Œ PHP API

Endpoints are RESTful: POST to add, PUT to modify, DELETE to delete. Each request is validated on the server to prevent SQL injection.

πŸ—„οΈ Database Structure

A main table depenses with columns: id, description, amount, category, date, user_id. SQL queries use prepared statements for security.

⚑ Session Management

Simple authentication system with PHP sessions. Each user only sees their expenses thanks to session verification and user_id in database.

Key Points

  • βœ… Validation: JavaScript for better UX
  • Server-side validation : PHP pour la sΓ©curitΓ©
  • ⚑ AJAX: Asynchronous requests for smooth experience
  • πŸ” Security: Protection against SQL injection with prepared statements

Technical Challenges Addressed

Managing synchronization between frontend and backend was key learning. I discovered the importance of validating data on both sides and gracefully handling network errors.