Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ APP_VERSION=0.1.1
APP_ENV=dev
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=secret
DATABASE_URL=mysql://root:secret@db:3306/app?serverVersion=8.0.31&charset=utf8mb4

# Node
NODE_IMAGE=node:23-alpine
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/app-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
php-version: [8.4]

env:
DATABASE_URL: "sqlite:///:memory:"
APP_ENV: test
APP_VERSION: ${{ github.sha }}

steps:
- uses: actions/checkout@v2
Expand All @@ -39,6 +40,14 @@ jobs:
- name: Run code style checks
run: vendor/bin/php-cs-fixer check

- name: Create test database
run: bin/console doctrine:schema:create

- name: Create mock SPA build for tests
run: |
mkdir -p public/build
echo '<!DOCTYPE html><html><head><title>Test</title></head><body><div id="root"></div></body></html>' > public/build/index.html

- name: Run automated tests
run: vendor/bin/phpunit

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ Visit `http://localhost:8000` in your browser.

## Screenshots

<div style="display: flex; gap: 20px; flex-wrap: wrap;">
<div style="flex: 1; min-width: 300px;">
<img src="./images/login.png" alt="login-screenshot" style="width: 100%;">
<div style="display: flex; gap: 20px">
<div style="width: 300px">
<img src="./images/login.png" alt="login-screenshot">
</div>
<div style="flex: 1; min-width: 300px;">
<img src="./images/track.png" alt="track-screenshot" style="width: 100%;">
<div style="width: 300px">
<img src="./images/track.png" alt="track-screenshot">
</div>
<div style="flex: 1; min-width: 300px;">
<img src="./images/calculate.png" alt="calculate-screenshot" style="width: 100%;">
<div style="width: 300px">
<img src="./images/calculate.png" alt="calculate-screenshot">
</div>
</div>
1 change: 1 addition & 0 deletions backend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
APP_ENV=dev
APP_SECRET=
APP_SHARE_DIR=var/share
APP_VERSION=0.0.1
###< symfony/framework-bundle ###

###> symfony/routing ###
Expand Down
5 changes: 3 additions & 2 deletions backend/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ APP_SECRET='$ecretf0rt3st'
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
DATABASE_URL="sqlite:///:memory:"
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_%kernel.environment%.db"
# Using file-based SQLite for tests ensures schema persists across kernel instances
DATABASE_URL="sqlite:///%kernel.project_dir%/var/test_db.sqlite"
# DATABASE_URL="sqlite:///:memory:"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
Expand Down
6 changes: 4 additions & 2 deletions backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@
"ext-iconv": "*",
"doctrine/doctrine-bundle": "^3.2.2",
"doctrine/doctrine-migrations-bundle": "^4.0",
"doctrine/orm": "^3.6.1",
"doctrine/orm": "^3.6.2",
"easycorp/easyadmin-bundle": "^4.28",
"nelmio/cors-bundle": "^2.6.1",
"phpdocumentor/reflection-docblock": "^5.6.6",
"phpstan/phpdoc-parser": "^2.3.2",
"symfony/browser-kit": "8.0.*",
"symfony/console": "8.0.*",
"symfony/doctrine-messenger": "8.0.*",
"symfony/dotenv": "8.0.*",
"symfony/flex": "^2.10",
"symfony/framework-bundle": "8.0.*",
"symfony/http-kernel": "8.0.*",
"symfony/intl": "8.0.*",
"symfony/messenger": "8.0.*",
"symfony/property-access": "8.0.*",
Expand Down Expand Up @@ -103,7 +105,7 @@
"deptrac/deptrac": "^4.5",
"doctrine/doctrine-fixtures-bundle": "^4.3.1",
"friendsofphp/php-cs-fixer": "^3.93.1",
"phpstan/phpstan": "^2.1.37",
"phpstan/phpstan": "^2.1.38",
"phpunit/phpunit": "^12.5.8",
"symfony/maker-bundle": "^1.65.1",
"symfony/stopwatch": "8.0.*",
Expand Down
164 changes: 153 additions & 11 deletions backend/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions backend/config/packages/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ framework:
secret: '%env(APP_SECRET)%'

# Note that the session will be started ONLY if you read or write from it.
session: true
session:
cookie_secure: false
cookie_httponly: true
cookie_samesite: 'lax'
name: 'PHPSESSID'

#esi: true
#fragments: true
Expand All @@ -13,8 +17,3 @@ framework:
serializer:
name_converter: 'serializer.name_converter.camel_case_to_snake_case'

when@test:
framework:
test: true
session:
storage_factory_id: session.storage.factory.mock_file
Loading