Skip to content

Commit f7c5498

Browse files
committed
PUSH
-> Update copyright -> New admin UI -> API now shows what is running
1 parent a57e66c commit f7c5498

File tree

81 files changed

+2054
-923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2054
-923
lines changed

.vscode/backend.code-workspace

Lines changed: 0 additions & 48 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,32 @@
22
"recommendations": [
33
"haorenlong-vscode.vue-i18n-translate-decoration",
44
"vue-i18n-manage.vue-i18n-manage",
5-
"vue.volar",
65
"antfu.vite",
76
"inferrinizzard.prettier-sql-vscode",
87
"mblode.pretty-formatter",
98
"fcoury.pretty-sql",
109
"devsense.profiler-php-vscode",
11-
"zobo.php-intellisense",
12-
"bmewburn.vscode-intelephense-client",
1310
"xdebug.php-pack",
1411
"devsense.phptools-vscode",
15-
"mythicalsystems.mythicalframework-utils",
1612
"pkief.material-icon-theme",
17-
"oderwat.indent-rainbow",
1813
"github.copilot-chat",
1914
"github.copilot",
20-
"ms-azuretools.vscode-docker"
15+
"ms-azuretools.vscode-docker",
16+
"yoavbls.pretty-ts-errors",
17+
"editorconfig.editorconfig",
18+
"streetsidesoftware.code-spell-checker",
19+
"ms-vscode.vscode-typescript-next",
20+
"mythicalsystems.mythicalframework-utils",
21+
"esbenp.prettier-vscode",
22+
"devsense.composer-php-vscode",
23+
"ikappas.composer",
24+
"muath-ye.composer-intelephense",
25+
"fill-labs.dependi",
26+
"dbaeumer.vscode-eslint",
27+
"oderwat.indent-rainbow",
28+
"devsense.intelli-php-vscode",
29+
"xdebug.php-debug",
30+
"redhat.vscode-yaml"
2131
]
2232

2333
}

.vscode/settings.json

