Skip to content

MyWarranties APIWarranty Management System

Comprehensive backend API for managing product warranties, claims, and customer communication

MyWarranties

Quick Start ​

Install and run the MyWarranties backend in minutes:

bash
# Clone the repository
git clone https://github.com/yourusername/mywarranties-backend.git
cd mywarranties-backend

# Install dependencies
composer install

# Configure environment
cp .env.example .env
# Edit .env with your settings

# Setup database
php bin/console doctrine:database:create
php bin/console doctrine:migrations:migrate

# Start the server
symfony server:start

API Example ​

bash
# Get JWT token
curl -X POST http://localhost:8000/api/login \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","password":"password"}'

# Create a warranty claim
curl -X POST http://localhost:8000/api/claims \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"productId":1,"description":"Product malfunction"}'

Features at a Glance ​

FeatureDescription
ProductsTrack warranties with purchase dates and expiration
ClaimsInteractive warranty claims with messaging
EmailSend and receive emails via Resend webhook
NotificationsPush notifications and email alerts
OCRAI-powered receipt scanning with Claude
Real-timeLive updates via Mercure
RolesCustomer, Supplier, and Admin access levels
Testing40+ tests with pre-commit hooks

Architecture ​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Mobile    │────▢│  REST API    │────▢│  Database   β”‚
β”‚     App     β”‚     β”‚  (Symfony)   β”‚     β”‚   (MySQL)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β”œβ”€β”€β”€β”€β”€β”€β–Ά Resend (Email)
                           β”œβ”€β”€β”€β”€β”€β”€β–Ά Firebase (Push)
                           β”œβ”€β”€β”€β”€β”€β”€β–Ά Mercure (WebSocket)
                           └──────▢ Claude AI (OCR)

Technology Stack ​

  • Framework: Symfony 8.0
  • PHP: 8.3+
  • Database: MySQL 8.0 / PostgreSQL 13+
  • Authentication: JWT (Lexik)
  • Email: Resend API
  • Real-time: Mercure
  • Testing: PHPUnit 12.5
  • Deployment: Docker + Kubernetes

Community ​

License ​

MyWarranties is open-source software licensed under the MIT license.

MyWarranties - Warranty Management System