Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
335 commits
Select commit Hold shift + click to select a range
ddb2829
Add pages listing
Usbac Oct 17, 2025
fe26f31
Minor table fixes
Usbac Oct 17, 2025
b3c79ac
Add posts listing
Usbac Oct 17, 2025
9ed57dc
Fix filter select in table
Usbac Oct 17, 2025
cd44515
Add roles endpoint
Usbac Oct 18, 2025
913d200
Add getRoleTitle function
Usbac Oct 19, 2025
f77ce1b
Update table
Usbac Oct 19, 2025
3f26ae8
Update table when changing filters
Usbac Oct 19, 2025
26e62cc
Add users listing
Usbac Oct 19, 2025
4225164
Improve user and settings context
Usbac Oct 19, 2025
79251e4
Fix useElement
Usbac Oct 19, 2025
4bffa40
Fix loading state in AdminPages
Usbac Oct 19, 2025
a8ddea6
Fix user image in sidebar
Usbac Oct 20, 2025
0ea9cd2
Add missing import
Usbac Oct 20, 2025
cc7a6a3
Add impersonate functionality
Usbac Oct 20, 2025
eb5bde7
Add impersonate endpoint
Usbac Oct 20, 2025
96fc760
Add tag page
Usbac Oct 20, 2025
2947476
Fix Tag page
Usbac Oct 25, 2025
345a60e
Add view_files endpoint
Usbac Oct 25, 2025
9276538
Remove TinyMCE from composer
Usbac Oct 25, 2025
acd1158
Add tinymce to package json
Usbac Oct 25, 2025
dceb22d
Send theme to outlet
Usbac Oct 25, 2025
0bcc601
Update Switch condition
Usbac Oct 25, 2025
0d8f4dd
Add Page page
Usbac Oct 25, 2025
bfa0f03
Fixes to Page page
Usbac Oct 25, 2025
2367f0e
Add getUrl function
Usbac Oct 25, 2025
bea978c
Remove log
Usbac Oct 25, 2025
53f3a76
Fix ImageDialog
Usbac Oct 26, 2025
698ff8e
Remove unused code
Usbac Oct 26, 2025
5f0545c
Dev post page
Usbac Oct 29, 2025
07e3acf
Improve makeRequest function
Usbac Oct 29, 2025
656d420
Improve request body code
Usbac Oct 31, 2025
8df3229
Fix file upload
Usbac Oct 31, 2025
2cab91b
Add checks for getBaseData methods
Usbac Oct 31, 2025
f197c8c
Fix image in posts listing
Usbac Oct 31, 2025
5210631
Fix min-height for media paths
Usbac Oct 31, 2025
ef147b9
Fix settings save
Usbac Oct 31, 2025
0ad5e96
Fix date input
Usbac Oct 31, 2025
e6694dd
Update published_at in post getBaseData
Usbac Oct 31, 2025
ecb1247
Handle wrong hash in settings page
Usbac Oct 31, 2025
3bea4d2
Fix View site text
Usbac Oct 31, 2025
e3babc6
Handle index
Usbac Oct 31, 2025
2fb1786
Refactor user addition to handle optional fields and add getRowData m…
Usbac Oct 31, 2025
6966d21
Add User page
Usbac Oct 31, 2025
7cd6e70
Use new upload_image endpoint
Usbac Oct 31, 2025
b211b41
Add getSlug function
Usbac Oct 31, 2025
53364f2
Remove old admin code
Usbac Oct 31, 2025
cccc6c1
Fix onChange of slug inputs
Usbac Oct 31, 2025
4e23e14
Remove old admin routes
Usbac Oct 31, 2025
276d341
Fix post image in dashboard
Usbac Oct 31, 2025
68221c9
Remove code editor setting
Usbac Oct 31, 2025
58d995a
Refactor login
Usbac Oct 31, 2025
6f56d61
Add getTable function
Usbac Nov 1, 2025
6588f60
Fix password restore
Usbac Nov 1, 2025
3775f5f
Refactor routes code
Usbac Nov 1, 2025
8561394
Dev new media page
Usbac Nov 1, 2025
9f3614d
Fix columns
Usbac Nov 7, 2025
5a11869
Remove extra lines
Usbac Nov 7, 2025
3d35d39
Add props parameters to icons
Usbac Nov 7, 2025
b50e5b9
Unify and fix file and folder icons styles
Usbac Nov 7, 2025
dbb171d
Improve url code in table
Usbac Nov 7, 2025
3cdedb2
Dev of media page
Usbac Nov 7, 2025
e835683
Fix onclick for rows in media
Usbac Nov 7, 2025
917d560
Add path logic in media page
Usbac Nov 8, 2025
559f0f9
Add media path to media page and improve styles
Usbac Dec 22, 2025
dc1392a
Fix media path html
Usbac Dec 22, 2025
d7b18b8
Refactor options code
Usbac Dec 22, 2025
6b16a96
Move CSS variable definition
Usbac Dec 22, 2025
442baec
Fix variable name
Usbac Dec 22, 2025
5619cca
Add edit file dialog
Usbac Dec 22, 2025
b72c27c
Refactor media page code
Usbac Dec 22, 2025
d485b7a
Add duplicate file dialog
Usbac Dec 22, 2025
447f552
Remove old media code
Usbac Dec 22, 2025
10a5a64
Refactor media page code
Usbac Dec 22, 2025
4ca866d
Move code
Usbac Dec 22, 2025
ba87445
Add move file dialog
Usbac Dec 22, 2025
1adb1dd
Remove old code
Usbac Dec 22, 2025
dcf1ee6
Add copy path option
Usbac Dec 22, 2025
408a6d2
Fix page options code
Usbac Dec 22, 2025
53618b6
Refactor media page code
Usbac Dec 22, 2025
0b36131
Add download files option
Usbac Dec 22, 2025
419d4d0
Fix delete file endpoint
Usbac Dec 22, 2025
5643b0e
Fix delete file endpoint
Usbac Dec 22, 2025
6a1e972
Remove old code
Usbac Dec 22, 2025
b35fdea
Add create folder option
Usbac Dec 24, 2025
4d8adce
Remove old media code
Usbac Dec 24, 2025
82141f4
Remove old media code
Usbac Dec 24, 2025
9262e68
Add upload file functionality
Usbac Dec 24, 2025
5a2171e
Remove unused template
Usbac Dec 24, 2025
aac6659
Remove v2 from api urls
Usbac Dec 24, 2025
ddfba0e
Fix posts endpoint url
Usbac Dec 24, 2025
f53bd4a
Rename console to admin
Usbac Dec 24, 2025
feaf774
Minor style fixes
Usbac Dec 24, 2025
3bb1773
Return error codes instead of human readable message
Usbac Dec 28, 2025
a82adc7
Add I18N provider
Usbac Dec 28, 2025
e2ca6e7
Add base language files
Usbac Dec 29, 2025
fa63aa8
Add i18n context
Usbac Dec 29, 2025
5a4e2e3
Use i18n in AdminPages
Usbac Dec 29, 2025
abd7cd1
Use i18n in remaining pages
Usbac Dec 29, 2025
e536395
Remove unused translation keys in PHP
Usbac Dec 29, 2025
84e7f71
Fix user related code
Usbac Dec 29, 2025
a0d8d21
Refactor code related to i18n
Usbac Dec 29, 2025
d8f285b
Fix 404 page
Usbac Dec 29, 2025
f0aa375
Update the delete method in DB so it returns true only if the row(s) …
Usbac Dec 29, 2025
35f0830
Remove unused csrf code
Usbac Dec 29, 2025
7f63949
Remove old HTML editor references from settings docs
Usbac Dec 29, 2025
b75a7d2
Remove old session code
Usbac Dec 29, 2025
81fbe89
Refactor https related code
Usbac Dec 30, 2025
0b4c74b
Improve auth code
Usbac Dec 30, 2025
b54895f
Merge branch 'main' of https://github.com/Usbac/aurora into react
Usbac Dec 30, 2025
df05077
Remove old js file from gitignore
Usbac Dec 30, 2025
86204bd
Refactor public html code
Usbac Dec 30, 2025
38048a0
Add admin js files to gitignore
Usbac Dec 30, 2025
5814115
Fix admin js filename
Usbac Dec 30, 2025
f3a81c8
Move AdminPages code
Usbac Dec 30, 2025
1590a7c
Move Table component
Usbac Dec 30, 2025
1e54aa5
Remove unused dependencies
Usbac Dec 30, 2025
0e8274f
Add missing loading animation and no items found to table component
Usbac Dec 30, 2025
f77b72b
Fix sidebar in mobile view
Usbac Dec 30, 2025
7fea396
Improve i18n provider
Usbac Dec 30, 2025
1c073ce
Add language switch
Usbac Dec 30, 2025
85b8efc
Minor fixes
Usbac Dec 30, 2025
37c9752
Use document language
Usbac Dec 30, 2025
268317f
Fix loading page
Usbac Dec 30, 2025
6b02916
Fix loading icon
Usbac Dec 30, 2025
654bb31
Remove unused style
Usbac Dec 30, 2025
f1b5eec
Fix loading icon
Usbac Dec 30, 2025
84cda0b
Add reference to fetch function
Usbac Jan 1, 2026
b33d148
Refresh tables when doing changes
Usbac Jan 2, 2026
4d36fd7
Minor style fix
Usbac Jan 2, 2026
905dd66
Fix url in password restore template
Usbac Apr 17, 2026
a6a791d
Add forbidden_action translation
Usbac Apr 18, 2026
172ab99
Add error_generic translation
Usbac Apr 18, 2026
7dcbcd7
Move main request function to a hook
Usbac Apr 18, 2026
f060587
Use native fetch function instead of axios
Usbac Apr 18, 2026
1e84d72
Add support for response_type text in request function
Usbac Apr 18, 2026
c847988
Add doc comments for functions in utils
Usbac Apr 18, 2026
ffd1e19
Rename apiFetch to makeRequest
Usbac Apr 18, 2026
0e219ef
Add doc comments to i18n provider and table components
Usbac Apr 18, 2026
0d26502
Remove forwardRef from Table component
Usbac Apr 18, 2026
54ff52a
Remove unnecessary console.error
Usbac Apr 18, 2026
310a676
Add support for disabled argument in filters in Table component
Usbac Apr 18, 2026
3d84bd2
Disable filters when they are loading data instead of showing the Loa…
Usbac Apr 18, 2026
c10b22c
Disable options when they are loading data instead of showing the Loa…
Usbac Apr 18, 2026
fa80f0d
Use aria-busy for elements that are disabled while loading data
Usbac Apr 18, 2026
d7949f0
Improve error messages related to user credentials
Usbac Apr 22, 2026
457dd9a
Fix error handling in User component to ensure safe mapping of error …
Usbac Apr 22, 2026
453fab9
Move core folder to app
Usbac Apr 25, 2026
78ded64
Move public folder to app
Usbac Apr 26, 2026
e017d9f
Add max active sessions config
Usbac Apr 26, 2026
ff6aa71
Fix content config
Usbac Apr 26, 2026
a4b41ee
Update asset paths in README and webpack config; fix copy-tinymce script
Usbac Apr 26, 2026
73f36f7
Add user_agent field to tokens table and include it in token insertion
Usbac Apr 26, 2026
26af7b1
Add id column to tokens table
Usbac May 1, 2026
219610f
Add 'tokens' relation to User model
Usbac May 1, 2026
bc9a775
Update default path of log file
Usbac May 1, 2026
fec66c4
Improve delete log endpoint
Usbac May 1, 2026
fc08a0a
Add ip column to tokens
Usbac May 2, 2026
41995c2
Add updated_at column to tokens
Usbac May 2, 2026
6d7c704
Improve check in formatDate
Usbac May 2, 2026
f5d4ab1
Fix error code
Usbac May 2, 2026
6519011
Set updated_at when inserting token row
Usbac May 2, 2026
4317a12
Add blue title-label
Usbac May 2, 2026
e16dd8d
Fix doc comment
Usbac May 2, 2026
bca84fd
Add user token to global user variable and add sessions endpoints
Usbac May 3, 2026
d133603
Avoid global user variable
Usbac May 3, 2026
8ef360d
Rename user variable in endpoint
Usbac May 3, 2026
6ea7e42
Fix parameter in routes function
Usbac May 3, 2026
9f79b79
Add active_sessions to language
Usbac May 9, 2026
09a28c3
Add getDeviceInfo and getDeviceType functions to utils
Usbac May 9, 2026
337e877
Add desktop, mobile and key icons
Usbac May 9, 2026
da5fd76
Add session_deleted_successfully to language
Usbac May 9, 2026
52d2ae3
Add list of active sessions to user page
Usbac May 9, 2026
8f5ad37
Add missing translations to session row
Usbac May 9, 2026
164f0de
Update last_active translation
Usbac May 9, 2026
85f804f
Refactor dropdown code and add new DropdownMenu component
Usbac May 16, 2026
9677385
Fix style in dropdown menu
Usbac May 16, 2026
111b1e9
Add alignment options to Dropdown and DropdownMenu components
Usbac May 16, 2026
37b4252
Add info icon
Usbac May 24, 2026
300ec94
Add info tooltip to user sessions
Usbac May 24, 2026
02704be
Unify dropdown styles
Usbac May 24, 2026
34041f9
Fix sidebar options and unify its code
Usbac May 24, 2026
9313a9f
Add update functionality
Usbac May 24, 2026
0597ffb
Fix doc comment in Update controller
Usbac May 24, 2026
0200d6d
Improve copy method to ensure destination directory exists
Usbac May 24, 2026
9d338b5
Fix UPDATE_DIRECTORIES const
Usbac May 24, 2026
3ec2a75
Add update error build translation
Usbac May 24, 2026
d2b5e5b
Handle error build during update
Usbac May 24, 2026
a559eab
Update update directories
Usbac May 24, 2026
54452e0
Add error build const and add on_build_output parameter to run method
Usbac May 24, 2026
5061f04
Remove unused import
Usbac May 24, 2026
16a9020
Improve check in logs endpoint
Usbac May 24, 2026
a14e6b0
Add php.ini rule to docker-compose
Usbac May 24, 2026
70614d4
Write build output to current output
Usbac May 24, 2026
4cf43a0
Update node version
Usbac May 27, 2026
012aa93
Install npm y node
Usbac May 28, 2026
9fff408
Add missing composer install
Usbac May 28, 2026
91f1058
Update docker files
Usbac May 28, 2026
d067d21
Refactor update process in Update.php
Usbac May 29, 2026
e443d89
Move remove directory method
Usbac May 29, 2026
b497b20
Add missing doc comments
Usbac May 29, 2026
8571b9e
Send npm output to logs
Usbac May 29, 2026
e08297d
Remove Display errors setting
Usbac May 31, 2026
85e37f8
Improve copy helper function
Usbac May 31, 2026
ef78875
Change update texts
Usbac May 31, 2026
8cc5d9b
Do not show password hash in endpoints
Usbac May 31, 2026
48e973d
Add missing translation keys
Usbac May 31, 2026
9e4d277
Add composer install to update process
Usbac May 31, 2026
e80c223
Add missing checks to routes code
Usbac May 31, 2026
d683bf5
Remove unused react-query
Usbac May 31, 2026
d9344b8
Fix user related endpoints
Usbac May 31, 2026
872b0d6
Move call to http_response_code to routes files
Usbac May 31, 2026
209809b
Fix user reference
Usbac May 31, 2026
7acb98b
Rename edit_user method
Usbac May 31, 2026
92c98d9
Fix identation
Usbac May 31, 2026
7048a63
Fix typos in update process
Usbac May 31, 2026
6936705
Only allow settings to owners
Usbac May 31, 2026
667e340
Change impersonate endpoint to a POST
Usbac May 31, 2026
8438ea9
Minor fixes in routes code
Usbac May 31, 2026
65c8e79
Fix user test
Usbac May 31, 2026
67d5cd5
Refactor class attributes to className in JSX components
Usbac May 31, 2026
7d34cbc
Added useLocation hook to AdminPages component
Usbac May 31, 2026
cc7423a
Make $user parameter a required parameter
Usbac May 31, 2026
4057541
Unify can edit user checks
Usbac May 31, 2026
b991138
Fix impersonate condition
Usbac May 31, 2026
e491f08
Add dockerignore file
Usbac May 31, 2026
9c2e426
Fix select
Usbac May 31, 2026
7ec7627
Refactor roles code
Usbac May 31, 2026
4253697
Improve role selector code
Usbac May 31, 2026
539c609
Refactor selectors code
Usbac Jun 1, 2026
9c4a0e9
Add assets directory and update Dockerfile for frontend assets
Usbac Jun 1, 2026
faab519
Fix User component indentation
Usbac Jun 1, 2026
82ced72
Refactor navigation code
Usbac Jun 1, 2026
12aa089
Update label attributes in Settings.js to use 'htmlFor' instead of 'for'
Usbac Jun 1, 2026
656fa3e
Update translation function
Usbac Jun 1, 2026
1a5f0d0
Add fetch to useEffect in useElement
Usbac Jun 1, 2026
e8c74f0
Add check for invalid ids
Usbac Jun 1, 2026
df6f48e
Change reset_views_count endpoint to POST
Usbac Jun 3, 2026
38bb83c
Refactor token handling in login function. Delete tokens when resetti…
Usbac Jun 3, 2026
3254ef1
Add id to useEffect in user page
Usbac Jun 3, 2026
b0a99c9
Change api/auth endpoint to POST
Usbac Jun 3, 2026
8232901
Improve authorization header check
Usbac Jun 3, 2026
559d6b2
Fix tests
Usbac Jun 4, 2026
f3eb769
Add test script to composer file
Usbac Jun 4, 2026
d93569d
Remove runInSeparateProcess in tests
Usbac Jun 4, 2026
caaeff8
Update test command
Usbac Jun 4, 2026
14dac8b
Move calls to http_response_code
Usbac Jun 4, 2026
0c85e10
Allow response code definition
Usbac Jun 4, 2026
bf3c661
Refactor response handling to return tuples for status codes and mess…
Usbac Jun 4, 2026
0759d37
Fix output code in route class and update phpunit config
Usbac Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.git
.github
.vscode
app/react/node_modules
app/public/content
vendor
*.log
.DS_Store
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
*.log
composer.lock
app/database/db.sqlite
public/content/*
public/assets/js/tinymce
app/public/content/*
app/public/assets/js/tinymce
app/public/assets/js/admin.*
app/react/node_modules
app/react/package-lock.json
vendor
5 changes: 3 additions & 2 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Options -Indexes

RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
RewriteRule ^$ app/public/ [L]
RewriteRule ^public/(.*)$ app/public/$1 [L,NC]
RewriteRule ^((?!app/public/).*)$ app/public/$1 [L,NC]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<img src="public/assets/logo.svg" alt="Aurora logo" width="140">
<img src="/app/public/assets/logo.svg" alt="Aurora logo" width="140">
<br>
Aurora
<br>
Expand Down
3 changes: 2 additions & 1 deletion app/bootstrap/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
'bootstrap' => require(__DIR__ . '/index.php'),
'date_format' => 'dd MMM Y HH:mm',
'db' => $db,
'content' => 'public/content',
'content' => 'app/public/content',
'per_page' => 20,
'max_active_sessions' => 10,
'mail' => fn($to, $subject, $message) => mail($to, $subject, $message),
'views' => 'app/views',
];
20 changes: 8 additions & 12 deletions app/bootstrap/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,11 @@ function setting(?string $key = null): mixed
$settings = $db->query('SELECT `key`, value FROM settings')->fetchAll(\PDO::FETCH_KEY_PAIR);

header('X-Content-Type-Options: nosniff');
ini_set('session.cookie_httponly', 1);
ini_set('error_log', \Aurora\Core\Helper::getPath($settings['log_file']));
ini_set('display_errors', $settings['display_errors'] ? 1 : 0);
ini_set('display_startup_errors', $settings['display_errors'] ? 1 : 0);
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting($settings['log_errors'] ? E_ALL : 0);
date_default_timezone_set($settings['timezone']);
session_set_cookie_params([
'lifetime' => (int) $settings['session_lifetime'],
'samesite' => $settings['samesite_cookie'],
]);
session_start();

$languages = [];
foreach (glob(\Aurora\Core\Helper::getPath('app/languages/*.php')) as $file) {
Expand All @@ -47,11 +41,13 @@ function setting(?string $key = null): mixed

$view = new \Aurora\Core\View(\Aurora\Core\Helper::getPath($kernel->config('views')), new \Aurora\App\ViewHelper($kernel->config('date_format'), $lang));

\Aurora\App\Permission::set($db->query('SELECT permission, role_level FROM roles_permissions ORDER BY permission')->fetchAll(\PDO::FETCH_KEY_PAIR), $_SESSION['user']['role'] ?? 0);
\Aurora\App\Permission::addMethod('impersonate', fn($user) => ($user['status'] ?? false) && $user['role'] <= ($_SESSION['user']['role'] ?? 0) && \Aurora\App\Permission::can('impersonate'));
\Aurora\App\Permission::addMethod('edit_user', fn($user) => ($user['role'] ?? 0) <= ($_SESSION['user']['role'] ?? 0) && \Aurora\App\Permission::can('edit_users'));
$user = &$GLOBALS['user'];
\Aurora\App\Permission::set($db->query('SELECT permission, role_level FROM roles_permissions ORDER BY permission')->fetchAll(\PDO::FETCH_KEY_PAIR), $user['role'] ?? 0);
\Aurora\App\Permission::addMethod('editUser', function ($subject) use (&$user) {
return \Aurora\App\Modules\User::canEdit($user, $subject);
});
\Aurora\App\Setting::set($settings);
\Aurora\App\Media::setDirectory($kernel->config('content'));

(require('routes.php'))($kernel, $db, $view, $lang);
(require('routes.php'))($kernel, $db, $view, $lang, $user);
};
Loading
Loading