Giter Club home page Giter Club logo

groupware's Introduction

Groupware

A reference implementation that combines some best practices for building a modern web application.

Features

  • nix-shell bases development environment
  • e2e-Tests with Cypress
  • asynchronous processing of incoming webhooks

Installation

Prerequisites

  1. Install Nix

Setup

  1. Clone this repository
  2. Run nix-shell in the root directory of this repository
  3. Run just setup
  4. Run just start
  5. Open http://localhost:8000

groupware's People

Contributors

renovate[bot] avatar pheller24 avatar hellpat avatar

Stargazers

 avatar  avatar

Watchers

Lucian avatar  avatar

groupware's Issues

add more ci-checks

vendor/bin/parallel-lint src public migrations config XDEBUG_MODE=off bin/composer-require-checker --no-interaction --config-file=$PWD/composer-require-checker.json vendor/bin/config-transformer --dry-run bin/console debug:translation --all --only-missing en vendor/bin/rector --dry-run vendor/bin/phpstan -v --memory-limit=1G {{ if output == "github" { "--error-format=github" } else { "" } }} cd .. && pnpm spectral lint openapi.yaml {{ if output == "github" { "--format=github-actions" } else { "" } }


# TODO: add more ci-checks
# vendor/bin/parallel-lint src public migrations config
# XDEBUG_MODE=off bin/composer-require-checker --no-interaction --config-file=$PWD/composer-require-checker.json
# vendor/bin/config-transformer --dry-run
# bin/console debug:translation --all --only-missing en
# vendor/bin/rector --dry-run


This issue was generated by todo-issue based on a TODO comment in e932822. It's been assigned to @HellPat because they committed the code.

move secret to a vault

groupware/shell.nix

Lines 64 to 69 in 539d29f

# TODO: move secret to a vault
export STRIPE_API_KEY=sk_test_51IHFU3H5sb6o9949VJorc2HKKiXJ8Q5gh4cSKrRrvHmu2FRVoIYoHxygkUEji2WgKFgVpmYxHnV7WDjRLm3sUyIx00HIEjLSeh
source .env
redis-server -v
mysql --version
git --version


This issue was generated by todo-issue based on a TODO comment in 539d29f. It's been assigned to @HellPat because they committed the code.

rethink limits and restarts.

I set a time limit and a limit of jobs to process, to easy using xdebug. Xdebug listening must be started in the IDE, and the long running process must be restarted to take effect.


groupware/devenv.nix

Lines 99 to 104 in ff1a060

# TODO: rethink limits and restarts.
# I set a time limit and a limit of jobs to process, to easy using xdebug.
# Xdebug listening must be started in the IDE, and the long running process must be restarted to take effect.
symfony-message-consumer.exec = "symfony run --watch=config,src,vendor bin/console messenger:consume async --limit=10 --time-limit=300 --no-interaction -vv";
stripe.exec = "stripe listen --skip-verify --forward-to localhost:8000/webhook/stripe";
tailwindcss.exec = "tailwindcss -i assets/styles/app.css -o assets/styles/app.tailwind.css --watch";


This issue was generated by todo-issue based on a TODO comment in ff1a060.

consider handlers that modify state outside the database.

e.g. what happens when a handler updates a search index etc...


* TODO: consider handlers that modify state outside the database.
* e.g. what happens when a handler updates a search index etc...
*/
$this->connection->transactional(function () use ($event, $handlers) {
foreach ($handlers as $handler) {
$handler->handleStripeEvent($event);


This issue was generated by todo-issue based on a TODO comment in 7b764c2. It's been assigned to @HellPat because they committed the code.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • Update dependency baldinof/roadrunner-bundle to v3.1.2
  • Update symfony packages (symfony/asset, symfony/asset-mapper, symfony/browser-kit, symfony/console, symfony/css-selector, symfony/debug-bundle, symfony/doctrine-messenger, symfony/dotenv, symfony/expression-language, symfony/form, symfony/framework-bundle, symfony/http-client, symfony/intl, symfony/mailer, symfony/maker-bundle, symfony/mime, symfony/notifier, symfony/phpunit-bridge, symfony/process, symfony/property-access, symfony/property-info, symfony/redis-messenger, symfony/runtime, symfony/security-bundle, symfony/serializer, symfony/stimulus-bundle, symfony/stopwatch, symfony/string, symfony/translation, symfony/twig-bundle, symfony/uid, symfony/ux-turbo, symfony/validator, symfony/web-link, symfony/web-profiler-bundle, symfony/yaml)

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

composer
composer.json
  • php 8.3.*
  • azjezz/psl ^2.9
  • baldinof/roadrunner-bundle ^3.0
  • doctrine/doctrine-bundle ^2.11
  • doctrine/doctrine-migrations-bundle ^3.3
  • doctrine/orm ^3.0
  • knplabs/knp-menu-bundle ^3.3
  • moneyphp/money ^4.3
  • phpdocumentor/reflection-docblock ^5.3
  • phpstan/phpdoc-parser ^1.25
  • stripe/stripe-php ^15.0
  • symfony/asset 7.0.*
  • symfony/asset-mapper 7.0.*
  • symfony/console 7.0.*
  • symfony/doctrine-messenger 7.0.*
  • symfony/dotenv 7.0.*
  • symfony/expression-language 7.0.*
  • symfony/flex ^2
  • symfony/form 7.0.*
  • symfony/framework-bundle 7.0.*
  • symfony/http-client 7.0.*
  • symfony/intl 7.0.*
  • symfony/mailer 7.0.*
  • symfony/mime 7.0.*
  • symfony/monolog-bundle ^3.0
  • symfony/notifier 7.0.*
  • symfony/process 7.0.*
  • symfony/property-access 7.0.*
  • symfony/property-info 7.0.*
  • symfony/redis-messenger 7.0.*
  • symfony/runtime 7.0.*
  • symfony/security-bundle 7.0.*
  • symfony/serializer 7.0.*
  • symfony/stimulus-bundle ^2.13
  • symfony/string 7.0.*
  • symfony/translation 7.0.*
  • symfony/twig-bundle 7.0.*
  • symfony/uid 7.0.*
  • symfony/ux-turbo ^2.13
  • symfony/validator 7.0.*
  • symfony/web-link 7.0.*
  • symfony/yaml 7.0.*
  • twig/extra-bundle ^2.12|^3.0
  • twig/twig ^2.12|^3.0
  • php-parallel-lint/php-console-highlighter ^1.0
  • php-parallel-lint/php-parallel-lint ^1.3
  • phpstan/phpstan ^1.10
  • phpunit/phpunit ^10.0
  • psalm/plugin-symfony ^5.1
  • rector/rector ^1.0.0
  • symfony/browser-kit 7.0.*
  • symfony/css-selector 7.0.*
  • symfony/debug-bundle 7.0.*
  • symfony/maker-bundle ^1.0
  • symfony/phpunit-bridge ^7.0
  • symfony/stopwatch 7.0.*
  • symfony/web-profiler-bundle 7.0.*
  • symplify/easy-coding-standard ^12.1
  • vimeo/psalm ^5.18
github-actions
.github/workflows/comment_composer_changes.yaml
  • actions/checkout v4
  • WyriHaximus/github-action-composer.lock-diff v2
.github/workflows/issues_from_todo.yaml
  • actions/checkout v4
.github/workflows/main.yaml
  • actions/checkout v4
  • cachix/install-nix-action v27
  • actions/checkout v4
  • cachix/install-nix-action v27
  • actions/checkout v4
  • cachix/install-nix-action v27
  • pnpm/action-setup v2
  • cypress-io/github-action v6
npm
package.json
  • cypress ^13.6.3
  • cypress-recurse ^1.35.2
  • prettier 3.3.3
  • stripe ^16.0.0
  • ulid ^2.3.0
  • pnpm 9.6.0

  • Check this box to trigger a request for Renovate to run again on this repository

Try out multiple handlers for RemoteEvent

Exceptions handling affects other handlers When one handler throws recoverable / unrecoverable exception all handlers are affected by the decision. We should probably catch the exception and continue with the next handler.


// TODO: Try out multiple handlers for RemoteEvent
// Exceptions handling affects other handlers
// When one handler throws recoverable / unrecoverable exception
// all handlers are affected by the decision.
// We should probably catch the exception and continue with the next handler.
$handler->handleStripeEvent($event);


This issue was generated by todo-issue based on a TODO comment in 15b81ef. It's been assigned to @HellPat because they committed the code.

cache the build

# TODO: cache the build
- shell: nix-shell --pure --run "bash -euxo pipefail {0}"
run: |
# TODO: cache composer dependencies
# TODO: check why --ignore-platform-req=ext-redis is needed
composer install --ignore-platform-req=ext-redis


This issue was generated by todo-issue based on a TODO comment in 4bb8f5b. It's been assigned to @HellPat because they committed the code.

handle dependencies between services by using a wait-for.sh script.

groupware/Procfile

Lines 1 to 6 in 1c12631

# TODO: handle dependencies between services by using a wait-for.sh script.
mysql: mysqld --datadir=${MYSQL_DATADIR} --init-file=${MYSQL_HOME}/init.sql --skip-networking
redis: redis-server storage/redis/redis.conf
symfony: rr serve -p -c .rr.dev.yaml --debug


This issue was generated by todo-issue based on a TODO comment in 1c12631. It's been assigned to @HellPat because they committed the code.

move hard coded paths to env vars, envsubst or smth

# TODO: move hard coded paths to env vars, envsubst or smth
dir /home/pheller/Code/groupware/storage/redis/data
pidfile /home/pheller/Code/groupware/.redis.pid
unixsocket /home/pheller/Code/groupware/.redis.sock
# Disable tcp, since we're only using the socket


This issue was generated by todo-issue based on a TODO comment in 1c12631. It's been assigned to @HellPat because they committed the code.

rethink limits and restarts, when code changes, the process must be restarted.

groupware/Procfile

Lines 7 to 12 in b603c25

# TODO: rethink limits and restarts, when code changes, the process must be restarted.
# I set a time limit and a limit of jobs to process, to easy using xdebug.
# Xdebug listening must be started in the IDE, and the long running process must be restarted to take effect.
symfony-message-consumer: bin/console messenger:consume async --no-interaction -vv
stripe: stripe listen --skip-verify --forward-to localhost:8000/webhook/stripe


This issue was generated by todo-issue based on a TODO comment in b603c25. It's been assigned to @HellPat because they committed the code.

cache composer dependencies

TODO: check why --ignore-platform-req=ext-redis is needed


# TODO: cache composer dependencies
# TODO: check why --ignore-platform-req=ext-redis is needed
composer install --ignore-platform-req=ext-redis
XDEBUG_MODE=coverage vendor/bin/phpunit --order-by=random --stop-on-error --stop-on-failure


This issue was generated by todo-issue based on a TODO comment in 4bb8f5b. It's been assigned to @HellPat because they committed the code.

this works but it's not ideal.

The file is overwritten every time the command is run, we should instead add or replace only the STRIPE_SIGNING_SECRET line.


groupware/devenv.nix

Lines 91 to 96 in ff1a060

# TODO: this works but it's not ideal.
# The file is overwritten every time the command is run,
# we should instead add or replace only the STRIPE_SIGNING_SECRET line.
#
# An other solution could be, to use an API-Token instead.
process.before = "echo \"STRIPE_SIGNING_SECRET=$(stripe listen --print-secret)\" > .env.local";


This issue was generated by todo-issue based on a TODO comment in ff1a060.

Run an own nix-shell to avoid limitations.

I want to have the env versioned, but run the processes manually, to profit from the plain documentations of the tools.


groupware/devenv.nix

Lines 3 to 8 in 23c2eb3

# TODO: Run an own nix-shell to avoid limitations.
# I want to have the env versioned, but run the processes manually,
# to profit from the plain documentations of the tools.
{
# Dotenv integration did not works, so I did this manually in `enterShell`.
#dotenv.enable = true;


This issue was generated by todo-issue based on a TODO comment in 23c2eb3.

configure dynamically to use the current directory

groupware/shell.nix

Lines 49 to 54 in 1c12631

# TODO: configure dynamically to use the current directory
MYSQL_HOME= "/home/pheller/Code/groupware/storage/mysql";
MYSQL_DATADIR = "/home/pheller/Code/groupware/storage/mysql/data";
MYSQL_UNIX_PORT = "/home/pheller/Code/groupware/.mysql.sock";
MYSQLX_UNIX_PORT = "/home/pheller/Code/groupware/.mysqlx.sock";


This issue was generated by todo-issue based on a TODO comment in 1c12631. It's been assigned to @HellPat because they committed the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.