Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heusalagroup/hghs
Minimal Matrix HomeServer written in TypeScript
https://github.com/heusalagroup/hghs
matrix matrix-homeserver nodejs-server typescript
Last synced: about 1 month ago
JSON representation
Minimal Matrix HomeServer written in TypeScript
- Host: GitHub
- URL: https://github.com/heusalagroup/hghs
- Owner: heusalagroup
- License: mit
- Created: 2022-04-23T18:48:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-12T12:59:23.000Z (over 1 year ago)
- Last Synced: 2024-11-17T06:40:16.215Z (about 2 months ago)
- Topics: matrix, matrix-homeserver, nodejs-server, typescript
- Language: TypeScript
- Homepage:
- Size: 176 KB
- Stars: 33
- Watchers: 3
- Forks: 3
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-matrix - hghs - Lightweight (Servers / 2016)
README
# @heusalagroup/hghs
*HG HomeServer* ***will be*** a zero dep [Matrix.org](https://matrix.org) HomeServer
written in pure TypeScript.It's intended for special use cases when Matrix protocol is used as a backbone
for custom apps. For example, we use our
[MatrixCrudRepository](https://github.com/heusalagroup/fi.hg.matrix/blob/main/MatrixCrudRepository.ts)
as a persistent data store for our software. It's lightweight, minimal and for the moment isn't even planned to
support full Matrix spec. We might make `hghs` run on browser later; the client already does.It compiles as a single standalone JavaScript file. The only runtime dependency
is NodeJS.Our software is designed for scalable and fully managed serverless cloud
environments, e.g. where the software must spin up fast, can run concurrently,
and can be deployed without a downtime.Another intended use case for `hghs` is embedded devices (e.g. OpenWRT), for
example.It will only support [a subset of Matrix.org protocol](https://github.com/heusalagroup/hghs/issues/16)
that our software is using. However, we're happy to add more features for
commercial clients.### Test driven development
See [@heusalagroup/hshs-test](https://github.com/heusalagroup/hghs-test) for our
system tests.### Fetching source code
#### Fetching source code using SSH
```shell
git clone [email protected]:heusalagroup/hghs.git hghs
cd hghs
git submodule update --init --recursive
```#### Fetching source code using HTTP
Our code leans heavily on git submodules configured over ssh URLs. For http
access, you'll need to set up an override to use https instead:```shell
git config --global url.https://github.com/heusalagroup/.insteadOf [email protected]:heusalagroup/
```This will translate any use of `[email protected]:heusalagroup/REPO` to
`https://github.com/heusalagroup/REPO`.This setting can be removed using:
```shell
git config --unset --global url.https://github.com/heusalagroup/.insteadOf
```### Build docker containers
This is the easiest way to use the backend.
```
docker-compose build
```### Start Docker environment
```
export BACKEND_JWT_SECRET='secretJwtString123'
export BACKEND_INITIAL_USERS='app:p4sSw0rd123'
docker-compose up
```Once running, services will be available:
* http://localhost:8008 -- `hghs` Matrix.org Server
### Start the server in development mode
FIXME: This isn't working right now. Use production mode.
```
npm start
```### Build the server
```
npm run build
```### Start the server in production mode
```
npm run start-prod
```...and use `http://0.0.0.0:8008`