eCourse is a self-hosted SPA designed to simplify course creation and management, some of the features include:
- ability to create video and text based content
- ability to assign courses to users
- ability to track users progress
Use the following credentials for testing the demo:
Username: ilyas
Password: ecourse123
UI Framework - Svelte
CSS - TailwindCSS
Icons - Iconify
Backend - PocketBase
Hosting - PocketHost
- Clone/download the repo.
- Ensure Docker is installed and running on your system.
- Start the development environment with Docker:
docker compose -f docker-compose.dev.yml up --build -dThis command will start both the PocketBase backend and the Vite development server for the frontend.
- Set the VITE_PROD_PB_URL in the .env file to the server URL where your PocketBase instance will be hosted.
- Build and deploy the project using Docker:
docker compose up --build -dThis will build and deploy both the backend and frontend using the production-ready settings.
If you prefer not to use Docker, you can manually deploy the application:
-
Clone/download the repo
-
Grab the PocketBase executable for your OS from: https://pocketbase.io/docs/ and drop it at the root of the
pbfolder. -
Start the PocketBase server
cd pb ./pocketbase serve- Start the Vite server
cd ui npm install && npm run devApp name, logo, and colors can be customized using the customize.json file.
One neat thing about PocketBase is that it can also serve our static frontend assets. to do that simply follow these steps:
-
Add the server URL where your PocketBase instance is hosted to
VITE_PROD_PB_URLin the.envfile -
Build a production-ready bundle
cd ui npm run build- Copy the contents of the
distfolder over topb_public
You can use the following Dockerfile to automate the steps above:
FROM node:20.11.1-buster WORKDIR / RUN git clone https://github.com/Ilyas-Codes/eCourse.git ARG PB_VERSION=0.21.3 ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip RUN unzip /tmp/pb.zip -d /eCourse/pb WORKDIR /eCourse/ui RUN sed -i 's/^VITE_PROD_PB_URL=.*/VITE_PROD_PB_URL=http:\/\/127.0.0.1:8090/' .env RUN npm install RUN npm run build RUN mv dist/* /eCourse/pb/pb_public EXPOSE 8090 CMD ["/eCourse/pb/pocketbase", "serve", "--http=0.0.0.0:8090"]Feel free to open an issue/PR if you find any bugs or want to request new features.
Licensed under the MIT License, Copyright © 2024