-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
273 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,40 @@ | ||
NODE_ENV = development | ||
PORT = 3001 | ||
TZ=Europe/Amsterdam | ||
|
||
TYPEORM_CONNECTION = mysql | ||
TYPEORM_HOST = localhost | ||
TYPEORM_PORT = 5432 | ||
TYPEORM_DATABASE = crm | ||
TYPEORM_USERNAME = parelpracht | ||
TYPEORM_PASSWORD = | ||
TYPEORM_SYNCHRONIZE = true | ||
TYPEORM_LOGGING = false | ||
TYPEORM_MIGRATIONS = dist/migration/**/*.js | ||
TYPEORM_SUBSCRIBERS = dist/subscriber/**/*.js | ||
|
||
SESSION_SECRET = secret | ||
|
||
MAIL_HOST = | ||
MAIL_PORT = 465 | ||
MAIL_USER = | ||
MAIL_PASSWORD = | ||
MAIL_FROM = | ||
|
||
SERVER_HOST = http://localhost:3000 | ||
|
||
# If these environment variables are left empty, LDAP will be disabled | ||
LDAP_URL = | ||
LDAP_BINDDN = | ||
LDAP_BINDCREDENTIALS = | ||
LDAP_SEARCHBASE = | ||
LDAP_SEARCHFILTER = | ||
|
||
# The following environment variables are used by the DirectMail plugin | ||
# This is optional and thus these variables can be removed (if not used) | ||
DIRECTMAIL_URL= | ||
DIRECTMAIL_USERNAME=parelpracht | ||
DIRECTMAIL_PASSWORD= | ||
DIRECTMAIL_PRODUCT_ID= | ||
NODE_ENV = development | ||
PORT = 3001 | ||
TZ=Europe/Amsterdam | ||
|
||
TYPEORM_CONNECTION = mysql | ||
TYPEORM_HOST = 127.0.0.1 | ||
TYPEORM_PORT = 3306 | ||
TYPEORM_DATABASE = parelpracht | ||
TYPEORM_USERNAME = root | ||
TYPEORM_PASSWORD = parelpracht | ||
TYPEORM_SYNCHRONIZE = true | ||
TYPEORM_LOGGING = false | ||
TYPEORM_MIGRATIONS = dist/migration/**/*.js | ||
TYPEORM_SUBSCRIBERS = dist/subscriber/**/*.js | ||
TYPEORM_SSL_ENABLED = false | ||
TYPEORM_SSL_CACERTS = /etc/ssl/certs/ca-certificates.crt | ||
|
||
SESSION_SECRET = secret | ||
|
||
MAIL_HOST = | ||
MAIL_PORT = 465 | ||
MAIL_USER = | ||
MAIL_PASSWORD = | ||
MAIL_FROM = | ||
|
||
SERVER_HOST = http://localhost:3000 | ||
|
||
# If these environment variables are left empty, LDAP will be disabled | ||
LDAP_URL = | ||
LDAP_BINDDN = | ||
LDAP_BINDCREDENTIALS = | ||
LDAP_SEARCHBASE = | ||
LDAP_SEARCHFILTER = | ||
|
||
# The following environment variables are used by the DirectMail plugin | ||
# This is optional and thus these variables can be removed (if not used) | ||
DIRECTMAIL_URL= | ||
DIRECTMAIL_USERNAME=parelpracht | ||
DIRECTMAIL_PASSWORD= | ||
DIRECTMAIL_PRODUCT_ID= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,48 @@ | ||
<h1 style="text-align: center"> | ||
<img alt="" src="https://raw.githubusercontent.com/GEWIS/parelpracht-client/develop/public/ParelPracht-blacksvg.svg?raw=true" style="width: 25%"> | ||
<br> | ||
ParelPracht | ||
</h1> | ||
|
||
ParelPracht is the successor of Goudglans, the custom Customer Relation Management system of Study Association GEWIS. | ||
This new system is built during the second lockdown of the corona pandemic. | ||
Its main goal is to automate tedious tasks and to keep a clear and concise overview of the current collaborations. | ||
This is achieved by creating nice structured insights tables and graphs and automating the generation of contracts, proposals and invoices. | ||
|
||
This is the back-end of ParelPracht. [The front-end can be found here](https://github.com/GEWIS/parelpracht-client). | ||
|
||
## Installation | ||
1. Clone the repository. | ||
2. Run `npm install`. | ||
3. Copy `.env.example` to `.env` and fill / replace the keys with their corresponding values. Note that the email-keys | ||
are important to be able to install the application (see step 5). | ||
4. Run `npm run dev`. This runs the client in development mode. Node will bind to port `3001`. You can find the API | ||
documentation at [http://localhost:3001/api/swagger-ui/](http://localhost:3001/api/swagger-ui/). | ||
5. Make a POST-request to `/v1/setup` with your credentials. The required payload can be found in the Swagger | ||
documentation. This request will create a local administrator account with the given credentials. You will receive an | ||
email (on the given address via the given mail server at step 3) to set your password. | ||
6. In the `VAT` table, add the desired VAT categories and percentages. | ||
|
||
You can also build the application with `npm run build`. This puts a production build in the `./build` directory. | ||
|
||
## Deployment | ||
1. Clone the repository in a folder called `parelpracht-client` and clone the backend repository in a folder called `parelpracht-server`. Make sure that both folders are in the same parent folder. | ||
2. Change the image locations to the correct locations in `docker-compose.yml` (for both the frontend and backend). | ||
3. Fill in the correct (environment) variables in `docker-compose.yml`. | ||
4. Run `docker-compose` in `./parelpracht-client`. | ||
|
||
## Copyright | ||
|
||
Copyright © 2022 The 39th board of GEWIS - Some rights reserved. Created by Roy Kakkenberg, Koen de Nooij, Jealy van den | ||
Aker, Max Opperman, Wouter van der Heijden en Irne Verwijst. You can use our software freely within the limits of | ||
our license. However, we worked very hard on this project and invested a lot of time in it, so we ask you to leave our | ||
copyright mark in place when modifying our software. Of course, you are free to add your own. | ||
|
||
## License | ||
[GNU AGPLv3](./LICENSE) | ||
|
||
|
||
<h1 style="text-align: center"> | ||
<img alt="" src="https://raw.githubusercontent.com/GEWIS/parelpracht-client/develop/public/ParelPracht-blacksvg.svg?raw=true" style="width: 25%"> | ||
<br> | ||
ParelPracht | ||
</h1> | ||
|
||
ParelPracht is the successor of Goudglans, the custom Customer Relation | ||
Management system of Study Association GEWIS. This new system is built during | ||
the second lockdown of the corona pandemic. Its main goal is to automate tedious | ||
tasks and to keep a clear and concise overview of the current collaborations. | ||
This is achieved by creating nice structured insights tables and graphs and | ||
automating the generation of contracts, proposals and invoices. | ||
|
||
This is the back-end of ParelPracht. The front-end can be found [here](https://github.com/GEWIS/parelpracht-client). | ||
|
||
## Development | ||
1. Clone the repository with `git clone [email protected]:GEWIS/parelpracht-server` | ||
2. Install the dependencies with `npm install`. | ||
3. Copy `.env.example` to `.env` and add the remaining environment variables. | ||
4. Start the application with `npm run dev` | ||
|
||
It is suggested to use a local MariaDB instance. If you do not have a local | ||
instance, you can use the docker compose file: `docker compose -f | ||
docker-compose-mariadb.yaml up -d`. The environment variables in the | ||
`.env.example` are adjusted to use this container configuration. | ||
|
||
## Setup | ||
When running the application, you will first need to create a superuser. This is | ||
done with the `/setup` endpoint. | ||
|
||
1. Go to the [swagger docs](http://localhost:3001/api/swagger-ui/). | ||
2. Navigate to `/setup` endpoint, and fill out the data for the request. | ||
3. Check the console for the confirmation link. | ||
|
||
Note: the confirmation link will only be logged in development mode. In | ||
production, an actual mail will be send with the confirmation link to the | ||
indicated email address. | ||
|
||
## Copyright | ||
Copyright © 2022 The 39th board of GEWIS - Some rights reserved. Created by Roy | ||
Kakkenberg, Koen de Nooij, Jealy van den Aker, Max Opperman, Wouter van der | ||
Heijden en Irne Verwijst. You can use our software freely within the limits of | ||
our license. However, we worked very hard on this project and invested a lot of | ||
time in it, so we ask you to leave our copyright mark in place when modifying | ||
our software. Of course, you are free to add your own. | ||
|
||
## License | ||
[GNU AGPLv3](./LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
services: | ||
mariadb: | ||
image: mariadb:latest | ||
container_name: mariadb | ||
environment: | ||
MARIADB_ROOT_PASSWORD: parelpracht | ||
MARIADB_DATABASE: parelpracht | ||
ports: | ||
- "3306:3306" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.