How sergeyprist/raccoon-test works
This PHP application models user-setting changes that require verification: a frontend request reaches the controller, the settings service creates and dispatches a code, and a later request validates it before applying the change. The README also documents SMS, email, and Telegram delivery and a user-to-many-confirmations database relationship. The excerpts show the service and sender selection logic, but persistence and external delivery are comments or otherwise unspecified; those links are marked unverified rather than presented as implemented integrations.
Main entry points: UserSettingsService.php Settings service · SendVerificationCodeFactory.php Sender factory · SendEmailVerificationCode.php Email sender · SendSMSVerificationCode.php SMS sender
Components 15
Request handling
- User controller
Controller/UserController.php
Verification workflow
- Settings service
Service/UserSettingsService.php - Confirmation service
Service/UserSettingsConfirmationService.php
Code delivery
- Sender factory
Components/SendVerificationCodeFactory.php - Sender interface
Components/Interface/SendVerificationCodeInterface.php - Email sender
Components/SendEmailVerificationCode.php - SMS sender
Components/SendSMSVerificationCode.php - Telegram sender
Components/SendTelegramVerificationCode.php
User state
- User entity
Entity/User.php - Confirmation entity
Entity/UserSettingsConfirmation.php - Application database
Other components
- Frontend
- Email delivery
- SMS delivery
- Telegram delivery
Connections 20
- Frontend → User controller: sends requests
README.md - User controller → Settings service: calls
Controller/UserController.php - Settings service → Sender factory: selects sender
Service/UserSettingsService.php - Settings service → Confirmation service: creates and validates codes
Service/UserSettingsService.php - Settings service → User entity: reads and updates
Service/UserSettingsService.php - Settings service → Email sender: dispatches code
- Settings service → SMS sender: dispatches code
- Settings service → Telegram sender: dispatches code
- Sender factory → Email sender: creates
Components/SendVerificationCodeFactory.php - Sender factory → SMS sender: creates
Components/SendVerificationCodeFactory.php - Sender factory → Telegram sender: creates
Components/SendVerificationCodeFactory.php - Email sender → Sender interface: implements
Components/SendEmailVerificationCode.php - SMS sender → Sender interface: implements
Components/SendSMSVerificationCode.php - Telegram sender → Sender interface: implements
Components/SendTelegramVerificationCode.php - Email sender → Email delivery: sends code
Components/SendEmailVerificationCode.php - SMS sender → SMS delivery: sends code
Components/SendSMSVerificationCode.php - Telegram sender → Telegram delivery: sends code
Components/SendTelegramVerificationCode.php - Confirmation service → Confirmation entity: creates and checks
Service/UserSettingsConfirmationService.php - Confirmation service → Application database: persists and looks up
- Settings service → Application database: saves user changes