diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..24ada33
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+vendor
+node_modules
+.DS_Store
+composer.lock
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..6d95134
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,28 @@
+image: node:15.12-alpine3.13
+
+stages:
+ - test
+ - deploy
+
+test:
+ stage: test
+ script:
+ - cd website
+ - yarn install
+ - yarn build
+ rules:
+ - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
+
+pages:
+ stage: deploy
+ script:
+ - cd website
+ - yarn install
+ - yarn build
+ - mv ./build ../public
+ artifacts:
+ paths:
+ - public
+ rules:
+ - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
+
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..b55a6aa
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,49 @@
+{
+ "version": "1.0.0",
+ "name": "badaso/comfree-theme",
+ "description": "Official free theme for commerce module system on badaso",
+ "keywords": [
+ "laravel",
+ "admin",
+ "panel",
+ "dashboard",
+ "pwa",
+ "generator",
+ "blog",
+ "badaso",
+ "news"
+ ],
+ "license": "proprietary",
+ "homepage": "https://badaso.uatech.co.id/",
+ "support": {
+ "issues": "https://github.com/uasoft-indonesia/badaso-comfree-theme/issues",
+ "discussion": "https://github.com/uasoft-indonesia/badaso-comfree-theme/discussions",
+ "source": "https://github.com/uasoft-indonesia/badaso-comfree-theme"
+ },
+ "type": "library",
+ "require": {
+ "badaso/core": "^2.9",
+ "badaso/content-module": "^2.1.1",
+ "badaso/commerce-module": "dev-main"
+
+ },
+ "authors": [
+ {
+ "name": "UASOFT",
+ "email": "hello@uatech.co.id"
+ }
+ ],
+ "minimum-stability": "alpha",
+ "autoload": {
+ "psr-4": {
+ "Uasoft\\Badaso\\Theme\\ComfreeTheme\\": "src/"
+ }
+ },
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Uasoft\\Badaso\\Theme\\ComfreeTheme\\Providers\\ComfreeThemeServiceProvider"
+ ]
+ }
+ }
+}
diff --git a/src/ComfreeTheme.php b/src/ComfreeTheme.php
new file mode 100644
index 0000000..cfc681b
--- /dev/null
+++ b/src/ComfreeTheme.php
@@ -0,0 +1,7 @@
+file = app('files');
+ parent::__construct();
+ }
+
+ /**
+ * Execute the console command.
+ *
+ * @return mixed
+ */
+ public function handle()
+ {
+ $this->updatePackageJson();
+ $this->publishConfig();
+ $this->addingBadasoEnv();
+ $this->updateWebpackMix();
+ }
+
+ protected function publishConfig()
+ {
+ Artisan::call('vendor:publish', ['--tag' => 'BadasoComfreeTheme']);
+
+ $this->info('Badaso comfree theme provider published');
+ }
+
+ protected function checkExist($file, $search)
+ {
+ return $this->file->exists($file) && !Str::contains($this->file->get($file), $search);
+ }
+
+ protected function updateWebpackMix()
+ {
+ $mix_file = base_path('webpack.mix.js');
+ $search = 'Badaso Comfree Theme';
+
+ if ($this->checkExist($mix_file, $search)) {
+ $data =
+ <<<'EOT'
+
+ // Badaso Comfree Theme
+ mix.js("vendor/badaso/comfree-theme/src/resources/js/app.js", "public/js/comfree-theme.js")
+ .css("vendor/badaso/comfree-theme/src/resources/app/assets/css/style.css","public/css/comfree-theme.css",{},[
+ require("tailwindcss")('./tailwind-comfree.config.js'),
+ require("autoprefixer"),
+ ]
+ )
+ EOT;
+
+ $this->file->append($mix_file, $data);
+ }
+
+ $this->info('webpack.mix.js updated');
+ }
+
+ protected function envListUpload()
+ {
+ return [
+ 'COMFREE_THEME_PREFIX' => 'comfree',
+ ];
+ }
+
+ protected function addingBadasoEnv()
+ {
+ try {
+ $env_path = base_path('.env');
+
+ $env_file = file_get_contents($env_path);
+ $arr_env_file = explode("\n", $env_file);
+
+ $env_will_adding = $this->envListUpload();
+
+ $new_env_adding = [];
+ foreach ($env_will_adding as $key_add_env => $val_add_env) {
+ $status_adding = true;
+ foreach ($arr_env_file as $key_env_file => $val_env_file) {
+ $val_env_file = trim($val_env_file);
+ if (substr($val_env_file, 0, 1) != '#' && $val_env_file != '' && strstr($val_env_file, $key_add_env)) {
+ $status_adding = false;
+ break;
+ }
+ }
+ if ($status_adding) {
+ $new_env_adding[] = "{$key_add_env}={$val_add_env}";
+ }
+ }
+
+ foreach ($new_env_adding as $index_env_add => $val_env_add) {
+ $arr_env_file[] = $val_env_add;
+ }
+
+ $env_file = join("\n", $arr_env_file);
+ file_put_contents($env_path, $env_file);
+
+ $this->info('Adding badaso env');
+ } catch (\Exception $e) {
+ $this->error('Failed adding badaso env '.$e->getMessage());
+ }
+ }
+
+ protected function updatePackageJson()
+ {
+ $package_json = file_get_contents(base_path('package.json'));
+ $decoded_json = json_decode($package_json, true);
+
+ $decoded_json['dependencies']['daisyui'] = '^4.6.0';
+ $decoded_json['dependencies']['alpinejs'] = '^3.13.5';
+ $decoded_json['dependencies']['tailwindcss'] = '^3.4.1';
+ $decoded_json['dependencies']['@tailwindcss/aspect-ratio'] = '^0.4.2';
+ $encoded_json = json_encode($decoded_json, JSON_PRETTY_PRINT);
+ file_put_contents(base_path('package.json'), $encoded_json);
+
+ $this->info('package.json updated');
+ }
+}
diff --git a/src/Config/badaso-comfree-theme.php b/src/Config/badaso-comfree-theme.php
new file mode 100644
index 0000000..85f7887
--- /dev/null
+++ b/src/Config/badaso-comfree-theme.php
@@ -0,0 +1,10 @@
+ env('COMFREE_THEME_PREFIX'),
+
+ /**
+ * Overriding controllers.
+ */
+ 'controllers' => [],
+];
diff --git a/src/Controllers/Controller.php b/src/Controllers/Controller.php
new file mode 100644
index 0000000..5f0f505
--- /dev/null
+++ b/src/Controllers/Controller.php
@@ -0,0 +1,15 @@
+get();
+ foreach ($configurations as $key => $config) {
+ if ($config->key == 'comfreeThemeSiteTitle') {
+ $site_title = $config->value;
+ }
+ }
+
+ $title = (object)[
+ "siteTitle" => $site_title
+ ];
+ return $title;
+ }
+}
diff --git a/src/Helpers/Route.php b/src/Helpers/Route.php
new file mode 100644
index 0000000..bffa1f6
--- /dev/null
+++ b/src/Helpers/Route.php
@@ -0,0 +1,20 @@
+
+
+
+
diff --git a/src/Images/comfree-img/default-user.png b/src/Images/comfree-img/default-user.png
new file mode 100644
index 0000000..1a7962e
Binary files /dev/null and b/src/Images/comfree-img/default-user.png differ
diff --git a/src/Images/comfree-img/ecomhtml.svg b/src/Images/comfree-img/ecomhtml.svg
new file mode 100644
index 0000000..7b72aab
--- /dev/null
+++ b/src/Images/comfree-img/ecomhtml.svg
@@ -0,0 +1,9 @@
+
diff --git a/src/Images/comfree-img/favicon.png b/src/Images/comfree-img/favicon.png
new file mode 100644
index 0000000..fe60d4d
Binary files /dev/null and b/src/Images/comfree-img/favicon.png differ
diff --git a/src/Images/comfree-img/full-logo-badaso.png b/src/Images/comfree-img/full-logo-badaso.png
new file mode 100644
index 0000000..c2e79b8
Binary files /dev/null and b/src/Images/comfree-img/full-logo-badaso.png differ
diff --git a/src/Images/comfree-img/tailwindcss.svg b/src/Images/comfree-img/tailwindcss.svg
new file mode 100644
index 0000000..a2ff6c6
--- /dev/null
+++ b/src/Images/comfree-img/tailwindcss.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/Images/comfree-img/tailwindtemplates.svg b/src/Images/comfree-img/tailwindtemplates.svg
new file mode 100644
index 0000000..e8c34b1
--- /dev/null
+++ b/src/Images/comfree-img/tailwindtemplates.svg
@@ -0,0 +1,7 @@
+
diff --git a/src/Providers/ComfreeThemeServiceProvider.php b/src/Providers/ComfreeThemeServiceProvider.php
new file mode 100644
index 0000000..2fe7bd1
--- /dev/null
+++ b/src/Providers/ComfreeThemeServiceProvider.php
@@ -0,0 +1,63 @@
+alias('ComfreeTheme', FacadesComfreeTheme::class);
+
+ $this->app->singleton('badaso-comfree-theme', function () {
+ return new ComfreeTheme();
+ });
+
+ $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'badaso-comfree');
+ $this->loadViewsFrom(__DIR__.'/../resources/views', 'comfree-theme');
+ $this->loadRoutesFrom(__DIR__.'/../Routes/web.php');
+ $this->loadRoutesFrom(__DIR__ . '/../Routes/api.php');
+
+
+ $this->publishes([
+ __DIR__.'/../Seeder' => database_path('seeders/Badaso/Commerce/Theme/ComfreeTheme'),
+ __DIR__.'/../Config/badaso-comfree-theme.php' => config_path('badaso-comfree-theme.php'),
+ __DIR__.'/../Images/comfree-img/' => storage_path('app/public/photos/1'),
+ __DIR__.'/../resources/customization/' => resource_path('js/badaso/theme/comfree-theme/'),
+ __DIR__ . '/../Tailwind/' => base_path(),
+ ], 'BadasoComfreeTheme');
+
+ $this->publishes([
+ __DIR__.'/../resources/views' => resource_path('views/vendor/uasoft-indonesia/comfree-theme'),
+ ], 'BadasoComfreeThemeViews');
+ }
+
+ /**
+ * Register any application services.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ $this->registerConsoleCommands();
+ }
+
+ /**
+ * Register the commands accessible from the Console.
+ */
+ private function registerConsoleCommands()
+ {
+ $this->commands(ComfreeThemeSetup::class);
+ }
+}
diff --git a/src/Routes/api.php b/src/Routes/api.php
new file mode 100644
index 0000000..3d84896
--- /dev/null
+++ b/src/Routes/api.php
@@ -0,0 +1,20 @@
+ $api_route_prefix, 'as' => 'badaso.', 'middleware' => [ApiRequest::class]], function () {
+ Route::group(['prefix' => 'theme/comfree/v1'], function () {
+ Route::group(['prefix' => 'comfree'], function (){
+
+ });
+ });
+});
+
+
+
diff --git a/src/Routes/web.php b/src/Routes/web.php
new file mode 100644
index 0000000..5883fd5
--- /dev/null
+++ b/src/Routes/web.php
@@ -0,0 +1,16 @@
+as('badaso.comfree-theme.')
+ ->group(function () {
+ Route::get('/', [HomeController::class, 'index'])->name('home');
+ Route::get('/product-detail', [DetailController::class, 'index'])->name('product-detail');
+
+ });
+
diff --git a/src/Seeder/BadasoComfreeThemeSeeder.php b/src/Seeder/BadasoComfreeThemeSeeder.php
new file mode 100644
index 0000000..bed6bbe
--- /dev/null
+++ b/src/Seeder/BadasoComfreeThemeSeeder.php
@@ -0,0 +1,22 @@
+call(ComfreeThemeMenusSeeder::class);
+ $this->call(ComfreeThemeFixedMenuItemSeeder::class);
+ $this->call(ComfreeThemePermissionsSeeder::class);
+ $this->call(ComfreeThemeContentsSeeder::class);
+ $this->call(ComfreeThemeConfigurationsSeeder::class);
+ }
+}
diff --git a/src/Seeder/ComfreeThemeConfigurationsSeeder.php b/src/Seeder/ComfreeThemeConfigurationsSeeder.php
new file mode 100644
index 0000000..ac9846e
--- /dev/null
+++ b/src/Seeder/ComfreeThemeConfigurationsSeeder.php
@@ -0,0 +1,69 @@
+ [
+ 'key' => 'comfreeThemeSiteTitle',
+ 'display_name' => 'Site Title',
+ 'value' => 'Comfree Theme',
+ 'details' => '',
+ 'type' => 'text',
+ 'order' => 1,
+ 'group' => 'comfreeTheme',
+ 'can_delete' => 0,
+ ],
+ 1 => [
+ 'key' => 'comfreeThemeFavicon',
+ 'display_name' => 'Favicon Website',
+ 'value' => 'photos/1/favicon.png',
+ 'details' => '',
+ 'type' => 'upload_image',
+ 'order' => 2,
+ 'group' => 'comfreeTheme',
+ 'can_delete' => 0,
+ ],
+ 2 => [
+ 'key' => 'comfreeThemeNavbarIcon',
+ 'display_name' => 'Navbar Icon Theme',
+ 'value' => 'photos/1/full-logo-badaso.png',
+ 'details' => '',
+ 'type' => 'upload_image',
+ 'order' => 3,
+ 'group' => 'comfreeTheme',
+ 'can_delete' => 0,
+ ],
+
+ ];
+
+ foreach ($settings as $key => $value) {
+ Configuration::where('key', $value['key'])->delete();
+ Configuration::create($value);
+ }
+
+ DB::commit();
+ } catch (Exception $e) {
+ throw new Exception('Exception occur '.$e);
+ DB::rollBack();
+ }
+ }
+}
diff --git a/src/Seeder/ComfreeThemeContentsSeeder.php b/src/Seeder/ComfreeThemeContentsSeeder.php
new file mode 100644
index 0000000..9654869
--- /dev/null
+++ b/src/Seeder/ComfreeThemeContentsSeeder.php
@@ -0,0 +1,48 @@
+ [
+ 'slug' => 'comfree-theme',
+ 'label' => 'Comfree Theme',
+ 'value' =>
+ '{}',
+ 'created_at' => '2024-01-30 06:16:40',
+ 'updated_at' => '2024-01-31 06:25:22',
+ ],
+ ];
+
+
+
+ foreach ($contents as $key => $content) {
+ Content::where('slug', $content['slug'])->delete();
+ Content::create($content);
+ }
+
+ DB::commit();
+ } catch (Exception $e) {
+ \DB::rollBack();
+
+ throw new Exception('Exception occur ' . $e);
+ }
+ }
+}
diff --git a/src/Seeder/ComfreeThemeFixedMenuItemSeeder.php b/src/Seeder/ComfreeThemeFixedMenuItemSeeder.php
new file mode 100644
index 0000000..d74cf4d
--- /dev/null
+++ b/src/Seeder/ComfreeThemeFixedMenuItemSeeder.php
@@ -0,0 +1,59 @@
+firstOrFail()->id;
+ $menu_items = [
+ 0 => [
+ 'menu_id' => $menu_id,
+ 'title' => 'Configuration',
+ 'url' => '/comfree-theme-configuration',
+ 'target' => '_self',
+ 'icon_class' => 'settings',
+ 'color' => '',
+ 'parent_id' => null,
+ 'order' => 1,
+ 'permissions' => 'browse_comfree_theme_configuration',
+ ],
+ ];
+
+ $new_menu_items = [];
+ foreach ($menu_items as $key => $value) {
+ $menu_item = MenuItem::where('menu_id', $value['menu_id'])
+ ->where('url', $value['url'])
+ ->first();
+
+ if (isset($menu_item)) {
+ continue;
+ }
+
+ MenuItem::create($value);
+ }
+ } catch (Exception $e) {
+ throw new Exception('Exception occur '.$e);
+ DB::rollBack();
+ }
+
+ DB::commit();
+ }
+}
diff --git a/src/Seeder/ComfreeThemeMenusSeeder.php b/src/Seeder/ComfreeThemeMenusSeeder.php
new file mode 100644
index 0000000..0596902
--- /dev/null
+++ b/src/Seeder/ComfreeThemeMenusSeeder.php
@@ -0,0 +1,47 @@
+ [
+ 'key' => 'comfree-theme',
+ 'display_name' => 'Comfree Theme',
+ ],
+ ];
+
+ $new_menus = [];
+ foreach ($menus as $key => $value) {
+ $menu = Menu::where('key', $value['key'])->first();
+
+ if (isset($menu)) {
+ continue;
+ }
+ Menu::create($value);
+ }
+ } catch (Exception $e) {
+ throw new Exception('Exception occur '.$e);
+ DB::rollBack();
+ }
+
+ DB::commit();
+ }
+}
diff --git a/src/Seeder/ComfreeThemePermissionsSeeder.php b/src/Seeder/ComfreeThemePermissionsSeeder.php
new file mode 100644
index 0000000..1752f05
--- /dev/null
+++ b/src/Seeder/ComfreeThemePermissionsSeeder.php
@@ -0,0 +1,32 @@
+firstOrFail();
+
+ foreach ($keys as $key) {
+ $permission = Permission::firstOrCreate([
+ 'key' => $key,
+ 'table_name' => null,
+ ]);
+
+ $administrator->permissions()->attach($permission->id);
+ }
+ }
+}
diff --git a/src/Tailwind/tailwind-comfree.config.js b/src/Tailwind/tailwind-comfree.config.js
new file mode 100644
index 0000000..12dcb25
--- /dev/null
+++ b/src/Tailwind/tailwind-comfree.config.js
@@ -0,0 +1,48 @@
+module.exports = {
+ purge: ["./vendor/badaso/comfree-theme/src/resources/**/*.php"],
+ content: [],
+
+ plugins: [require("daisyui"), require("@tailwindcss/aspect-ratio")],
+ daisyui: {
+ themes: ["light", "cupcake"],
+ },
+ theme: {
+ extend: {
+ fontFamily: {
+ karla: "'Karla' , serif",
+ inter: "'Inter', sans-serif",
+ },
+ fontSize: {
+ s: ["12px", "14px"],
+ sm: ["14px", "20px"],
+ base: ["16px", "24px"],
+ lg: ["24px", "29px"],
+ xl: ["32px", "38px"],
+ },
+
+ colors: {
+ primary: "#06bbd3",
+ gray: {
+ 800: "#1f2937",
+ },
+ },
+ },
+ },
+ container: {
+ center: false,
+ screens: {
+ DEFAULT: "80%",
+ sm: "360px",
+ md: "768px",
+ lg: "1024px",
+ lx: "1200px",
+ },
+ },
+ variants: {
+ extend: {
+ brightness: ["hover", "focus"],
+ userSelect: ["responsive", "disabled"],
+ visibility: ["responsive", "hover", "group-hover"],
+ },
+ },
+};
diff --git a/src/resources/app/assets/css/style.css b/src/resources/app/assets/css/style.css
new file mode 100644
index 0000000..b5c61c9
--- /dev/null
+++ b/src/resources/app/assets/css/style.css
@@ -0,0 +1,3 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
diff --git a/src/resources/customization/pages/readme.md b/src/resources/customization/pages/readme.md
new file mode 100644
index 0000000..c1b098d
--- /dev/null
+++ b/src/resources/customization/pages/readme.md
@@ -0,0 +1 @@
+## Override Postfree Theme Pages
diff --git a/src/resources/js/api/index.js b/src/resources/js/api/index.js
new file mode 100644
index 0000000..56004c9
--- /dev/null
+++ b/src/resources/js/api/index.js
@@ -0,0 +1 @@
+export default {}
\ No newline at end of file
diff --git a/src/resources/js/app.js b/src/resources/js/app.js
new file mode 100644
index 0000000..ad204ba
--- /dev/null
+++ b/src/resources/js/app.js
@@ -0,0 +1,5 @@
+import Alpine from "alpinejs";
+
+
+window.Alpine = Alpine;
+Alpine.start();
diff --git a/src/resources/js/components/index.js b/src/resources/js/components/index.js
new file mode 100644
index 0000000..56004c9
--- /dev/null
+++ b/src/resources/js/components/index.js
@@ -0,0 +1 @@
+export default {}
\ No newline at end of file
diff --git a/src/resources/js/lang/index.js b/src/resources/js/lang/index.js
new file mode 100644
index 0000000..7355b1c
--- /dev/null
+++ b/src/resources/js/lang/index.js
@@ -0,0 +1,40 @@
+import _ from "lodash";
+
+let exported = {};
+let languages = [];
+
+// DYNAMIC IMPORT BADASO LANG
+try {
+ const modules = require.context("./modules", false, /\.js$/); //
+ modules.keys().forEach((fileName) => {
+ let property = fileName
+ .replace("./", "")
+ .replace(".js", "")
+ .replace(/([a-z])([A-Z])/g, "$1-$2") // get all lowercase letters that are near to uppercase ones
+ .replace(/[\s_]+/g, "-") // replace all spaces and low dash
+ .replace(/^\.\/_/, "")
+ .replace(/\.\w+$/, "")
+ .split("-")
+ .map((word, index) => {
+ if (index > 0) {
+ return word.charAt(0).toUpperCase() + word.slice(1);
+ } else {
+ return word;
+ }
+ })
+ .join("");
+
+ languages.push({
+ label: modules(fileName).label,
+ key: property,
+ });
+ exported[property] = modules(fileName).default;
+ });
+} catch (error) {
+ console.info("Failed to load badaso languages", error);
+}
+
+export default {
+ languages,
+ i18n: exported,
+};
\ No newline at end of file
diff --git a/src/resources/js/lang/modules/en.js b/src/resources/js/lang/modules/en.js
new file mode 100644
index 0000000..7a7315b
--- /dev/null
+++ b/src/resources/js/lang/modules/en.js
@@ -0,0 +1,3 @@
+export const label = "English";
+
+export default {}
\ No newline at end of file
diff --git a/src/resources/js/lang/modules/id.js b/src/resources/js/lang/modules/id.js
new file mode 100644
index 0000000..1e15d91
--- /dev/null
+++ b/src/resources/js/lang/modules/id.js
@@ -0,0 +1,3 @@
+export const label = "Indonesia";
+
+export default {}
\ No newline at end of file
diff --git a/src/resources/js/pages/configuration/browse.vue b/src/resources/js/pages/configuration/browse.vue
new file mode 100644
index 0000000..aca9334
--- /dev/null
+++ b/src/resources/js/pages/configuration/browse.vue
@@ -0,0 +1,409 @@
+
+
+
Berat | +Quality Control Specialist | +
SKU | +Desktop Support Technician | +
Kategori | +Tax Accountant | +