-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Add documentation using Docusaurus (#87)
* Initial commit * Initial commit * Recreate * Write the tech docs * Change package manager from npm to yarn * Test github action * Test on all branches * Test on all branches * specify branch * use yml arrray syntax * match all branches * match all branches * match all branches with */* * match all branches with */* without [] * match all branches with '*/*' * match all branches with aldi/* * Run only on main and staging branch
- Loading branch information
1 parent
4cbfea3
commit adf5755
Showing
35 changed files
with
8,259 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
# Contribute to Badaso | ||
|
||
Badaso is an open-source project administered by [uasoft](https://soft.uatech.co.id). We appreciate your interest and efforts to contribute to Badaso. | ||
|
||
All efforts to contribute are highly appreciated, we recommend you to talk to a maintainer prior to spending a lot of time making a pull request that may not align with the project roadmap. | ||
|
||
|
||
## Open Development & Community Driven | ||
|
||
Badaso is an open-source project. See the [license](https://github.com/uasoft-indonesia/badaso/blob/master/license) file for licensing information. All the work done is available on GitHub. | ||
|
||
The core team and the contributors send pull requests which go through the same validation process. | ||
|
||
|
||
## Feature Requests | ||
|
||
Feature Requests by the community are highly encouraged. Please feel free to submit your ides on [github discussion](https://github.com/uasoft-indonesia/badaso/discussions/categories/ideas) | ||
|
||
|
||
## Code of Conduct | ||
|
||
This project and everyone participating in it are governed by the [Badaso Code of Conduct](https://github.com/uasoft-indonesia/badaso/blob/main/code_of_conduct.md). By participating, you are expected to uphold this code. Please read the [full text](https://github.com/uasoft-indonesia/badaso/blob/main/code_of_conduct.md) so that you can read which actions may or may not be tolerated. | ||
|
||
|
||
## Bugs | ||
|
||
We are using [GitHub Issues](https://github.com/uasoft-indonesia/badaso-lms-module/issues) to manage our public bugs. We keep a close eye on this so before filing a new issue, try to make sure the problem does not already exist. | ||
|
||
--- | ||
|
||
## Before Submitting a Pull Request | ||
|
||
The core team will review your pull request and will either merge it, request changes to it, or close it. | ||
|
||
<!-- **Before submitting your pull request** make sure the following requirements are fulfilled: | ||
To do : complete this section --> | ||
|
||
|
||
## Contribution Prerequisites | ||
|
||
- You are familiar with Git. | ||
|
||
|
||
## Development Workflow | ||
|
||
Before developing Badaso, please get BADASO_LICENSE_KEY by register on <a href="https://badaso.uatech.co.id/" target="_blank">Badaso</a> or contact badaso core team. This key must be included in the laravel project's .env. | ||
Steps for registering and getting a license on Badaso Dashboard can be found on <a href="https://badaso-docs.uatech.co.id/docs/en/getting-started/installation/" target="_blank">Badaso Docs</a>. | ||
|
||
|
||
### Installation step | ||
|
||
After getting the license, you can proceed to Badaso installation. | ||
|
||
1. Clone badaso into Laravel project. Sample: | ||
```bash | ||
Root Laravel Project | ||
├─packages # new folder | ||
│ ├─badaso # new folder | ||
│ │ ├─lms-module # clone here | ||
│ │ ├─ilma-theme # clone here | ||
. . . | ||
``` | ||
|
||
2. cd into each directory, then clone the corresponding repository | ||
```bash | ||
# in lms-module folder | ||
git clone https://github.com/uasoft-indonesia/badaso-lms-module.git | ||
|
||
# in ilma-theme folder | ||
git clone https://github.com/uasoft-indonesia/badaso-ilma-module.git | ||
|
||
``` | ||
|
||
3. Add the following Badaso provider and JWT provider to ```/config/app.php```. | ||
```php | ||
"providers" => [ | ||
..., | ||
"Uasoft\\Badaso\\Theme\\LMSTheme\\Providers\\LMSThemeProvider", | ||
"Uasoft\\Badaso\\Module\\LMSModule\\Providers\\LMSModuleProvider", | ||
] | ||
``` | ||
|
||
3. Add the following to `composer.json`. | ||
```json | ||
"autoload": { | ||
"psr-4": { | ||
..., | ||
"Uasoft\\Badaso\\Theme\\LMSTheme\\": "package/badaso/ilma-theme/src/", | ||
"Uasoft\\Badaso\\Module\\LMSModule\\": "package/badaso/lms-module/src/", | ||
"Uasoft\\Badaso\\Module\\LMSModule\\Factories\\": "package/badaso/lms-module/src/Factories/", | ||
... | ||
} | ||
}, | ||
``` | ||
|
||
5. Copy required library from `packages/badaso/lms-module/composer.json` and `packages/badaso/ilma-module/composer.json` to `/composer.json` then run `composer install` | ||
|
||
6. Run the following commands to update dependencies in package.json and webpack. | ||
```bash | ||
php artisan badaso-lms-module:setup | ||
php artisan badaso-lms-theme:setup | ||
``` | ||
|
||
7. Run the following commands in sequence. | ||
```bash | ||
composer dump-autoload | ||
php artisan migrate | ||
``` | ||
|
||
8. Create an admin account by typing the following command. | ||
``` | ||
php artisan badaso:admin [email protected] --create | ||
``` | ||
|
||
9. Run the command `npm install` to install all of dependencies | ||
|
||
10. Run the backend application (the module) with `php artisan serve` or run in inside a docker container | ||
|
||
11. Run the frontend application (the theme) with `npx mix watch --hot` | ||
|
||
|
||
### Reporting an issue | ||
|
||
Before submitting an issue you need to make sure: | ||
|
||
- You are experiencing a concrete technical issue with Badaso. | ||
- You have already searched for related [issues](https://github.com/uasoft-indonesia/badaso-lms-module/issues), and found none open (if you found a related _closed_ issue, please link to it from your post). | ||
- You are not asking a question about how to use Badaso or about whether or not Badaso has a certain feature. For general help using Badaso, you may: | ||
- Refer to [the official Badaso documentation](https://badaso-docs.uatech.co.id). | ||
- Ask a question on [github discussion](https://github.com/uasoft-indonesia/badaso-lms-module/discussions). | ||
- Your issue title is concise, on-topic, and polite. | ||
- You provide steps to reproduce your issue. | ||
- You have tried all the following (if relevant) and your issue remains: | ||
- Make sure you have the right application started. | ||
- Make sure the [issue template](https://github.com/uasoft-indonesia/badaso/tree/main/.github/ISSUE_TEMPLATE) is respected. | ||
- Make sure your issue body is readable and [well formatted](https://guides.github.com/features/mastering-markdown). | ||
- Make sure the application you are using to reproduce the issue has a clean `node_modules` or `vendor` directory, meaning: | ||
- that you haven't made any inline changes to files in the `node_modules` or `vendor` folder | ||
- that you don't have any weird global dependency loops. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Core Concepts", | ||
"position": 3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Controller | ||
|
||
Badaso uses the regular controller just like standard Laravel application. Refer to the [Official Laravel Documentation](https://laravel.com/docs/master/controllers) to explore more about controller. These controllers are located in the `src/Controllers` folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Migration | ||
|
||
Badaso uses the regular migration just like standard Laravel application. Refer to the [Official Laravel Documentation](https://laravel.com/docs/master/migrations) to explore more about migration. These migrations are located in the `src/Migrations` folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Model | ||
|
||
Badaso uses the regular model just like standard Laravel application. Refer to the [Official Laravel Documentation](https://laravel.com/docs/master/eloquent) to explore more about model. These models are located in the `src/Models` folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Customization", | ||
"position": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Override Controller | ||
|
||
## Module | ||
To override the controller, you can follow the following steps: | ||
|
||
- Create a new controller by using below command. | ||
```bash | ||
php artisan make:controller ExampleController | ||
``` | ||
|
||
- After the new controller is created, you can override the controller by registering the controller in the `config/badaso-lms.php` file in `controllers` section. For example: | ||
```php | ||
return [ | ||
..., | ||
|
||
'controllers' => [ | ||
'ExampleController@browse' => 'App\Http\Controllers\ExampleController@browse', | ||
], | ||
]; | ||
``` | ||
|
||
- You can see the available keys of overrides in the `vendor/badaso/lms-module/src/Routes/api.php` file. | ||
|
||
|
||
## Theme | ||
To override the controller, you can follow the following steps: | ||
|
||
- Create a new controller by using below command. | ||
```bash | ||
php artisan make:controller ExampleController | ||
``` | ||
|
||
- After the new controller is created, you can override the controller by registering the controller in the `config/badaso-ilma-theme.php` file in `controllers` section. For example: | ||
```php | ||
return [ | ||
..., | ||
|
||
'controllers' => [ | ||
'ExampleController@browse' => 'App\Http\Controllers\ExampleController@browse', | ||
], | ||
]; | ||
``` | ||
|
||
- You can see the available keys of overrides in the `vendor/badaso/ilma-theme/src/Routes/web.php` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Override View | ||
|
||
To override the view, you can follow the following steps: | ||
|
||
- You must run the theme setup first by running the `php artisan badaso-ilma-theme:setup` command. | ||
|
||
- A folder named `ilma-theme` will be created in the `resources/js/badaso/theme` folder. | ||
|
||
- Inside the `ilma-theme` folder, there will be a folder named `pages`. Create a .vue file inside the `pages` folder with the same name as the page. For example, if you want to override the `home` page, you can create a `home.vue` file in the `pages` folder. | ||
|
||
- You can see the available page that can be overridden in the `vendor/badaso/ilma-theme/src/resources/app/pages/` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
sidebar_position: 5 | ||
slug: /deployment | ||
--- | ||
|
||
# Deployment | ||
|
||
As both `badaso-lms-module` and `badaso-ilma-theme` are just ordinary laravel packages, and to support the spirit of reusability, you can directly refer to the [Official Laravel Documentation](https://laravel.com/docs/master/deployment) to deploy your application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Getting Started", | ||
"position": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Installation | ||
|
||
## Module | ||
|
||
1. [Install badaso](https://badaso-docs.uatech.co.id/getting-started/installation) first. | ||
2. Make sure you already run the migration and badaso seeder, even if you're using docker. | ||
3. Run the following command to install badaso LMS module | ||
```bash | ||
# as of now, because all of our works are still in the staging branch, you have to add the `:dev-staging` | ||
composer require badaso/lms-module:dev-staging | ||
``` | ||
4. Run the following commands to finish the badaso LMS module setup | ||
```bash | ||
php artisan migrate | ||
php artisan badaso-lms-module:setup | ||
composer dump-autoload | ||
``` | ||
5. Make sure that all of the routes declared by badaso LMS module are already accessible. You can see the defined routes by running the following command | ||
```bash | ||
php artisan route:list | ||
``` | ||
If you see something similar to this line `POST badaso-api/module/lms/v1/auth/login`, that means you have successfully set up your badaso application. | ||
|
||
<!-- For badaso v2.x (Laravel 8) | ||
``` | ||
php artisan db:seed --class="Database\Seeders\Badaso\LMS\BadasoLMSModuleSeeder" | ||
``` | ||
For badaso v1.x (Laravel 5, 6, 7) | ||
``` | ||
php artisan db:seed --class=BadasoLMSModuleSeeder | ||
``` --> | ||
|
||
That's all, and you should be good to go! | ||
|
||
## Theme | ||
|
||
Badaso LMS also comes with a free-to-use open-source theme, called badaso-ilma-theme. You are free to use this theme, or you can also build your own theme to your liking. To use badaso-ilma-theme, do follow the following steps. | ||
|
||
1. Make sure you alerady have [badaso](https://github.com/uasoft-indonesia/badaso) and [badaso-lms-module](https://github.com/uasoft-indonesia/badaso-lms-module) installed. | ||
2. Install badaso-ilma-theme using the following command. | ||
```bash | ||
composer require badaso/ilma-theme | ||
``` | ||
3. Update the dependency by running | ||
```bash | ||
npm install | ||
``` | ||
3. Run the following command to setup the `badaso-content`. | ||
```bash | ||
php artisan badaso-content:setup | ||
``` | ||
4. Run the following command to migrate `badaso-content` table. | ||
```bash | ||
php artisan migrate | ||
``` | ||
|
||
5. Run the following command. | ||
```bash | ||
php artisan badaso-lms-theme:setup | ||
``` |
Oops, something went wrong.