Skip to content

Commit

Permalink
Refractor
Browse files Browse the repository at this point in the history
  • Loading branch information
kr1sjanee committed Nov 25, 2024
1 parent 4694407 commit 4ffd845
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 26 deletions.
10 changes: 5 additions & 5 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
RewriteEngine On
RewriteBase /mmaos-sbs-buhi/
RewriteBase /sbs-aaaos-buhi/

# Exclude assets from rewrite rule
RewriteCond %{REQUEST_URI} !\.(css|js|svg|jpg|jpeg|png|gif|woff2|ico|ttf)$ [NC]

# Redirect all requests to index.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /mmaos-sbs-buhi/public/index.html [L]
RewriteRule ^(.*)$ /sbs-aaaos-buhi/public/index.html [L]

# Exclude the public and app directories from the rewrite rule
RewriteCond %{REQUEST_URI} !^/mmaos-sbs-buhi/public/
RewriteCond %{REQUEST_URI} !^/mmaos-sbs-buhi/app/
RewriteRule ^(.*)$ /mmaos-sbs-buhi/public/$1 [L]
RewriteCond %{REQUEST_URI} !^/sbs-aaaos-buhi/public/
RewriteCond %{REQUEST_URI} !^/sbs-aaaos-buhi/app/
RewriteRule ^(.*)$ /sbs-aaaos-buhi/public/$1 [L]
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# mmaos-sbs-buhi
# sbs-aaaos-buhi

Tabulation System for Ambassador and Ambassadress of Sports (Buhi)

Expand All @@ -14,15 +14,15 @@ Here are the steps to set up the development environment for this project:
2. Start Apache and MySQL through XAMPP if not already running.

3. Clone or download this repository to your XAMPP **htdocs** folder.
The final path should be `path_to/xampp/htdocs/mmaos-sbs-buhi`.
The final path should be `path_to/xampp/htdocs/sbs-aaaos-buhi`.

4. Copy [**`app/config/database.example.php`**](app/config/database.example.php)
to **`app/config/database.php`**, then modify the database connection settings in the new file.

5. Inside [phpMyAdmin](http://localhost/phpmyadmin),
create a MySQL database named `mmaos-sbs-buhi` and import [mmaos-sbs-buhi.sql](mmaos-sbs-buhi.sql) into it.
create a MySQL database named `sbs-aaaos-buhi` and import [sbs-aaaos-buhi.sql](sbs-aaaos-buhi.sql) into it.

6. Open the terminal and navigate to the project directory **mmaos-sbs-buhi**.
6. Open the terminal and navigate to the project directory **sbs-aaaos-buhi**.

7. Execute the following commands to install the required dependencies:
```sh
Expand All @@ -34,7 +34,7 @@ Here are the steps to set up the development environment for this project:
npm run dev
```

9. Open your web browser and access <http://localhost:5203/mmaos-sbs-buhi/> to view the application.
9. Open your web browser and access <http://localhost:5203/sbs-aaaos-buhi/> to view the application.


---
Expand All @@ -49,7 +49,7 @@ Before getting started, ensure that you have [**Composer**](https://getcomposer.
to **`tests/backend/config/test-database.php`**, then modify the database connection settings in the new file.

2. Inside [phpMyAdmin](http://localhost/phpmyadmin),
create a MySQL database named `test-mmaos-sbs-buhi` and import [mmaos-sbs-buhi.sql](mmaos-sbs-buhi.sql) into it.
create a MySQL database named `test-sbs-aaaos-buhi` and import [sbs-aaaos-buhi.sql](sbs-aaaos-buhi.sql) into it.

3. Run the following command to install the required dependencies.
```shell
Expand Down Expand Up @@ -92,15 +92,15 @@ Here's how to compile the project for production deployment:
npm run build
```

2. Access the application by visiting `http://[host_name]/mmaos-sbs-buhi`,
2. Access the application by visiting `http://[host_name]/sbs-aaaos-buhi`,
where `host_name` is the **IP address** or **host name** of the server in the network.
For example:
- <http://localhost/mmaos-sbs-buhi>
- <http://192.168.1.99/mmaos-sbs-buhi>
- <http://localhost/sbs-aaaos-buhi>
- <http://192.168.1.99/sbs-aaaos-buhi>


#### Admin Dashboard
Access the **admin dashboard** at <http://localhost/mmaos-sbs-buhi/app>.
Access the **admin dashboard** at <http://localhost/sbs-aaaos-buhi/app>.
The default ***username*** and ***password*** is `admin`.

#### Printing Results
Expand Down
2 changes: 1 addition & 1 deletion app/config/database.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'host' => 'localhost',
'user' => 'root',
'pass' => '',
'dbname' => 'mmaos-sbs-buhi'
'dbname' => 'sbs-aaaos-buhi'
];

$conn = new mysqli($config['host'], $config['user'], $config['pass'], $config['dbname']);
Expand Down
6 changes: 3 additions & 3 deletions app/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@


$routes = [
[ "name" => "Tabulation" , "route" => "/mmaos-sbs-buhi" ],
[ "name" => "Tabulation" , "route" => "/sbs-aaaos-buhi" ],
[ "name" => "CRUD" , "route" => "crud/competitions.php" ],
[ "name" => "User Assignments", "route" => "crud/assignment" ],
[ "name" => "Eliminations" , "route" => "crud/eliminations" ],
Expand Down Expand Up @@ -96,7 +96,7 @@
}

</style>
<title>mmaos-sbs-buhi</title>
<title>sbs-aaaos-buhi</title>
</head>
<body>

Expand All @@ -112,7 +112,7 @@
</defs>
<path fill="url(#grad1)" d="M8 16c3.314 0 6-2 6-5.5 0-1.5-.5-4-2.5-6 .25 1.5-1.25 2-1.25 2C11 4 9 .5 6 0c.357 2 .5 4-2 6-1.25 1-2 2.729-2 4.5C2 14 4.686 16 8 16Zm0-1c-1.657 0-3-1-3-2.75 0-.75.25-2 1.25-3C6.125 10 7 10.5 7 10.5c-.375-1.25.5-3.25 2-3.5-.179 1-.25 2 1 3 .625.5 1 1.364 1 2.25C11 14 9.657 15 8 15Z"/>
</svg>
<h1 class="fw-bold" >mmaos-sbs-buhi</h1>
<h1 class="fw-bold" >sbs-aaaos-buhi</h1>
<p class="fst-italic" >Ambassador and Ambassadress of Sports (Buhi)</p>
</div>

Expand Down
4 changes: 2 additions & 2 deletions mmaos-sbs-buhi.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SET time_zone = "+00:00";
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `mmaos-sbs-buhi`
-- Database: `sbs-aaaos-buhi`
--

-- --------------------------------------------------------
Expand Down Expand Up @@ -105,7 +105,7 @@ CREATE TABLE `competitions` (
--

INSERT INTO `competitions` (`id`, `slug`, `title`, `created_at`, `updated_at`) VALUES
(1, 'mmaos-sbs-buhi-2024', 'Ambassador and Ambassadress of Sports 2024', '2023-04-06 13:24:04', '2024-11-24 17:46:45');
(1, 'sbs-aaaos-buhi-2024', 'Ambassador and Ambassadress of Sports 2024', '2023-04-06 13:24:04', '2024-11-24 17:46:45');

-- --------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "mmaos-sbs-buhi",
"name": "sbs-aaaos-buhi",
"version": "0.0.0",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion tests/backend/config/test-database.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'host' => 'localhost',
'user' => 'root',
'pass' => '',
'dbname' => 'test-mmaos-sbs-buhi'
'dbname' => 'test-sbs-aaaos-buhi'
];

$conn = new mysqli($config['host'], $config['user'], $config['pass'], $config['dbname']);
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default ({mode}) => {
process.env = {...process.env, ...loadEnv(mode, process.cwd())};
const SKIP_BASE_PATH = process.env.VITE_SKIP_BASE_PATH;
if (SKIP_BASE_PATH === undefined || SKIP_BASE_PATH === 'false')
config.base = '/mmaos-sbs-buhi/';
config.base = '/sbs-aaaos-buhi/';

return defineConfig(config);
};

0 comments on commit 4ffd845

Please sign in to comment.