Quick Start

Setting up a dev environment

This is a guide to set up a dev environment for LearnHouse, it will guide you through the installation of the backend and the frontend.

Some parts are subject to automation in the future, making the process easier.

Backend configuration

Install Docker

To install Docker, follow the instructions for your operating system on the Docker website (opens in a new tab).

Get the repository

git clone https://github.com/learnhouse/learnhouse
cd learnhouse

Build & run the Backend

This will build & run the backend and the database docker images

docker-compose up -d

Enable install mode

You'll need to modify the config file to enable the install mode

./config/config.yaml
site_name: LearnHouse
site_description: LearnHouse is an open-source platform tailored for learning experiences.
contact_email: hi@learnhouse.app

general:
  development_mode: true
  install_mode: true

To learn more about Configuration options, please refer to the Configuration documentation

⚠️

If using LearnHouse in production, please set the install mode and development mode to false

Frontend configuration

Init the frontend

Go to the frontend folder

cd apps/web

This will install all the dependencies needed for the frontend, and for this you will need pnpm (opens in a new tab).

pnpm i

Add an .env file in the front folder with the following content

apps/web/.env
NEXT_PUBLIC_LEARNHOUSE_MULTI_ORG=false
NEXT_PUBLIC_LEARNHOUSE_DEFAULT_ORG=test
NEXT_PUBLIC_LEARNHOUSE_API_URL=http://localhost:1338/api/v1/
NEXT_PUBLIC_LEARNHOUSE_BACKEND_URL=http://localhost:1338/
NEXT_PUBLIC_LEARNHOUSE_DOMAIN=localhost:3000
⚠️
Setting MultiOrg to true won't work locally for now, please set it to false

To learn about Organizations Hosting modes, please refer to the Organization Hosting Modes documentation

Run the dev environment

pnpm run dev

Get to the install page

Go to http://localhost:3000/install (opens in a new tab)


Hello

Install LearnHouse

Go through the install process

Create your Organization, Account and roles.

Configure your Organization as the default one

You'll need to update the front env file to set your Organization as the default one, use the slug of your organization.

apps/web/.env
NEXT_PUBLIC_LEARNHOUSE_MULTI_ORG=false
NEXT_PUBLIC_LEARNHOUSE_DEFAULT_ORG=REPLACE_WITH_YOUR_ORG_SLUG
NEXT_PUBLIC_LEARNHOUSE_API_URL=http://localhost:1338/api/v1/
NEXT_PUBLIC_LEARNHOUSE_BACKEND_URL=http://localhost:1338/
NEXT_PUBLIC_LEARNHOUSE_DOMAIN=localhost:3000

Congratulations, you're done! 🎉

Visit the app at http://localhost:3000/ (opens in a new tab)