Skip to content
Snippets Groups Projects
Commit 637ed2cf authored by Robin Korfmann's avatar Robin Korfmann
Browse files

Merge branch 'main' into 'development'

Main

See merge request !1
parents 4ccc346a 8b0aea27
Branches development
No related tags found
1 merge request!1Main
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"
[build]
args_bin = []
bin = "./tmp/web"
cmd = "go build -o ./tmp/web ./src/cmd/web/main.go"
delay = 500
exclude_dir = ["assets", "tmp", "vendor", "testdata", "docker"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html", "toml", "json"]
include_file = []
kill_delay = 10
log = "build-errors.log"
poll = false
poll_interval = 0
rerun = false
rerun_delay = 500
send_interrupt = false
stop_on_error = false
[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
main_only = false
time = false
[misc]
clean_on_exit = false
[screen]
clear_on_rebuild = false
keep_scroll = true
config/*.local.*
config/*.test.*
\ No newline at end of file
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
\ No newline at end of file
name: Go Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Cache Go modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: Run tests
run: go test -v ./...
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
# Go workspace file
go.work
var/
tmp/
# HARMONY specific
config/**/local/*
!config/**/local/.gitkeep
files/**/*
!files/.gitkeep
.idea
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch from Harmony Root",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "src/cmd/web/main.go",
"cwd": "C:/Users/PC/Documents/BA_PARIS_CODE/harmony",
"env": {
"PORT": "8080"
},
"args": []
}
]
}
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Dates are displayed in the format YYYY-MM-DD.
## [Unreleased]
## [0.1.0] - 2024-01-12
### Added
- Initial release of HARMONY & EIFFEL
- Default templates for PARIS (PAtterns for RequIrements Specification) by Oliver Linssen (see [README.md](README.md))
- EIFFEL ([app/eiffel](src/app/eiffel)) for requirements elicitation
- Functionality for creating, editing and deleting templates and template sets (for grouping templates)
- Functionality for OAuth 2.0 login with GitHub and Google
- Functionality for editing user information
- Main command for running the application as a web server
- Migrations command with initial migration for creating database schema
- Lots and lots of [core](src/core) functionality containing utilities
- Docker setup for production deployments
- HTMX and Bootstrap 5 for frontend
- Translations of the frontend to German and English
- Vendorized dependencies for Go backend (frontend is in public/assets)
HARMONY INSTALLATION
-IDE installieren (VS CODE), git bash
-Projekt klonen (git clone https://gitlab.reutlingen-university.de/abdic/harmony.git)
-GO Sprache installieren MSI
-env variables überprüfen wegen go Sprache
-vs code neu starten go version Befehl testen im Terminal
-mongo db community Edition installieren
-jetzt MongoDB Compass installieren
-bei Compass add new Connection Name: parisdb
-neue Datenbank erstellen Name: harmony Collection Name: requirements
-go run src/cmd/web/main.go im Terminal bei vs code testen es sollte Connected to MongoDB auftauchen
-postgres installieren
-Password: root
-port Default lassen 5432
-env variablen für postgres überprüfen
postgres Befehle:
psql -h localhost -U postgres
CREATE DATABASE harmony;
psql -h localhost -U postgres -d harmony
CREATE ROLE root WITH LOGIN PASSWORD 'root';
GRANT CONNECT ON DATABASE harmony TO root;
GRANT USAGE ON SCHEMA public TO root;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO root;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO root;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO root;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT USAGE, SELECT ON SEQUENCES TO root;
GRANT CREATE ON SCHEMA public TO root;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO root;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO root;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO root;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT USAGE, SELECT ON SEQUENCES TO root;
CREATE TABLE users
(
id UUID PRIMARY KEY,
email VARCHAR(255) NOT NULL UNIQUE,
firstname VARCHAR(255) NOT NULL,
lastname VARCHAR(255) NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT current_timestamp,
updated_at TIMESTAMPTZ
);
CREATE TABLE sessions
(
id UUID PRIMARY KEY,
type VARCHAR(255) NOT NULL,
payload JSONB NOT NULL,
meta JSONB,
created_at TIMESTAMPTZ NOT NULL DEFAULT current_timestamp,
expires_at TIMESTAMPTZ NOT NULL,
updated_at TIMESTAMPTZ
);
CREATE TABLE template_sets
(
id UUID PRIMARY KEY,
name VARCHAR(255) NOT NULL,
version VARCHAR(255) NOT NULL,
description TEXT,
created_by UUID NOT NULL REFERENCES users (id) ON DELETE CASCADE,
created_at TIMESTAMPTZ NOT NULL DEFAULT current_timestamp,
updated_at TIMESTAMPTZ
);
CREATE TABLE templates
(
id UUID PRIMARY KEY,
template_set UUID NOT NULL REFERENCES template_sets (id) ON DELETE CASCADE,
type VARCHAR(255) NOT NULL,
name VARCHAR(255) NOT NULL,
version VARCHAR(255) NOT NULL,
config JSONB NOT NULL,
created_by UUID NOT NULL REFERENCES users (id) ON DELETE CASCADE,
created_at TIMESTAMPTZ NOT NULL DEFAULT current_timestamp,
updated_at TIMESTAMPTZ
);
- go run src/cmd/web/main.go im VS CODE testen localhost:8080 aufrufen
LICENSE 0 → 100644
MIT License
Copyright (c) 2023 org-harmony
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# HARMONY-experimental-branch
# HARMONY & EIFFEL
Highly Adaptable Requirements Management and OrganizatioN sYstem - HARMONY
Elicitation Interface for eFFectivE Language - EIFFEL
HARMONY and EIFFEL were created as part of a research project.
The idea is to simplify the elicitation of requirements by using templates, by providing users with a way to enter
and validate template-based requirements more easily.
The requirement templates used here are based on the pattern language PARIS (PATTERNS FOR REQUIREMENTS
SPECIFICATION) by Prof. Dr. Oliver Linssen. The basics of PARIS are documented in:
## Getting started
Linssen, O. (2022). Anforderungen strukturiert mit Schablonen dokumentieren in PARIS. Fazal-Baqaie, M., Linssen
O., Volland, A., Yigitbas, E., Engstler, M., Bertram, M., Kalenborn, A. (Hrsg.): Projektmanagement und
Vorgehensmodelle 2022 (PVM 2022). Virtuelle Zusammenarbeit und verlorene Kulturen?, P-327, 109–140.
[https://www.researchgate.net/publication/363630019_Anforderungen_strukturiert_mit_Schablonen_dokumentieren_in_PARIS](https://www.researchgate.net/publication/363630019_Anforderungen_strukturiert_mit_Schablonen_dokumentieren_in_PARIS)
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Linssen, O. (2020). PARIS - Die Entwicklung einer Mustersprache zur Dokumentation von Anforderungen.
Rundbrief GI-Fachausschuß Management der Anwendungsentwicklung und -wartung, 26(44), 7–24.
[https://www.researchgate.net/publication/363631106_PARIS_-_Die_Entwicklung_einer_Mustersprache_zur_Dokumentation_von_Anforderungen](https://www.researchgate.net/publication/363631106_PARIS_-_Die_Entwicklung_einer_Mustersprache_zur_Dokumentation_von_Anforderungen)
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
However, the design supports various other templates. Templates can be defined with JSON configurations, examples
of already designed templates can be found in [docs/templates/](docs/templates/).
## Add your files
For reasons of data economy, HARMONY does not store requirements on the server.
Only templates and minimal user information to enable login are stored on the server.
All entered and checked requirements are stored locally in the browser.
These locally stored requirements can be deleted at any time.
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
The use of HARMONY and EIFFEL is at your own risk. The developers and operators assume no liability for
damages caused by the use of HARMONY and EIFFEL.
```
cd existing_repo
git remote add origin https://gitlab.reutlingen-university.de/korobc24/harmony-experimental-branch.git
git branch -M main
git push -uf origin main
```
HARMONY will be further expanded to meet more needs of requirements management.
Join us on this journey, whether you are a contributor, user or just a spectator!
## Integrate with your tools
The project and all participants are looking forward to your feedback, as we are continuously working to improve
HARMONY and EIFFEL. The project is in active development.
- [ ] [Set up project integrations](https://gitlab.reutlingen-university.de/korobc24/harmony-experimental-branch/-/settings/integrations)
---
## Collaborate with your team
For a simple development environment, consult [docker/dev](docker/dev/README.md).
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
enable_oauth2 = true
[provider.github]
enabled = true
name = "github"
display_name = "GitHub"
authorize_uri = "https://github.com/login/oauth/authorize"
access_token_uri = "https://github.com/login/oauth/access_token"
userinfo_uri = "https://api.github.com/user"
client_id = "Ov23liwqVDKeBaIHmBfZ"
client_secret = "513b5408f5d19e5bf30cef7201e25d1056923e4f"
scopes = ["read:user", "user:email"]
[provider.google]
enabled = false
name = "google"
display_name = "Google"
authorize_uri = "https://accounts.google.com/o/oauth2/v2/auth"
access_token_uri = "https://oauth2.googleapis.com/token"
userinfo_uri = "https://openidconnect.googleapis.com/v1/userinfo"
client_id = "[client_id]"
client_secret = "[client_secret]"
scopes = ["openid", "email", "profile"]
\ No newline at end of file
neglect_optional = true
\ No newline at end of file
[db]
name = "harmony_test"
[db]
host = "localhost"
port = "5432"
user = "root"
pass = "root"
name = "harmony"
ssl_mode = "disable"
max_conns = "100"
migrations_dir = "migrations"
translations_dir = "translations"
[locales.de]
path = "de"
name = "Deutsch"
default = true
[locales.en]
path = "en"
name = "English"
[server]
base_url = "http://localhost:8080"
address = ""
port = "8080"
[server.asset_fs]
root = "public/assets"
route = "/assets"
[ui]
assets_uri = "/assets"
[ui.templates]
dir = "templates"
base_dir = "templates/base"
\ No newline at end of file
# First stage: build the application
FROM golang:1.21.5-alpine3.18 as builder
WORKDIR /app
# Copy go.mod, go.sum and vendor directory
COPY go.mod go.sum ./
COPY vendor/ vendor/
# Copy the source code
COPY src/ src/
# Build the 'web' and 'migrate' executables
RUN CGO_ENABLED=0 GOOS=linux go build -o web src/cmd/web/*.go
RUN CGO_ENABLED=0 GOOS=linux go build -o migrate src/cmd/migrate/*.go
# Second stage: setup the runtime environment
FROM alpine:3.19
WORKDIR /app
# Copy the pre-built binary files from the previous stage
COPY --from=builder /app/web .
COPY --from=builder /app/migrate .
# Copy configuration files and directories
COPY config/ config/
COPY migrations/ migrations/
COPY public/ public/
COPY templates/ templates/
COPY translations/ translations/
COPY docs/templates/paris docs/templates/paris
# Set environment variables
ENV PORT 8213
# Expose the application on port 8213
EXPOSE 8213
# Command to run the 'web' executable
ENTRYPOINT ["./web"]
POSTGRES_PASSWORD = [CHOOSE A SECURE PASSWORD FOR POSTGRESQL DB]
BASE_URL = [URL TO HARMONY]
HTTP = [ HTTP ("http") or HTTPS ("https") ]
\ No newline at end of file
harmony/**
pg/**
.env
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment