diff --git a/apps/api/src/app.module.ts b/apps/api/src/app.module.ts index 137ea91..465e3c7 100644 --- a/apps/api/src/app.module.ts +++ b/apps/api/src/app.module.ts @@ -26,7 +26,7 @@ import { UsageInterceptor } from './usage/usage.interceptor'; type: 'postgres', url: config.get('DATABASE_URL'), autoLoadEntities: true, - synchronize: true, // Only for prototype! Use migrations for production. + synchronize: false, // Production-ready: disabled to prevent data loss. Use migrations for schema changes. }), }), ThrottlerModule.forRoot([{ diff --git a/apps/api/src/usage/usage.interceptor.ts b/apps/api/src/usage/usage.interceptor.ts index 6812e02..8e7ab8f 100644 --- a/apps/api/src/usage/usage.interceptor.ts +++ b/apps/api/src/usage/usage.interceptor.ts @@ -13,7 +13,7 @@ import { TenantPlan } from '../auth/entities/tenant.entity'; // Quota Limits per Plan const QUOTA_LIMITS: Record = { - [TenantPlan.FREE]: 5000, + [TenantPlan.FREE]: 8000, [TenantPlan.STARTER]: 25000, [TenantPlan.PRO]: 100000, [TenantPlan.ENTERPRISE]: 500000, diff --git a/apps/dashboard/dashboard.html b/apps/dashboard/dashboard.html index a3d8fd2..81bf9f8 100644 --- a/apps/dashboard/dashboard.html +++ b/apps/dashboard/dashboard.html @@ -627,6 +627,9 @@ Routing API + + SDKs & Client Libraries + diff --git a/apps/dashboard/js/docs.js b/apps/dashboard/js/docs.js index 95268c0..f567948 100644 --- a/apps/dashboard/js/docs.js +++ b/apps/dashboard/js/docs.js @@ -1,7 +1,7 @@ /** * Documentation Engine for Intaleq Dashboard * Comprehensive API Reference (EN/AR) - * Updated with Premium Visuals & High-Performance Examples + * Updated with Premium Visuals, High-Performance Examples, and Official SDKs */ const docs = { @@ -46,6 +46,14 @@ const docs = {

${isAr ? 'مرحباً بك في مستقبل الخرائط في المنطقة. توفر لك منصة "انطلاق" واجهات برمجية ذكية، خرائط Vector فائقة الدقة، ومباني ثلاثية الأبعاد متكاملة.' : 'Welcome to the future of regional mapping. Intaleq provides high-fidelity vector tiles, intelligent geocoding, and native 3D building support for Jordan & Syria.'}

+
+ + Flutter SDK + + + JS SDK + +
@@ -91,32 +99,69 @@ const docs = { + + `, + 'sdks': ` +
+
+

${isAr ? 'المكتبات البرمجية (SDKs)' : 'SDKs & Client Libraries'}

+

${isAr ? 'استخدم مكتباتنا الجاهزة لدمج الخرائط والخدمات في ثوانٍ.' : 'Accelerate your development with our official enterprise-grade client libraries.'}

+
-
-
-
-

${isAr ? 'حدود الاستخدام (RPM)' : 'Rate Limiting (RPM)'}

+
+ +
+
+
+ +
+

Flutter SDK

+
+

+ ${isAr ? 'مكتبة متكاملة لنظام Flutter تدعم أندرويد و iOS والويب.' : 'A robust Flutter wrapper for MapLibre with native Intaleq services integrated.'} +

+
+ # pubspec.yaml
+ intaleq_maps: ^1.0.0 +
+ View on pub.dev
- -
-
-

Free

-

5 RPM

-
-
-

Starter

-

100 RPM

-
-
-

Pro

-

500 RPM

-
-
-

Enterprise

-

5000 RPM

-
+ + +
+
+
+ +
+

JavaScript SDK

+
+

+ ${isAr ? 'مكتبة JavaScript حديثة مدعومة بـ TypeScript لتطبيقات الويب.' : 'Modern TypeScript-ready SDK for seamless web map integration and routing.'} +

+
+ # Install via NPM
+ npm i intaleq-maps-gl +
+ View on NPM
+ +
+

${isAr ? 'مثال: إضافة مؤشر (JS SDK)' : 'Example: Adding a Marker (JS SDK)'}

+
+import { IntaleqMap } from 'intaleq-maps-gl';
+
+const map = new IntaleqMap({
+    container: 'map',
+    apiKey: 'YOUR_KEY',
+    styleType: 'obsidian'
+});
+
+map.addIntaleqMarker({
+    position: [35.91, 31.95], // [lng, lat]
+    color: '#0D47A1'
+});
+
`, 'tiles-api': ` @@ -126,10 +171,6 @@ const docs = {

${isAr ? 'خرائط الـ Vector' : 'Vector Tiles API'}

${isAr ? 'خرائط تفاعلية فائقة السرعة تدعم العرض ثلاثي الأبعاد والتحكم الكامل في الخصائص.' : 'High-performance interactive maps with native 3D buildings and custom GL styles.'}

-
- Active - V1.2 -
@@ -138,9 +179,6 @@ const docs = {
GET
/v1/maps/style.json
-
@@ -148,48 +186,22 @@ const docs = {
${isAr ? 'المعاملات المدعومة' : 'Query Parameters'}
-
-
- theme -

${isAr ? 'نمط الخريطة (light أو obsidian)' : 'Map visual theme (light | obsidian)'}

-
- Optional +
+ theme + Optional (obsidian | light)
-
-
- 3d -

${isAr ? 'تفعيل/إلغاء المباني ثلاثية الأبعاد' : 'Enable/Disable 3D buildings'}

-
- Boolean +
+ key + Required
- -
- - ${isAr ? 'ملاحظة: يتم استهلاك رصيد الخرائط بناءً على عدد الـ (Tile Requests) التي يتم طلبها أثناء التنقل في الخريطة.' : 'Note: Quota is consumed per tile request. High-density 3D areas may consume more resources.'} -
- -
-
-
- - JavaScript (MapLibre) - -
-
-const map = new maplibregl.Map({
-    container: 'map-id',
-    style: 'https://map-saas.intaleq.com/api/v1/maps/style.json?theme=obsidian',
-    transformRequest: (url) => {
-        return {
-            url: url,
-            headers: { 'x-api-key': 'YOUR_KEY_HERE' }
-        }
-    }
-});
-
+
+
${isAr ? 'رابط النمط المباشر' : 'Direct Style URL'}
+ + https://map-saas.intaleq.com/api/v1/maps/style.json?theme=obsidian&key=YOUR_API_KEY +
@@ -203,70 +215,50 @@ const map = new maplibregl.Map({

${isAr ? 'حوّل العناوين إلى إحداثيات أو العكس بدقة غير مسبوقة في الأردن وسوريا.' : 'Transform addresses into coordinates or reverse resolve locations with extreme accuracy in the Levant region.'}

-
- -
-
-
-
SEARCH
- /v1/geocoding/search -
+
+
+
+
SEARCH
+ /v1/geocoding/search
-
-
-
- - - - - - - - - - - - - - - - - -
${isAr ? 'البارامتر' : 'Key'}${isAr ? 'الوصف' : 'Description'}
q${isAr ? 'نص البحث (مثلاً: "عمان، الجبيهة")' : 'Query string (e.g., "Amman, Jordan")'}
limit${isAr ? 'عدد النتائج (الافتراضي: 5)' : 'Max results limit'}
- -
-
- - cURL Fast Access -
- -curl "https://map-saas.intaleq.com/api/v1/geocoding/search?q=Amman" \\
-     -H "x-api-key: YOUR_SECURE_KEY" -
-
-
+
+
+
+
+ + + + + + + + +
ParamDescription
qQuery (e.g. "Masjid Hashem")
limitMax results (Default: 5)
+
-
-
- - Response Structure - - application/json -
-
-[
-  {
-    "name": "Amman",
-    "name_ar": "عمان",
-    "lat": 31.9539,
-    "lng": 35.9106,
-    "district": "Capital",
-    "country": "Jordan",
-    "type": "city",
-    "boundingbox": [31.81, 32.07, 35.72, 36.14]
-  }
-]
+
+
+ + Real-World Response +
+
+{
+  "results": [
+    {
+      "id": 5843,
+      "name": "مسجد هاشم",
+      "name_ar": "مسجد هاشم",
+      "category": "building",
+      "governorate": "الزرقاء",
+      "location": { "lat": 32.10659, "lng": 36.18301 },
+      "full_address": "لواء قصبة الزرقاء، الزرقاء",
+      "distance_km": "12.68",
+      "source": "user_place"
+    }
+  ],
+  "source": "cache_hit"
+}
@@ -279,12 +271,7 @@ curl "https://map-saas.intaleq.com/api/v1/geocoding/search?q=Amman" \\

${isAr ? 'محرك التوجيه (Routing)' : 'Routing Engine'}

-

${isAr ? 'حساب أسرع المسارات مع تحليلات لحظية لحركة المرور في مراكز المدن.' : 'Fast pathfinding with traffic-aware duration metrics for urban environments.'}

-
-
-
- -
+

${isAr ? 'حساب أسرع المسارات مع تحليلات لحظية لحركة المرور.' : 'Fast pathfinding with traffic-aware duration metrics.'}

@@ -297,47 +284,40 @@ curl "https://map-saas.intaleq.com/api/v1/geocoding/search?q=Amman" \\
-
-
-
${isAr ? 'إحداثيات المسار' : 'Waypoints & Logic'}
-
-
- start -

"35.91,31.95" (lng,lat)

-
-
- end -

"35.85,31.82" (lng,lat)

-
-
-
- -
-
- profile - car | bike | foot -
-
- alternatives - Boolean -
+
+
+
Required Parameters
+
    +
  • start "35.91,31.95"
  • +
  • end "35.85,31.82"
  • +
  • profile car | bike | foot
  • +
-
-
+
+
- Traffic Analytics JSON + Production Response
-
+                                    
 {
-  "distance": 8420.5,
-  "duration": 940,
-  "traffic_duration": 1120,
-  "geometry": "encoded_polyline_here",
-  "steps": [
-     { "instruction": "Turn right...", "distance": 200 }
+  "distance": 30313.8,
+  "duration": 1975,
+  "trafficAwareDuration": 1975,
+  "points": "_cvbE_th{Ev@iJpHtDLEJKz@^XJn@...",
+  "instructions": [
+    {
+      "text": "Continue onto شارع الأمير الحسن",
+      "distance": 172.8,
+      "street_name": "شارع الأمير الحسن"
+    },
+    {
+      "text": "اتجه قليلاً لليمين خلال شارع الجيش",
+      "distance": 190.1,
+      "street_name": "شارع الجيش"
+    }
   ]
 }
diff --git a/apps/dashboard/js/i18n.js b/apps/dashboard/js/i18n.js index d1dd480..57600b3 100644 --- a/apps/dashboard/js/i18n.js +++ b/apps/dashboard/js/i18n.js @@ -138,7 +138,8 @@ const i18n = { 'modal-key-subtitle': 'Set up a new access point for your application.', 'modal-key-label': 'Key Name', 'cancel': 'Cancel', - 'guides-title': 'Guides' + 'guides-title': 'Guides', + 'side-sdks': 'SDKs & Libraries' }, ar: { // Navbar (Landing) @@ -270,7 +271,8 @@ const i18n = { 'modal-key-subtitle': 'إعداد نقطة وصول جديدة لتطبيقك.', 'modal-key-label': 'اسم المفتاح', 'cancel': 'إلغاء', - 'guides-title': 'الأدلة برمجية' + 'guides-title': 'الأدلة برمجية', + 'side-sdks': 'المكتبات البرمجية (SDKs)' } },