A simple, user-friendly service that helps businesses keep track of expiring orders and notify customers before and after expiration dates.
This service automatically sends friendly reminders to customers when their orders are about to expire or have already expired. It helps businesses maintain customer relationships and encourage renewals.
- Smart Reminders: Sends reminders at sensible intervals (1 week, 3 days, and 1 day before expiration)
- After-Expiration Notices: Follows up with customers even after orders expire
- Multi-Language Support: Sends emails in the customer's preferred language (English, Spanish, French, German)
- Customizable Templates: Businesses can customize what the reminder emails say
- Flexible Configuration: Easy to change when reminders are sent
- Docker and Docker Compose
- Basic knowledge of command line
- Clone this repository
- Run
docker-compose -f docker-compose.simple.yml up -d - Access the application at http://localhost:8000
- API endpoints are available at http://localhost:8000/api/
The setup includes:
- PHP-FPM application (running on port 9000)
- Nginx web server (mapped to port 8000)
- MariaDB database (with port 33306 exposed)
The service provides several RESTful API endpoints:
/api/status- Check API status/api/reminder-intervals- Manage reminder interval configurations/api/reminder-configurations- Manage customer-specific reminder settings/api/orders- Manage customer orders/api/reminders- Process and manage individual reminders/api/email-templates- Manage email templates
This service is built on Laravel and uses a straightforward approach:
- Orders: Represent customer purchases with expiration dates
- Reminders: Scheduled notifications about expiring orders
- Configurations: Control when and how reminders are sent
- Templates: Define what reminder emails look like
The Docker setup consists of three containers:
- app: PHP-FPM application container
- webserver: Nginx web server
- mariadb: MariaDB database
You can customize the Docker configuration in docker-compose.simple.yml.
The database schema includes tables for:
- Reminder configurations
- Reminder intervals
- Orders
- Reminders
- Email templates
To run migrations manually:
docker exec reminder-service_app_1 php artisan migrateTo seed the database with default values:
docker exec reminder-service_app_1 php artisan db:seed- Type X orders: Expire 1 year after application date
- Type Y orders: Expire on December 31st of the current year
- When a customer renews early, reminders for the old order stop automatically
# Run all tests
docker exec reminder-service_app_1 php artisan test
# Test just the API endpoints
docker exec reminder-service_app_1 php artisan test --filter=ApiTest
# Test reminder interval configuration
docker exec reminder-service_app_1 php artisan test --filter=ReminderIntervalConfigTestYou can add new reminder intervals (like "2 weeks before") through the API:
curl -X POST http://localhost:8000/api/reminder-intervals \
-H "Content-Type: application/json" \
-d '{
"name": "Two Weeks Before",
"reminder_type": "pre_expiration",
"days": 14,
"is_active": true
}'The system currently supports:
- English (en)
- Spanish (es)
- French (fr)
- German (de)
To add a new language, you'll need to:
- Add language code to
config/app.php - Create email templates for the new language
If you encounter issues:
- Check container status with
docker ps - View logs with
docker logs reminder-service_app_1 - Verify database connection in
.envfile - Ensure the webserver is properly configured to forward requests to PHP-FPM
If you have any questions about how to use this service, please contact support@reminderservice.com