Lines changed: 106 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,108 @@
11
{
2-
"cSpell.words": [
3-
"Adminannouncements",
4-
"mythicalclient",
5-
"mythicaldash",
6-
"Predis",
7-
"recommand",
8-
"Regen",
9-
"shortdescription",
10-
"SOURCECODE",
11-
"Swal",
12-
"sweetalert"
13-
]
2+
"cSpell.words": [
3+
"Adminannouncements",
4+
"mythicalclient",
5+
"mythicaldash",
6+
"Predis",
7+
"recommand",
8+
"Regen",
9+
"shortdescription",
10+
"SOURCECODE",
11+
"Swal",
12+
"sweetalert"
13+
],
14+
"json.maxItemsComputed": 10000,
15+
"editor.largeFileOptimizations": false,
16+
"editor.renderWhitespace": "all",
17+
"files.maxMemoryForLargeFilesMB": 16384,
18+
"editor.useTabStops": true,
19+
"editor.tabFocusMode": false,
20+
"workbench.sideBar.location": "left",
21+
"window.title": "${rootName}",
22+
"editor.insertSpaces": false,
23+
"editor.detectIndentation": false,
24+
"workbench.colorCustomizations": {
25+
"activityBar.background": "#2d1854",
26+
"titleBar.activeBackground": "#1a0f2e",
27+
"titleBar.activeForeground": "#e2e8f0",
28+
"activityBar.activeBorder": "#c026d3",
29+
"activityBar.border": "#2d1854",
30+
"activityBar.foreground": "#e2e8f0",
31+
"activityBar.inactiveForeground": "#e2e8f066",
32+
"activityBarBadge.background": "#d946ef",
33+
"activityBarBadge.foreground": "#e2e8f0",
34+
"statusBar.background": "#1a0f2e",
35+
"statusBar.border": "#1a0f2e",
36+
"statusBar.foreground": "#e2e8f0",
37+
"statusBarItem.hoverBackground": "#2d1854",
38+
"titleBar.border": "#1a0f2e",
39+
"titleBar.inactiveBackground": "#1a0f2e",
40+
"titleBar.inactiveForeground": "#e2e8f099",
41+
"commandCenter.background": "#1a0f2e",
42+
"commandCenter.foreground": "#e2e8f0",
43+
"commandCenter.border": "#e2e8f099",
44+
"sideBar.background": "#1a0f2e",
45+
"sideBar.foreground": "#e2e8f0",
46+
"sideBar.border": "#2d1854",
47+
"editorGroupHeader.tabsBackground": "#1a0f2e",
48+
"tab.activeBackground": "#2d1854",
49+
"tab.inactiveBackground": "#1a0f2e",
50+
"tab.activeForeground": "#e2e8f0",
51+
"tab.inactiveForeground": "#e2e8f099",
52+
"tab.border": "#2d1854",
53+
"tab.hoverBackground": "#2d1854",
54+
"editor.background": "#1a0f2e",
55+
"editor.foreground": "#e2e8f0",
56+
"editor.lineHighlightBackground": "#2d1854",
57+
"editor.selectionBackground": "#2d1854",
58+
"editor.selectionHighlightBackground": "#2d185466",
59+
"editorCursor.foreground": "#d946ef",
60+
"editorLineNumber.foreground": "#e2e8f066",
61+
"editorLineNumber.activeForeground": "#d946ef",
62+
"panel.background": "#1a0f2e",
63+
"panel.border": "#2d1854",
64+
"terminal.background": "#1a0f2e",
65+
"terminal.foreground": "#e2e8f0",
66+
"terminal.border": "#2d1854",
67+
"scrollbarSlider.background": "#2d185466",
68+
"scrollbarSlider.hoverBackground": "#2d185499",
69+
"scrollbarSlider.activeBackground": "#2d1854cc",
70+
"editorGroup.border": "#2d1854",
71+
"editorGroup.dropBackground": "#2d1854",
72+
"editorGroupHeader.tabsBorder": "#2d1854",
73+
"editorGroupHeader.tabsForeground": "#e2e8f0",
74+
"editorGroupHeader.noTabsBackground": "#1a0f2e",
75+
"editorGroupHeader.border": "#2d1854",
76+
"editorGroup.emptyBackground": "#1a0f2e",
77+
"sideBarSectionHeader.background": "#1a0f2e",
78+
"sideBarSectionHeader.foreground": "#e2e8f0",
79+
"sideBarSectionHeader.border": "#2d1854",
80+
"sideBarTitle.foreground": "#e2e8f0",
81+
"notifications.background": "#1a0f2e",
82+
"notifications.foreground": "#e2e8f0",
83+
"notifications.border": "#2d1854",
84+
"notificationCenter.border": "#2d1854",
85+
"notificationsErrorIcon.foreground": "#ef4444",
86+
"notificationsWarningIcon.foreground": "#eab308",
87+
"notificationsInfoIcon.foreground": "#3b82f6",
88+
"button.secondaryBackground": "#1a0f2e",
89+
"button.secondaryForeground": "#e2e8f0",
90+
"button.secondaryHoverBackground": "#2d1854",
91+
"notificationToast.border": "#2d1854",
92+
"notifications.hoverBackground": "#2d1854",
93+
"notificationLink.foreground": "#d946ef",
94+
"button.background": "#2d1854",
95+
"button.foreground": "#e2e8f0",
96+
"button.hoverBackground": "#d946ef",
97+
"button.border": "#2d1854",
98+
},
99+
"todo-tree.general.tags": [
100+
"BUG",
101+
"HACK",
102+
"FIXME",
103+
"TODO",
104+
"[ ]",
105+
"[x]",
106+
"REFACTOR"
107+
],
14108
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 MythicalSystems LTD
3+
Copyright (c) 2025 MythicalSystems LTD
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

backend/.php-cs-fixer.dist.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
This file is part of MythicalClient.
99
Please view the LICENSE file that was distributed with this source code.
1010
11+
2021-2025 (c) All rights reserved
12+
1113
MIT License
1214
13-
(c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
14-
(c) NaysKutzu <nayskutzu.xyz> - All rights reserved
15-
(c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
15+
(c) MythicalSystems - All rights reserved
16+
(c) NaysKutzu - All rights reserved
17+
(c) Cassian Gherman- All rights reserved
1618
1719
Permission is hereby granted, free of charge, to any person obtaining a copy
1820
of this software and associated documentation files (the "Software"), to deal

backend/app/Api/Admin/Dashboard.php

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?php
2+
3+
/*
4+
* This file is part of MythicalClient.
5+
* Please view the LICENSE file that was distributed with this source code.
6+
*
7+
* 2021-2025 (c) All rights reserved
8+
*
9+
* MIT License
10+
*
11+
* (c) MythicalSystems - All rights reserved
12+
* (c) NaysKutzu - All rights reserved
13+
* (c) Cassian Gherman- All rights reserved
14+
*
15+
* Permission is hereby granted, free of charge, to any person obtaining a copy
16+
* of this software and associated documentation files (the "Software"), to deal
17+
* in the Software without restriction, including without limitation the rights
18+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19+
* copies of the Software, and to permit persons to whom the Software is
20+
* furnished to do so, subject to the following conditions:
21+
*
22+
* The above copyright notice and this permission notice shall be included in all
23+
* copies or substantial portions of the Software.
24+
*
25+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31+
* SOFTWARE.
32+
*/
33+
34+
use MythicalClient\App;
35+
use MythicalClient\Chat\Can;
36+
use MythicalClient\Chat\Session;
37+
use MythicalClient\Hooks\GitHub;
38+
use MythicalClient\Chat\Database;
39+
use MythicalClient\Chat\UserActivities;
40+
use MythicalClient\Chat\columns\UserColumns;
41+
42+
$router->get('/api/admin', function (): void {
43+
App::init();
44+
$appInstance = App::getInstance(true);
45+
$appInstance->allowOnlyGET();
46+
$session = new Session($appInstance);
47+
if (Can::canAccessAdminUI($session->getInfo(UserColumns::ROLE_ID, false))) {
48+
try {
49+
$github_data = new GitHub();
50+
$github_data = $github_data->getRepoData();
51+
$activity = UserActivities::getAll(150);
52+
$userCount = Database::getTableRowCount('mythicalclient_users');
53+
$addonsCount = Database::getTableRowCount('mythicalclient_addons');
54+
$departmentsCount = Database::getTableRowCount('mythicalclient_departments');
55+
$invoicesCount = Database::getTableRowCount('mythicalclient_invoices');
56+
$rolesCount = Database::getTableRowCount('mythicalclient_roles');
57+
$servicesCount = Database::getTableRowCount('mythicalclient_services');
58+
$ticketsCount = Database::getTableRowCount('mythicalclient_tickets');
59+
60+
$appInstance->OK('Dashboard data retrieved successfully.', [
61+
'core' => [
62+
'github_data' => json_decode($github_data, true),
63+
],
64+
'count' => [
65+
'user_count' => $userCount,
66+
'addons_count' => $addonsCount,
67+
'departments_count' => $departmentsCount,
68+
'invoices_count' => $invoicesCount,
69+
'roles_count' => $rolesCount,
70+
'services_count' => $servicesCount,
71+
'tickets_count' => $ticketsCount,
72+
],
73+
'etc' => [
74+
'activity' => $activity,
75+
],
76+
]);
77+
78+
} catch (Exception $e) {
79+
$appInstance->ServiceUnavailable($e->getMessage(), ['error_code' => 'SERVICE_UNAVAILABLE']);
80+
}
81+
} else {
82+
$appInstance->Unauthorized('You do not have permission to access this endpoint.', ['error_code' => 'NO_PERMISSION']);
83+
}
84+
85+
});

backend/app/Api/System/Settings.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
* This file is part of MythicalClient.
55
* Please view the LICENSE file that was distributed with this source code.
66
*
7+
* 2021-2025 (c) All rights reserved
8+
*
79
* MIT License
810
*
9-
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
10-
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
11-
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
11+
* (c) MythicalSystems - All rights reserved
12+
* (c) NaysKutzu - All rights reserved
13+
* (c) Cassian Gherman- All rights reserved
1214
*
1315
* Permission is hereby granted, free of charge, to any person obtaining a copy
1416
* of this software and associated documentation files (the "Software"), to deal

backend/app/Api/User/Auth/ForgotPassword.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
* This file is part of MythicalClient.
55
* Please view the LICENSE file that was distributed with this source code.
66
*
7+
* 2021-2025 (c) All rights reserved
8+
*
79
* MIT License
810
*
9-
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
10-
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
11-
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
11+
* (c) MythicalSystems - All rights reserved
12+
* (c) NaysKutzu - All rights reserved
13+
* (c) Cassian Gherman- All rights reserved
1214
*
1315
* Permission is hereby granted, free of charge, to any person obtaining a copy
1416
* of this software and associated documentation files (the "Software"), to deal

backend/app/Api/User/Auth/Login.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
* This file is part of MythicalClient.
55
* Please view the LICENSE file that was distributed with this source code.
66
*
7+
* 2021-2025 (c) All rights reserved
8+
*
79
* MIT License
810
*
9-
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
10-
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
11-
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
11+
* (c) MythicalSystems - All rights reserved
12+
* (c) NaysKutzu - All rights reserved
13+
* (c) Cassian Gherman- All rights reserved
1214
*
1315
* Permission is hereby granted, free of charge, to any person obtaining a copy
1416
* of this software and associated documentation files (the "Software"), to deal

backend/app/Api/User/Auth/Logout.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
* This file is part of MythicalClient.
55
* Please view the LICENSE file that was distributed with this source code.
66
*
7+
* 2021-2025 (c) All rights reserved
8+
*
79
* MIT License
810
*
9-
* (c) MythicalSystems <mythicalsystems.xyz> - All rights reserved
10-
* (c) NaysKutzu <nayskutzu.xyz> - All rights reserved
11-
* (c) Cassian Gherman <nayskutzu.xyz> - All rights reserved
11+
* (c) MythicalSystems - All rights reserved
12+
* (c) NaysKutzu - All rights reserved
13+
* (c) Cassian Gherman- All rights reserved
1214
*
1315
* Permission is hereby granted, free of charge, to any person obtaining a copy
1416
* of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)