Are you looking for a straightforward way to create and manage your online courses? Look no further! eCourse is a self-hosted Single Page Application (SPA) that empowers you to build engaging courses effortlessly. In this post, we will guide you through the setup process and provide troubleshooting tips to ensure your eCourse experience is smooth sailing.
Features of eCourse
- Create both video and text-based content
- Assign courses to specific users
- Track user progress seamlessly
Getting Started
Follow these steps to run the project locally:
- Clone or download the repository.
- Grab the PocketBase executable for your OS from PocketBase Docs and place it in the root of the
pbfolder. - Start the PocketBase server:
- Start the Vite server:
bash
cd pb
pocketbase serve
bash
cd ui
npm install
npm run dev
Customization Options
If you’d like to give eCourse a personal touch, you can modify the application name, logo, and colors by editing the customize.json file.
Deployment Steps
One of the advantages of using PocketBase is its ability to serve static frontend assets efficiently. Here’s how to do it:
- Add the server URL where your PocketBase instance is hosted to
VITE_PROD_PB_URLin the.envfile. - Build a production-ready bundle:
- Copy the contents of the
distfolder over topb_public.
bash
cd ui
npm run build
Using Docker
For those who prefer a containerized approach, you can automate the setup with the following Dockerfile:
dockerfile
FROM node:20.11.1-buster
WORKDIR /eCourse
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"]
Make sure to adjust the commands as needed to fit your environment!
Troubleshooting Common Issues
If you encounter any issues, here are some tips to troubleshoot:
- If the PocketBase server doesn’t start, double-check that you have the correct executable for your OS.
- If you face any errors while running
npm install, ensure that Node.js is properly installed. - Check your
.envfile settings. Verify theVITE_PROD_PB_URLis correctly set. - For any lingering doubts, refer to the documentation available on PocketBase Docs or visit the Svelte website for UI framework specifics.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.
Final Note
With eCourse, you can streamline course creation and management, giving you more time to focus on what matters—creating quality learning experiences. Happy teaching!

