Closed stephan418 closed 1 year ago
Other assignees: @Flexla54
I'm not good at writing readme files as I myself do not know what I want out of them.
Maybe move this to Flexla54
Warning Uncharted territories ahead ⛵ This repostiory is part of the Detleph event management sytsem. If you want to deal with the server in isolation, this is the place for you. Otherwise, for installation instructions, guides and other general information, please visit the parent repository.
Detleph is a modern event management system built with extensibility, scalability and ease-of-use in mind. This repository contains all of the backend code, collectively called the Detleph server. It is the backbone of the system for storing, providing and managing all data related to your upcoming event(s).
The server is build as a monolithic app with cutting-edge technologies, using Node.js: Tech | Description |
---|---|
Fast JavaScript runtime | |
Simple, extensible web framework | |
JavaScript with syntax for types | |
Fully type-safe ORM | |
Relational database management system (main database) | |
Fast in-memory database (side database for OTPs, ...) | |
Docker for fast and reproducible deployments | |
For code hosting, collaboration, project planning and CI/CD | |
REST | The whole API is designed around the REST principles |
Note As this repository only contains the server, this guide is only concerned with setting up the server and the API (which cannot, or rather should not, be used by normal users)
For instrcutions on how to set up a fully working system, see the parent repository.
Going furhter, we will assume that you have access to a UNIX-like OS and bash, Git and Docker. If you do not have access to any of these, please see:
git clone --recursive https://github.com/detleph/server.git
.env
with the following contents 📁Please replace the text in angle braces (eg. <password>
) with your own values (eg. good?password
)
DATABASE_PASSWORD="<strong database password>"
PORT="3000"
DOMAIN="<server domain name>"
MAILPASSWORD="<strong mail server password>"
ALLOW_ORIGIN="*"
FRONTEND_MAIL_ENDPOINT="<link to be in verification email>"
For a detailed explanation of all these options (and some more), please visit the wiki (coming soon) 🧠
docker-compose up
The server should now be running on port 3000 (http://localhost:3000
)
For detailed API documentation and usage guides, please see the wiki (coming soon)
Firstly, we are very excited to welcome any contributions to our projects and help prospective open-sourcerers! 👥 To get started with developing for the server (along with references for all the tooling, configuration and development modes), please take a look at the DEVELOPMENT.md file in the repository
If you want to develop a feature and contribute it to the project, please check out our contributing guidelines and workflows in the CONTRIBUTING.md file
If you have any questions or issues, do not refrain from reaching out to us by opening an issue or reaching out to one of us (@stephan418, @Stefan-5422 or @Flexla54) directly 📫
If you have any issues, questions or impulses relating to the server, feel free to open an issue on this repository or by clicking here
The license for the server (most likely MIT) can be found in the LICENSE
file
We lots of amazing resources and projects graciously shared by the community in the development of this project:
@Stefan-5422
I'm not good at writing readme files as I myself do not know what I want out of them.
Maybe move this to Flexla54
Could you please add some paragraph on the email settings (and DNS records and so on)? or at least a link to a guide
The Detleph Server comes with configuration and scripts for easy local development and hot reloading. This files describes how to set up your local system to get the best experience when developing.
Warning The development script starts the server in a very insecure mode, exposes sensitive information stored in the database and disables a bunch of security features (such as password requirements for the databases), so it should never be used in any live environment accessible by untrusted actors.
Make sure you have all the prerequisites listed under the Dependencies section of the REAMDE.md file installed locally.
Note This step assumes that you just want to experiment with the server locally (without merging the changes into the upstream branch). If you want to submit a contribution, please create a fork as described in the CONTRIBUTING.md file under "Create a fork" and then proceed to the next step here.
git clone --recursive https://github.com/detleph/server.git
The server comes with a simple development script which sets up the docker environment for hot reloading: 🔥
./dev.sh
This should set up the local environment and restart the server when changes are detected.
If you start the ./dev.sh
script again after the server already has initialized once, it will ask you if you would like to recreate the server again. Genererally, you do not have to do this if the current configuration is working. If you, however, update the database schema or something similar, you will need to recreate both the server container and the other services if prompted.
-s
: Remove all prompts and start the server with the default settings (eg. without recreating the containers@Stefan-5422 Please have a look at this and move to Review after: https://github.com/detleph/server/issues/92#issuecomment-1214881615
Firstly, thank you a lot for engaging with the project and possibly even contributing. Please read through this file thoroughly before submitting code so that you are clear about what happens with your code after submitting.
As most projects, the Detleph team decided on some general guidelines to ensure code quality and readability.
Each change should conform to our styling guidlines (enforced through Prettier based on the configuration file .prettierrc located at the top-level of each repo (eg. this one)
If you do not have Prettier installed, you can easility insteall an extension for your code editor (The extension should automatically recognize our style guide). Alternatively, you can also run the "Format files using Prettier" workflow on your branch or just submit a Pull request and ask our team to format
Please keep general clean code principles in mind (such as DRY and YAGNI, expaling in this guide
Please also think about the security aspects of your changes: Does it disable or interfere with any of the security systems in place?, Does it ignore authorization?, ...
Also, importantly note that we of course review the code before merging, so if you do not wholly understand the code of others and its interactions with yours, that's not a problem at all.
Note As we are a fairly small team, all of these guidlines are rather "lax" and will of course be checked and possibly implemented by us when you open a pull requests so that the released version is rock solid ⛰
We organize all of our tasks in GitHub Project boards and issues. You can always take any issue or card that is not currently assigned to anyone. If you wish to be listed as the assignee, please just leave a comment on the issue. You can of course also always submit unsolicited changes!
In order to be able to edit the code in our projects, you will need to fork them. Please click on the "Fork" button in the repository in question and then clone and edit this one on your local machine. (Described in detail here)
Firstly, you of course have to write code (based on the projects above or your own idea).
Please commit regularly,. Small commits are much easier to handle than big commits. Also, please keep your commit message concise and, for bigger changes, list the changes and intentions behind them in the description (with 1 blank line between message and description, as stated in the first paragraph here
Warning If you contribute your code to our repository (which will be done by opening a pull request), you agree to publish your code under the terms of the MIT license. This is describe further in the Licensing section of this document.
If you have finished your contributions, please open a pull request to our repository.
Once we see a new contribution, we will have it go through the usual checks and, if everything goes to plan, merge it!
The projects in the Detleph organization are all licensed under the MIT license or a compatible license. Thereafter, "contribution" refers to source code or any other type of content submitted to us (the Detleph project team) by the means described below.
By opening a pull request containing your contribution, pushing your contribution to our repositories or otherwise contributing to the projects, you confirm that you are the author of the contribution and agree to the publication of your contribution under the terms of the MIT license, as found in our repositories in the LICENSE
file or under https://spdx.org/licenses/MIT.html.
Moving this to Review. Will add the part for configuring the DNS after taking another look at the proxying and other stuff so that I do not need to rewrite that part later.
Perfect, thx 👌
Please follow the instructions on the Insomnia Website and install the client.
git clone https://github.com/detleph/insomnia-config.git detleph-server-insomnia
https://docs.insomnia.rest/insomnia/import-export-data
Open the File and select from Design | Debug | Test
the Debug Tab in order to see the requests.
The server shoud have information for people who (somehow) happen to find the repo
Furhter info: https://dev.to/github/how-to-create-the-perfect-readme-for-your-open-source-project-1k69
As always, this should stay rather PII-free (so no constributors or production link or anything)
Files: