summaryrefslogtreecommitdiffstats
path: root/README.md
blob: f84c4c603ece97ccd18b6a2f6149458876405159 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Great Office

This codebase and all of its source code is licensed under the GNU General Public License v3.0, see [COPYING](COPYING) for more information.

## server

Contains an ASP.NET Core Web API project using the [ApiEndpoints](https://github.com/ardalis/ApiEndpoints) paradigm.

It handles all data operations (except administrative operations) for the platform.

To run it you need .NET 6 and a PostgreSQL instance.

### Environment

The server is configured through environments variables,
in development [user-secret](https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets) is a nifty tool.

All environment variables the server needs to function properly is specified
in [src/server/Data/Static/AppEnvironmentVariables.cs](./server/src/Data/Static/AppEnvironmentVariables.cs),w
at a bare minimum these variables needs to be set:

```
DB_HOST=<host>
DB_USER=<user>
DB_PASSWORD=<password>
DB_NAME=<schema>
```

### Building and Developing

To run the server in development mode use `dotnet run` (`dotnet watch` for hot-reloading).

To build the server locally use `dotnet build` or `dotnet build -c Release` for production builds.

## tests

Contains integration tests for the web-app, written in .NET and xunit with Playwright for browser mocking.

It automatically starts the server and expects the server to host the web-app at /index.html.

Use `dotnet run` to run the tests.

## apps/projects

The projects app is a svelte pwa that handles

- project management
- time tracking

## apps/web-shared

A source lib containing models, shared styles and shared components for all of great office's js clients/apps.