Laravel REST API Hub

Developer Documentation Portal

Interactive API payloads, database table properties, and quick environment setup checklists for developers integrating with the Almodesk Mobile Tracking server ecosystem.


Server Setup Process

Ensure your development node is configured before spinning up the container or starting operations.

1. Install Composer Vendors

Step 1

Run this inside the codebase root directory to install packages:

composer install

2. Create .env Environment Details

Step 2

Duplicate the sample file and generate the unique application encryption key:

cp .env.example .env
php artisan key:generate

3. Setup Schema & Admin Seeders

Step 3

Configure your MySQL connection details inside .env and build the schema:

php artisan migrate --seed
Default Admin credentials generated by seeder:
Username: superadmin • Password: password

4. Spin up Local Port Listening

Step 4

Serve the app on port 8001 to begin handling client calls:

php artisan serve --port=8001

Database Schema Structure

Detailed field listings for the primary entities configured in the MySQL migrations directory.

users

User master slots
Field Type Details / Roles
idbigintPrimary Auto key
namevarcharFull display name
emailvarcharUnique account email
user_namevarcharUnique login handle
rolevarcharsuperadmin / admin / user
user_pointsintPoints remaining to add slots
expiry_daydatetimeDynamic system expiry cutoff

ad_attendance_t

Shift punch logs
Field Type Details / Roles
idbigintPrimary Auto key
user_idbigintRefers to users.id
s_timestampdatetimeClock-In time
s_latitude / s_longitudedoubleClock-In GPS coordinates
s_batteryintIn battery percentage
e_timestampdatetimeClock-Out time

Authentication Module

POST /api/v1/auth/login
Guest / Admin Login

Request Payload:

{
  "email": "superadmin",
  "password": "password",
  "fcm_token": "mock-token",
  "geo_location": {
    "latitude": 13.0086,
    "longitude": 80.2112,
    "geo_address": "Chennai, TN"
  }
}

Response JSON (200 OK):

{
  "message": "SUCCESS",
  "token": "7|pC9i4kU...",
  "auth_user": {
    "id": 1,
    "name": "Super Admin",
    "email": "superadmin@gmail.com",
    "role": "superadmin"
  }
}

User & Slot Module

POST /api/v1/user/family-register
Header: token required

Request Payload:

{
  "first_name": "Sathish",
  "last_name": "Kumar",
  "email": "sathish@domain.com",
  "mobile_number": "9998887770",
  "user_name": "sathish_fam",
  "password": "sub_user_password",
  "user_expiry": "2026-12-31"
}

Attendance Module

POST /api/v1/attendance/start-attendance
Header: token required

Request Payload:

{
  "s_latitude": "13.0086",
  "s_longitude": "80.2112",
  "s_geo_address": "Guindy Metro Station",
  "s_battery": 92
}

Location Tracker Module

POST /api/v1/location/update-location
GPS Tracker Stream (Header: token required)

Request Payload:

{
  "latitude": 13.0086,
  "longitude": 80.2112,
  "geo_address": "SIDCO Industrial Estate, Guindy",
  "battery": 82
}

Dashboard Modules

GET /api/v1/dashboard/user-dashboard-report
Header: token required

Response JSON (201 SUCCESS):

{
  "message": "SUCCESS",
  "user_dashboard_report": {
    "total_user": 3,
    "active_user": 3,
    "present_user": 1,
    "user_points": 45,
    "expiry_day": 148
  }
}

Support Module

GET /api/v1/support/app-contact-support
Header: token required

Response JSON:

{
  "message": "SUCCESS",
  "app_support_details": {
    "id": 99,
    "mobile_number": "+1 (800) 555-0199",
    "email": "support@almodesk-tracker.com",
    "address": "100 Innovation Way, Chennai, TN"
  }
}