lotta-schule / lotta

Lotta Web Monorepo
https://lotta.schule
GNU Affero General Public License v3.0
4 stars 0 forks source link
nextjs react

Lotta

Lotta is a simple-to use platform aimed at schools. Its comprehensible interface makes it easy for students and teachers to create a sophisticated webpage for their school, providing articles, files, messages and media in access-controlled spaces.

See https://lotta.schule for more information.

The latest git tag is the currently deployed version that also runs unmodified on our infrastructure.

Components

Webapp

Location: apps/webapp

The Webapp is a NextJS app that serves the application. Its primary purpose is serving the frontend.

Core

Location: apps/core

The Core is a Phoenix app that serves the backend, handles authentication and authorization, data storage and retrieval, real-time notifications, and more. The boundary to the outside wolrd consists primarily of a GraphQL API.

Hubert

Location: libs/hubert

Hubert is our component library. See our storybook to get an overview over the available components.

Theme

Location: libs/theme

Here lies the definition and schema lotta uses for theming.

Storybook Hubert

Location: apps/storybook-hubert

The storybook project for hubert. It's just for illustration purposes and drives the storybook for hubert.

Storybook-Addon-Theme

Location: libs/storybook-addon-theme

A storybook-addon which allows editing the lotta theme in storybook

Development

For monorepo managing, we use nx.

Prerequisites

We know getting started is not very easy at this point, but it has not been a priority yet. If you are interested in contributing, or have any questions, feel free to reach out to us.

Commands

  1. Install the necessary dependencies. In the project's root folder, run:
pnpm install
  1. Make sure you have the necessary services running. If you have docker installed, you can start them with:
docker-compose -f apps/core-api/docker-compose.services.yml up -d
  1. Run all available tests (this will take a few minutes, depending on the machine you run it on):
pnpm test
  1. Run all available linters / typecheckers:
pnpm lint
pnpm typecheck
  1. Start the Development environment:
pnpm dev:full

This will start:

The easiest is to start by creating a new lotta tenant, or copying over the data from some prod or test system. As lotta recognizes its tenants via the host url, we suggest you use http://<tenant-slug>.local.lotta.schule:3000; It's pointed directly to your localhost, but with the extra of having a multitenant-capable hostname