# КуСфера Server Backend


> [!TIP]
> This repository is branded for КуСфера.

This is the main repository of the КуСфера server.
It contains the golang codebase for the backend services.

## Getting Involved

The КуСфера server is released under [Apache 2.0](LICENSE).
The project is thrilled to receive contributions in all forms.
Start hacking now, there are many ways to get involved such as:

- Reporting issues or bugs
- Requesting features
- Writing documentation
- Writing code or extending tests
- Reviewing code

Every contribution is meaningful and appreciated!
Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) if you want to get started.

## Build КуСфера

To build the backend, follow these instructions:

Generate the assets needed by e.g., the web UI and the builtin IDP

``` console
make generate
```

Then compile the runtime binary

``` console
make -C qsfera build
```
That will produce the runtime binary. It can be started as a local test instance right away with a two step command:

```bash
qsfera/bin/qsfera init && qsfera/bin/qsfera server
```
This creates a server configuration (by default in `$HOME/.qsfera`) and starts the server.

For more setup and installation options consult the project documentation.

## Technology

Important information for contributors about the technology in use.

### Authentication

The КуСфера backend authenticates users via [OpenID Connect](https://openid.net/connect/) using either an external IdP like [Keycloak](https://www.keycloak.org/) or the embedded [LibreGraph Connect](https://github.com/libregraph/lico) identity provider.

### Database

The КуСфера backend does not use a database. It stores all data in the filesystem. By default, the root directory of the backend is `$HOME/.qsfera/`.

## Security

If you find a security-related issue, contact the project maintainers immediately.
