Learnwise is open source learning management system just like Udemy created with Laravel and Fastbootstrap.
This project inspired by: https://github.com/AntonioErdeljac/next13-lms-platform
- PHP >= 8.1
- Node.js >= 16.xx
- MySQL >= 8.1.0
-
Clone the repository:
git clone https://github.com/ahmadrosid/learnwise
-
Make a copy of the
.env
file:cp .env.example .env
-
Install PHP and Node.js dependencies:
composer install npm install # or yarn install # or pnpm install
-
Prepare an empty database and update the following environment variables in the
.env
file accordingly:DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=learnwise DB_USERNAME=root DB_PASSWORD=
-
We use Xendit as the payment gateway, and therefore, you'll need a Xendit account. If you haven't already, please create one and update these two variables in the
.env
file:XENDIT_SECRET_KEY= XENDIT_PUBLIC_KEY=
-
Perform database migration and key generation:
php artisan migrate php artisan key:generate
-
Finally, run the server:
npx concurrently "npm run dev" "php artisan serve"
-
After receiving a payment, certain updates are required. To accomplish this, you'll need to expose your local development server using services like expose or ngrok. Here's what you need to do:
-
For ngrok:
- Visit ngrok to create an account.
- Run the following commands to configure ngrok and share your local server:
ngrok config add-authtoken <your-token> ngrok http 8000
-
For expose:
- Visit expose to set up an account.
- Run the following command to share your local server:
expose share http://127.0.0.1:8000
Note: These are just a couple of options. There are other services available that can achieve the same purpose.
-
-
We use cloudinary to store the resources such as images and videos. Go ahead and set up an account if you haven't. Follow the instructions and adjust these variables accordingly,
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
PUBLIC_CLOUDINARY_IMAGE_URL=
PUBLIC_CLOUDINARY_VIDEO_URL=
- For security reason, we can create users with administrative privilige by running this command from the project root.
php artisan app:create-admin
then proceed with the prompt.