A POC for Hybrid UniCourse Server.
- Ensure you have Docker installed.
- Clone this repository.
- Setup the environment variables in the
.envfile, see.env.examplefor reference. - Run
docker compose up -dto start the server.
When in production, we use
cloudflaredto proxy the traffic. You can configure it through the Cloudflare dashboard and decide which services to expose.
- Ensure you have Docker and VSCode installed.
- Clone this repository.
- Open the repository in VSCode, when prompted to open in a container, click "Reopen in Container".
- Wait for the container to build and start, it will take a while and install all the dependencies for you.
- Open a terminal in VSCode.
- Run
pnpm devto start the server in development mode. - Go to
http://localhost:5173/, you should see there are 0 courses, 0 posts, and 1 user. - You should also see a panel with title "Welcome aboard", this panel only appears for your first account (specifically, if these only 1 user in DB).
- Get started with entering usernames and roles, then you would be navigated to register page to complete the account information.
- Voilà, your first account is ready!
In case the above approach doesn't work, you can follow these instructions to create your account in DB.
- Go to
http://localhost:7474/, which is the database management interface. - Login as
neo4jwith passwordpassword. - In the browser view, click on the
*node labels to see the data in graph and see the invitation code owned by admin. - Then, you can use the invitation code to register your account in the realm website.
- Next, you can give yourself roles
Verified,CoursePacker,Moderatorby running queries like:
MATCH (u:User {username: "your_username"}) SET u:Verified- Remember to re-login to refresh the token.
- Now you can import some course packs and start using UniCourse Realm!