How tonbunheng/tourism-backend-api works
AngkorVerses is a Laravel REST API serving an admin portal and tourist web/mobile clients. Tourists authenticate, discover Cambodian destinations and events, and use reviews, favorites, trip planning, galleries, achievements, and an AI assistant; business owners manage listings, while staff administer content and moderation. The graph emphasizes documented API capabilities and sampled review, business, and achievement behavior. Several feature controllers were not sampled, so their internal calls are not inferred; route and feature links rely on the route index or README.
Main entry points: api.php REST routes · TravelReviewController.php Review workflows · Place.php Places · AdminBusinessController.php Business moderation
Components 28
API entry
- REST routes
routes/api.php - Travel authentication
app/Http/Controllers/Api/Travel/TravelAuthController.php - Admin authentication
app/Http/Controllers/Api/AuthController.php - API responses
app/Traits/ApiResponse.php
Tourism discovery
- Place discovery
app/Http/Controllers/Api/Travel/TravelPlaceController.php - Province browsing
app/Http/Controllers/Api/Travel/TravelProvinceController.php - Events and festivals
app/Http/Controllers/Api/Travel/TravelEventController.php - Places
app/Models/Place.php - Provinces
app/Models/Province.php - Categories
app/Models/Category.php - Events
app/Models/Event.php
Tourist engagement
- Review workflows
app/Http/Controllers/Api/Travel/TravelReviewController.php - Reviews
app/Models/Review.php - Review representation
app/Http/Resources/ReviewResource.php - Favorites
app/Http/Controllers/Api/Travel/TravelFavoriteController.php - Trip planning
app/Http/Controllers/Api/Travel/TravelTripController.php - Media gallery
app/Http/Controllers/Api/Travel/TravelGalleryController.php - Achievements
app/Services/AchievementManager.php - AI assistant
app/Services/AiChatService.php - Review replies
app/Models/ReviewReply.php
Business operations
- Owner management
app/Http/Controllers/Api/Business/BusinessOwnerController.php - Business moderation
app/Http/Controllers/Api/Admin/AdminBusinessController.php - Business profiles
app/Models/Business.php
Administration
- User accounts
app/Models/User.php - Notifications
app/Models/Notification.php - Audit logging
app/Services/AuditLogger.php
Other components
- Tourist clients
- Admin portal
Connections 32
- Tourist clients → REST routes: calls travel API
- Admin portal → REST routes: calls admin API
- REST routes → Travel authentication: routes travel auth
routes/api.php - REST routes → Admin authentication: routes admin auth
routes/api.php - REST routes → Place discovery: routes places
routes/api.php - REST routes → Province browsing: routes provinces
routes/api.php - REST routes → Events and festivals: routes events
routes/api.php - REST routes → Review workflows: routes reviews
routes/api.php - REST routes → Favorites: routes favorites
routes/api.php - REST routes → Trip planning: routes trips
routes/api.php - REST routes → Media gallery: routes gallery
routes/api.php - REST routes → Owner management: routes owner tools
routes/api.php - REST routes → Business moderation: routes admin tools
routes/api.php - Place discovery → Places: queries places
- Province browsing → Provinces: browses provinces
- Events and festivals → Events: browses events
- Review workflows → Reviews: creates and updates
app/Http/Controllers/Api/Travel/TravelReviewController.php - Review workflows → Review representation: returns resource
app/Http/Controllers/Api/Travel/TravelReviewController.php - Review workflows → Places: updates rating
app/Http/Controllers/Api/Travel/TravelReviewController.php - Review workflows → Achievements: checks awards
app/Http/Controllers/Api/Travel/TravelReviewController.php - Review workflows → Notifications: creates notification
app/Http/Controllers/Api/Travel/TravelReviewController.php - Reviews → Review replies: has replies
app/Models/Review.php - Owner management → Business profiles: manages profiles
app/Http/Controllers/Api/Business/BusinessOwnerController.php - Business moderation → Business profiles: moderates profiles
app/Http/Controllers/Api/Admin/AdminBusinessController.php - Business moderation → Audit logging: records changes
app/Http/Controllers/Api/Admin/AdminBusinessController.php - Achievements → Reviews: counts reviews
app/Services/AchievementManager.php - Places → Categories: belongs to
app/Models/Place.php - Places → Provinces: belongs to
app/Models/Place.php - Business profiles → User accounts: belongs to owner
app/Models/Business.php - REST routes → AI assistant: offers AI assistant
- REST routes → Achievements: offers achievements
- REST routes → API responses: uses response format