Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/astrxnomo/tourify/llms.txt

Use this file to discover all available pages before exploring further.

What Is the Admin Panel?

The Tourify admin panel is a server-rendered web interface built with Laravel Blade templates. It is the central control surface for managing all content that appears in the Tourify mobile app — cities, places, events, categories, users, reviews, and push notifications. The panel is accessible at /admin. Navigating to / or /admin always redirects to /admin/login; if you already have an active admin session, the login page then forwards you directly to /admin/dashboard.
The admin panel uses session-based authentication — entirely separate from the mobile app’s API authentication. The mobile app authenticates via Laravel Sanctum tokens through /api/* endpoints. Logging into the admin panel does not issue an API token, and API tokens cannot be used to access the admin panel.

Access Control

All protected admin routes are guarded by two middleware layers applied together:
Route::prefix('admin')->middleware(['web', 'auth', 'is_admin'])
MiddlewareWhat it does
webEnables session state, cookies, and CSRF protection
authRequires an authenticated Laravel session
is_adminChecks that the authenticated user has role_id === 1
The IsAdmin middleware rejects any request where the user is not authenticated or does not hold role_id = 1, redirecting them back to /admin/login:
// app/Http/Middleware/IsAdmin.php
if (!auth()->check() || auth()->user()->role_id !== 1) {
    return redirect()->route('admin.login');
}
Only accounts with role_id = 1 can log in. If you successfully authenticate but your account has a different role_id, the login controller will immediately sign you back out and return an error.

Logging In

1

Navigate to the login page

Open your browser and go to /admin/login.
2

Enter your admin credentials

Provide the email address and password of an account with role_id = 1. Regular user accounts (role_id = 2) cannot access the admin panel.
3

Access the dashboard

On successful authentication, you are redirected to /admin/dashboard. If you are already authenticated when you visit /admin/login, you are forwarded directly to the dashboard.
To log out, use the Logout button in the panel — this invalidates your session and regenerates the CSRF token.

Dashboard

After logging in, the dashboard at /admin/dashboard provides a high-level snapshot of the entire platform.

Platform-wide Statistics

The dashboard displays live counts for each core entity:
StatDescription
CitiesTotal number of cities in the database
CategoriesTotal number of place categories
PlacesTotal number of tourist places
EventsTotal number of events (all dates)
RegistrationsTotal event registrations across all events
UsersTotal registered user accounts
ReviewsTotal reviews submitted by users

Activity Panels

In addition to the headline counters, the dashboard surfaces three live activity feeds:
  • Recent Places — the last 5 places added, each shown with its associated city
  • Upcoming Events — the next 5 events whose date >= now(), ordered by date ascending
  • Recent Reviews — the last 5 reviews submitted, each shown with the reviewer and the reviewed entity

Main Sections

Cities

Create and manage the cities that serve as top-level containers for places and events.

Places

Add tourist attractions, landmarks, and points of interest, linked to a city and category.

Events

Schedule events tied to a city and optional place, complete with date and imagery.

Categories

Define categories (e.g. Museums, Parks, Restaurants) used to classify places.

Users

View all registered accounts, toggle admin roles, and delete accounts.

Reviews

Moderate user-submitted reviews — view all reviews and delete inappropriate ones.

Notifications

Broadcast push notifications to all app users via the Expo Push Service.

Build docs developers (and LLMs) love