Skip to content

Commit 9ad1ede

Browse files
committed
initial
0 parents  commit 9ad1ede

328 files changed

Lines changed: 38172 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Reverse proxy
2+
NGINX_IMAGE=nginx:stable-alpine
3+
4+
# Backend + Frontend
5+
APP_IMAGE=fullstack-symfony-react-dev:0.9.1
6+
APP_NAME=fullstack-symfony-react
7+
APP_VERSION=0.9.1
8+
APP_ENV=dev
9+
NODE_IMAGE=node:23-alpine
10+
ADMIN_EMAIL=admin@example.com
11+
ADMIN_PASSWORD=secret
12+
13+
# DB
14+
MYSQL_IMAGE=mysql:8
15+
ADMINER_IMAGE=adminer
16+
17+
# Cache
18+
REDIS_IMAGE=redis:7.2-alpine
19+
REDIS_INSIGHTS_IMAGE=redis/redisinsight:latest
20+
21+
# Telemetry LGTM (all-in-one: OTel Collector + Grafana + Loki + Tempo + Prometheus)
22+
OTEL_LGTM_IMAGE=grafana/otel-lgtm:0.8.1
23+
24+
# RabbitMQ
25+
RABBITMQ_IMAGE=rabbitmq:latest
26+
RABBITMQ_USER=guest
27+
RABBITMQ_PASSWORD=guest

.github/workflows/app-ci.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: App CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
PHP:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: backend
15+
16+
strategy:
17+
matrix:
18+
php-version: [8.4]
19+
20+
env:
21+
PHP_CS_FIXER_IGNORE_ENV: 1
22+
DATABASE_URL: "sqlite:///:memory:"
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Set up PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php-version }}
31+
extensions: mbstring, json, opentelemetry
32+
coverage: xdebug
33+
34+
- name: Install dependencies
35+
run: composer install --prefer-dist --no-scripts
36+
37+
- name: Run static code analysis
38+
run: vendor/bin/phpstan analyse
39+
40+
- name: Run code style checks
41+
run: vendor/bin/php-cs-fixer check
42+
43+
- name: Run automated tests
44+
run: vendor/bin/phpunit
45+
46+
- name: Run architecture analysis
47+
run: vendor/bin/deptrac analyse
48+
49+
Node:
50+
runs-on: ubuntu-latest
51+
defaults:
52+
run:
53+
working-directory: 'frontend'
54+
55+
strategy:
56+
matrix:
57+
node-version: ['v23.11']
58+
59+
steps:
60+
- uses: actions/checkout@v4
61+
- name: Use Node.js ${{ matrix.node-version }}
62+
uses: actions/setup-node@v4
63+
with:
64+
node-version: ${{ matrix.node-version }}
65+
- name: Install dependencies
66+
run: npm ci
67+
- name: Build
68+
run: npm run build --if-present
69+
- name: Run tests
70+
run: npm test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
project/.deptrac.cache
2+
project/diagram.*
3+
project/circle.svg
4+
tempo-data/

FEATURES.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Features
2+
3+
- 🚀 Backend
4+
-[Symfony 8.x](https://symfony.com/doc/current/setup.html)
5+
- ✅ Asynchronous worker via Symfony Messenger
6+
-[hexagonal architecture](https://alistair.cockburn.us/hexagonal-architecture/)
7+
-[CQRS](https://martinfowler.com/bliki/CQRS.html) + [event sourcing](https://martinfowler.com/eaaDev/EventSourcing.html)
8+
- ✅ use [AutoMapper](https://automapper.jolicode.com) for DTO to Command mapping
9+
- ✅ tactial DDD (annotations + check command)
10+
- ✅ API documentation with Swagger / [Open API specification](https://swagger.io/specification/)
11+
- ✅ use [RabbitMQ](https://www.rabbitmq.com/) as message queue between "app" and "worker"
12+
- ✅ 100 % coverage in the core domain
13+
- 🚀 Frontend
14+
-[Vite](https://vite.dev/)
15+
-[Typescript](https://www.typescriptlang.org/)
16+
-[React 19](https://react.dev/reference/react)
17+
-[Material UI v6](https://mui.com/material-ui/getting-started/)
18+
- ✅ alternative UI [PHP + Twig + Bootstrap](https://getbootstrap.com/)
19+
-[Redis](https://redis.io) as shared cache
20+
- ✅ Store sessions into the shared cache for scaling the backend
21+
- 🚀 Containerization
22+
- 🐳 [Docker](https://www.docker.com/) multistage build for dev + prod
23+
- ⛴️ [Kubernetes](https://kubernetes.io/) via [Helm](https://helm.sh/)
24+
- ✅ Backend + worker
25+
- ✅ Dashboard + Telemetry
26+
- ✅ Frontend
27+
- ✅ Observability
28+
-[Grafana](https://grafana.com/) dashboard with the [LGTM stack](https://grafana.com/go/webinar/getting-started-with-grafana-lgtm-stack/?pg=webinar-intro-to-ci-cd-observability-and-the-grafana-lgtm-stack&plcmt=featured-videos-2)
29+
-[Open Telemetry](https://opentelemetry.io/docs/what-is-opentelemetry/) with centralized otel-collector
30+
-[Loki](https://grafana.com/oss/loki/) for logging
31+
-[Tempo](https://grafana.com/oss/tempo/) for tracing
32+
-[Prometheus](https://prometheus.io/) for metrics
33+
-[CI via Github actions](https://docs.github.com/en/actions/about-github-actions/about-continuous-integration-with-github-actions)
34+
- ✅ PhpUnit 13
35+
- ✅ Vitest
36+
-[CloudEvent](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md) specification
37+
- ✅ Authentication
38+
- ✅ TWIG app
39+
- ✅ React app
40+
- ✅ CORS
41+
- ✅ Remember Me
42+
- ✅ Authorization
43+
- ✅ check permissions (configured in YAML) via Symfony voter
44+
- ✅ arc42 documentation template
45+
46+
## Planned
47+
48+
- ❌ Multi tenancy
49+
- ❌ Connect an example legacy application to the modern application
50+
- ❌ Webhooks
51+
- ❌ CRUD based DB model (in contrast to event sourcing and CQRS)
52+
- ❌ Class diagram / dependency diagram for src/ via analyze CLI command + Graphiz Dot
53+
- ❌ Kubernetes:
54+
- ❌ Readyness/liveness probes
55+
- ❌ Put worker into a Deployment instead of a single pod
56+
- ❌ Provision Grafana dashboard, e.g. via ConfigMap
57+
- ❌ Deploy DB via stateful set
58+
- ❌ Include Alpine image into Docker multistage build for production
59+

LICENSE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
The MIT License (MIT)
2+
=====================
3+
4+
Copyright © Martin Komischke
5+
6+
Permission is hereby granted, free of charge, to any person
7+
obtaining a copy of this software and associated documentation
8+
files (the “Software”), to deal in the Software without
9+
restriction, including without limitation the rights to use,
10+
copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the
12+
Software is furnished to do so, subject to the following
13+
conditions:
14+
15+
The above copyright notice and this permission notice shall be
16+
included in all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
19+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25+
OTHER DEALINGS IN THE SOFTWARE.
26+

0 commit comments

Comments
 (0)