feat: استيراد كود سيرو إلى تريبز (سيرو @ecfe7568) — بلا تعديل

قرار المالك 2026-07-27: باك إند سيرو PHP هو المعتمد، وتطبيقاته المجرّبة
ميدانياً تحل محل إعادة البناء المؤرشفة. سيرو نفسه لم يُمسّ.

الخريطة:
  backend · payment_server · loction_server · ride_server ·
  passenger_server · docker · dashboard · stress_test  → الجذر
  siro_rider  → apps/rider          siro_driver  → apps/driver
  siro_admin  → dashboards/admin    siro_service → dashboards/service
  android_bot → apps/android_bot    socialBot    → apps/socialBot

نُسخ المتعقَّب في git سيرو فقط عبر `git archive` (3,198 ملفاً / ~169 م.ب)
لا `cp -r` — فاستُثنيت مخلفات البناء تلقائياً. بلا أي تعديل محتوى عمداً:
كل ما يلي يصير فرقاً مقروءاً مقابل المصدر.

لم يُستورد وسببه: siromove.com (الموقع التسويقي يبقى marketing/ في تريبز،
سيرو فيه 8 ملفات) · docs و planning (تريبز له docs/ الخاص) · deploy.sh
(ليس نشراً على سيرفر بل `git add . && git push origin --all` — فخّ في
مستودع آخر) · transit_dashboard (بانتظار قرار مصير backend-transit و
dashboards/transit-web).

⚠️ لا يبني بعد — ثلاثة نواقص متوقعة ومقصودة:
1. `.env` و `lib/env/env.g.dart` غير متعقَّبين في سيرو (أسرار لكل مستأجر):
   كل تطبيق فلاتر يحتاج .env خاصاً ثم توليد env.g.dart بـ build_runner.
2. إعدادات Firebase (9 ملفات google-services.json و GoogleService-Info.plist)
   يستبعدها .gitignore تريبز — ولكل مستأجر مشروع Firebase خاص أصلاً.
3. apps/driver في سيرو يشير إلى `../../Intaleq/packages/get` خارج المستودع →
   يجب ضمّ الحزم داخله أسوة بـ apps/rider.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Hamza-Ayed
2026-07-27 05:14:13 +03:00
co-authored by Claude Opus 5
parent 9909d9b4c1
commit 4d8414c96b
3198 changed files with 766859 additions and 0 deletions
@@ -0,0 +1,14 @@
import '../models/cb_config.dart';
import 'package:get/get.dart';
///Main controller for all the datas
class CbController extends GetxController {
///data configuration for [cbcontroller]
CbConfig? cbConfig;
///add config
void changeConfig(CbConfig config) {
cbConfig = config;
}
}
@@ -0,0 +1,179 @@
import 'package:get/get.dart';
import '../../calendar_builder.dart';
/// State manager or controller of MonthBuilder
class MonthBuilderController extends GetxController {
///startDate of month
DateTime mStartDate = DateTime(DateTime.now().year);
/// EndDate of month
/// default one year greater than [mStartDate]
/// [endDate] should be greater than [startDate]
DateTime mEndDate =
DateTime(DateTime.now().year + 20).subtract(const Duration(days: 1));
///Current day/Todays Date of Birth"
///default = now
DateTime mCurrentDay = DateTime.now();
///this contains all the [DateTime] from [mStartDate] to [mEndDate] with [mEndDate]+its full year
///!minimum 1 year dates will be there
late List<DateTime> mAllDates;
///this contains all the [DateTime] from [mStartDate] to [mEndDate]
late List<DateTime> mStartToEndDates;
///this contains all the dateTime sorted in the basis of years from [mStartDate] to [mEndDate]
///!minimum 1 year will be there
late List<DateTime> mAllYears;
///lits of 16 dates for year dropDown
late List<DateTime> m16DateTimeYears;
///Slected Date
///default = [mStartDate]
DateTime mSelectedDate = DateTime.now();
///Slected Year
///default = [DateTime(mStartDate.year)]
DateTime mSelectedYear = DateTime(DateTime.now().year);
///all events dates
List<DateTime> mEventDates = [];
///all disabled dates
List<DateTime> mDisabledDates = [];
///all hilighted dates
List<DateTime> mHighlightedDates = [];
///weeek start from
///default = `WeekStartsFrom.sunday`
WeekStartsFrom mWeekStartsFrom = WeekStartsFrom.sunday;
///used to improve the performance of [monthBuilder]
///wee add all the datas using [addToSavedMonthDates] function
///and theen [savedMonthRemover] this function removers dates
///if [savedMonthDatas.length] exceeds 3
///
List<DateTime> savedMonthDatas = [];
///removed date from [savedMonthDatas]
DateTime? removedDate;
///all month start up logic
void _logicInitialization() {
///alll the dates form [mStartDate] to [mEndDate]
mStartToEndDates =
DateUtilsCB.getDaysInBeteween(startDate: mStartDate, endDate: mEndDate);
///all the dates in each the year
mAllDates = DateUtilsCB.getAllDaysInBetweenYears(
startDate: mStartDate, endDate: mEndDate);
///gets all the years form [mStartDate] to [mEndDate]
mAllYears = DateUtilsCB.getYearsInBeteween(
startDate: mStartDate, endDate: mEndDate);
_yearBuilderLogic();
}
///configaration for month builder
void config({CbConfig? config, bool useOnHotReload = false}) {
if (useOnHotReload == false) {
mStartDate = config?.startDate ?? DateTime(DateTime.now().year);
}
mEndDate = config?.endDate ??
DateTime(DateTime.now().year + 20).subtract(const Duration(days: 1));
///
if (useOnHotReload == false) {
mSelectedDate = config?.selectedDate ?? DateTime.now();
mSelectedYear = config?.selectedYear ?? DateTime(mStartDate.year);
}
mCurrentDay = config?.currentDay ?? DateTime.now();
mWeekStartsFrom = config?.weekStartsFrom ?? WeekStartsFrom.sunday;
mEventDates = config?.eventDates ?? [];
mHighlightedDates = config?.highlightedDates ?? [];
mDisabledDates = config?.disabledDates ?? [];
_logicInitialization();
}
///For Improving Performace
///Add selectedYear to savedMonthDatas --- to save data
void addToSavedMonthDates(DateTime date) {
savedMonthDatas.add(date);
savedMonthDatas = savedMonthDatas.toSet().toList();
}
///For Improving Performace
///to check wether the saved month size exceeds 3
///if excedes it removes previous cached datas
void savedMonthRemover(DateTime date) {
CalendarGlobals.debugLogs('-----$date');
if (savedMonthDatas.length > 3) {
if (savedMonthDatas[0] != date) {
removedDate = savedMonthDatas[0];
savedMonthDatas.removeAt(0);
update(['removedDate:$removedDate!']);
CalendarGlobals.debugLogs('removedDate:$removedDate!');
} else {
removedDate = null;
}
} else {
removedDate = null;
}
}
///Checking [mAllYears]
///because to get alll the 16 days to fill the boxes in [UI]
void _yearBuilderLogic() {
if (mAllYears.length < 16) {
m16DateTimeYears = DateUtilsCB.getYearsInBeteween(
startDate: mStartDate,
endDate: DateTime(mAllYears.last.year + (16 - (mAllYears.length))),
);
} else {
m16DateTimeYears = [];
}
}
///fuction to update Selected Date [mSelectedDate]
void changeSelectedDate({
required DateTime selectedDate,
DateTime? oldSelectedDate,
required String commonUpdateId,
String? updateId,
bool updateByID = false,
}) {
mSelectedDate = selectedDate;
//common update Id for date changes
update([commonUpdateId]);
CalendarGlobals.debugLogs('old:$oldSelectedDate');
CalendarGlobals.debugLogs('selcted:$selectedDate');
if (updateByID && oldSelectedDate != null && updateId != null) {
update([selectedDate, oldSelectedDate, updateId]);
} else {
update();
}
}
///fuction to update Selected Date [mSelectedYear]
void changeSelectedYear({
required DateTime selectedYear,
DateTime? oldSelectedYear,
required String commonUpdateId,
String? updateId,
bool updateByID = false,
}) {
mSelectedYear = selectedYear;
//common update Id for date changes
update([commonUpdateId]);
if (updateByID && oldSelectedYear != null && updateId != null) {
update([selectedYear, oldSelectedYear, updateId]);
} else {
update();
}
}
}
@@ -0,0 +1,46 @@
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import '../../calendar_builder.dart';
///this controller is used to controll the state of the [month_builder] ui
class MonthUiController extends GetxController {
///checking wether the yer picker is expanded or not
bool isYearPickerExpanded = false;
///Page controller for Month
late PageController mPageController;
///callback when year header is expanded
void Function(bool isExpanded)? onYearHeaderExpanded;
/// callback when year button is clicked
void Function(DateTime selectedYear, bool isSelected)? onYearButtonClicked;
/// callback when date button is clicked
void Function(OnDateSelected onDateSelected)? onDateClicked;
///used to chage the expanded or not-expanded , state of year picker
void chageYearExpanded(
{String? updateId,
required String commonUpdateId,
required bool isExpanded}) {
///if its aldready in the same state then it will not update
if (isYearPickerExpanded != isExpanded) {
isYearPickerExpanded = isExpanded;
///common update Id for year picker expanded
update([commonUpdateId]);
if (updateId != null) {
update([updateId]);
} else {
update();
}
}
}
///checking for year dropdown should be expanded initially or not
void expandInitiaally(bool isExpanded) {
isYearPickerExpanded = isExpanded;
}
}