Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e84cb88
allow int or float for price value
makomweb Apr 5, 2026
33b8520
update deps
makomweb Apr 5, 2026
c0c9ef8
improve logging
makomweb Apr 5, 2026
63b1dd2
update deps
makomweb Jul 12, 2026
82825f2
start with dark mode (theme)
makomweb Jul 12, 2026
2526c66
continue with modernization
makomweb Jul 12, 2026
1b3545c
fix tests
makomweb Jul 12, 2026
60e12ab
Phase B & C: Modern Layout & CSS Variable Refactoring
makomweb Jul 12, 2026
f57432b
docs: Add comprehensive redesign completion documentation
makomweb Jul 12, 2026
35fc3f5
Phase D: UX Polish - Loading States, Animations & Toast System
makomweb Jul 12, 2026
0261d63
docs: Add comprehensive modernization completion guide
makomweb Jul 12, 2026
609a68c
docs: Add user-friendly testing guide
makomweb Jul 12, 2026
625e31c
fix admin - events
makomweb Jul 12, 2026
e930c0b
fix: Add missing submit button to TrackExpense form
makomweb Jul 12, 2026
f431f7c
refactor: Move ThemeSwitcher from Header to Settings Modal
makomweb Jul 12, 2026
6ae5f8a
refactor calculate expenses
makomweb Jul 13, 2026
42e068f
calculate compensation + var_dump
makomweb Jul 13, 2026
81d55e4
simplify dev dashboard
makomweb Jul 13, 2026
3592c5c
add doctrine doctor
makomweb Jul 13, 2026
122e05d
make code more robust
makomweb Jul 13, 2026
6666725
improve Doctrine caches
makomweb Jul 13, 2026
f7e60e3
make User entity more robust
makomweb Jul 13, 2026
fb09ee6
rename project
makomweb Oct 26, 2026
806eb66
finish renaming
makomweb Oct 26, 2026
3d81b1f
fix CS
makomweb Oct 26, 2026
b0a0739
update deps
makomweb Oct 26, 2026
d4e3559
prepare Symfony upgrade to v8.1
makomweb Oct 26, 2026
adbd568
upgrade to Symfony v8.1
makomweb Oct 26, 2026
cb4a0e9
increment version (incl. PHP to 8.4.27)
makomweb Oct 26, 2026
d5368a3
center settings modal
makomweb Oct 26, 2026
ec5d3b5
fix deprecation warning
makomweb Oct 26, 2026
3ffbebc
fix PHPStan
makomweb Oct 26, 2026
4b030bf
fix UUID
makomweb Oct 26, 2026
f747b85
init test database
makomweb Oct 26, 2026
7235160
fix failing tests
makomweb Oct 26, 2026
f76f57d
rename namespace
makomweb Oct 26, 2026
ca481f6
Update npm lock file to sync dependencies
makomweb Oct 26, 2026
2ad3122
improve GH actions
makomweb Oct 26, 2026
219fa49
Fix PHP 8.4 CI phpstan invocation
Copilot Oct 26, 2026
9a221df
Cleanup: Remove outdated phase documentation, add CONTRIBUTING.md
makomweb Oct 26, 2026
ce4437c
update README.md
makomweb Oct 26, 2026
7052025
add package-lock.json
makomweb Oct 26, 2026
c08a0fb
fix CS
makomweb Oct 26, 2026
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
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
NGINX_IMAGE=nginx:stable-alpine3.23

# Backend
APP_IMAGE=split-fairly-dev:0.1.5
APP_NAME=split-fairly
APP_VERSION=0.1.5
APP_IMAGE=fairly-dev:0.1.6
APP_NAME=fairly
APP_VERSION=0.1.6
APP_ENV=dev
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=secret
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/app-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: composer install --prefer-dist --no-scripts

- name: Run static code analysis
run: vendor/bin/phpstan analyse
run: vendor/bin/phpstan analyse src tests --memory-limit=1G

- name: Run code style checks
run: vendor/bin/php-cs-fixer check
Expand All @@ -53,7 +53,7 @@ jobs:
run: vendor/bin/phpunit

- name: Run architecture analysis
run: vendor/bin/deptrac analyse
run: vendor/bin/deptrac analyse --report-uncovered

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
Expand Down
116 changes: 116 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Contributing to Fairly

## Development Setup

```bash
make start # Build images, start services, and open in browser
make help # Show all available targets
```

Visit `http://localhost:8000` in your browser.

## Running Tests

```bash
# Run all tests (backend + frontend)
make test

# Run backend tests only
make test-backend

# Run frontend tests only
make test-frontend

# Run quality checks (phpstan, php-cs-fixer, etc.)
make quality

# Generate coverage report
make coverage
```

## Backend Development

The backend runs in a Docker container. Always run commands inside the container:

```bash
# Open shell on app container
make shell

# Run composer commands
make composer cmd='install'

# Run Symfony console commands
docker compose exec -T app bin/console <command>
```

## Frontend Development

The frontend dev server runs with HMR (Hot Module Replacement):

```bash
# The dev server auto-starts with `make start`
# It's available at http://localhost:5173

# Manual start
cd frontend
npm run dev

# Build for production
npm run build
```

## Code Style

```bash
# Fix code style (PHP)
make style

# Run static analysis
make phpstan

# Check architecture constraints
make arch
```

## Testing Guidelines

- Write tests alongside the code you implement
- For backend: Use PHPUnit, extend appropriate test base class
- For frontend: Use Vitest, test components and functions
- Aim for coverage of feature behavior, not just line coverage

## Database Migrations

After entity changes:

```bash
docker compose exec -T app bin/console make:migration
docker compose exec -T app bin/console doctrine:migrations:migrate
```

## Common Workflows

### Adding a new feature

1. Create a branch from `main`
2. Implement feature with tests
3. Run `make test` & `make quality` to verify
4. Create a pull request

### Debugging

- **Backend logs**: `docker compose logs app`
- **Frontend console**: Browser DevTools (F12)
- **Database**: Connect via `docker compose ps` (port 3306)
- **Profiler**: Visit `http://localhost:8080/_profiler`

## Deployment

See `helm/` directory for Kubernetes deployment configuration.

For Docker Compose production deployment:

```bash
make prod # Build production images
docker compose -f docker-compose.prod.yaml up -d
```
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
APP_NAME = split-fairly
VERSION = 0.1.5
APP_NAME = fairly
VERSION = 0.1.6

.DEFAULT_GOAL := help

Expand Down Expand Up @@ -137,7 +137,7 @@ code-style:
test: test-backend test-frontend

backend-test: test-backend
test-backend:
test-backend: init-test
@echo "🧪 Running backend tests..."
docker compose exec -it app bin/phpunit

Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Split Fairly
# Fairly

![app-ci-workflow](https://github.com/makomweb/split-fairly/actions/workflows/app-ci.yaml/badge.svg)
[![codecov](https://codecov.io/gh/makomweb/split-fairly/graph/badge.svg?token=O6WQ8USL6T)](https://codecov.io/gh/makomweb/split-fairly)
![app-ci-workflow](https://github.com/makomweb/fairly/actions/workflows/app-ci.yaml/badge.svg)
[![codecov](https://codecov.io/gh/makomweb/fairly/graph/badge.svg?token=O6WQ8USL6T)](https://codecov.io/gh/makomweb/fairly)

## Goal

Expand Down Expand Up @@ -43,6 +43,14 @@ make help # Show all available targets

Visit `http://localhost:8000` in your browser.

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md) for:
- Running tests
- Code style and quality checks
- Database migrations
- Development workflow

## Architecture

```
Expand Down Expand Up @@ -99,7 +107,7 @@ helm upgrade --install app ./helm
# Access the application via NodePort:
# Link: http://localhost:30190
# Or configure port forwarding via:
kubectl port-forward svc/app-split-fairly-web 8080:80
kubectl port-forward svc/app-fairly-web 8080:80
# Link: http://localhost:8080

# View logs for all pods with the PHP label (app + worker)
Expand Down
8 changes: 7 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ yarn-error.log
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###

.deptrac.cache
###> deptrac/deptrac ###
/.deptrac.cache
###< deptrac/deptrac ###

###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###
108 changes: 108 additions & 0 deletions backend/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# AGENTS.md

This is a Symfony project. Check `composer.json` for the exact Symfony/PHP version
in use, and read `symfony.lock` to see which recipes ran. Don't assume Doctrine,
Twig, API Platform, Messenger, or Lock are installed unless one of those says so.

## Ask before generating

If the task doesn't specify, ask rather than guess:

- Persistence: Doctrine ORM, Doctrine ODM, or none?
- Interface: server-rendered (Twig), API (Serializer, maybe API Platform), or both?
- Auth: SecurityBundle, and which authenticator?

If you can't ask (no interactive channel), state the assumption you're making and
pick the smallest option (e.g. no persistence layer) rather than scaffolding a
full stack nobody asked for.

## Adding features: Flex, not hand-wiring

Install new capabilities with `composer require <package>` (e.g. `symfony/lock`,
`symfony/messenger`, `orm-pack`) and let the Flex recipe register the bundle and
generate its config. Don't hand-edit `config/bundles.php` or hand-write a bundle's
base config; that's what the recipe is for. Don't skip a good-fit component just
because it isn't installed yet; installing it is one command.

## Conventions

Follow https://symfony.com/doc/current/best_practices.html to write idiomatic
Symfony:

- Use PHP attributes for framework metadata, and not only on controllers:
`#[Route]`, `#[MapRequestPayload]`, `#[IsGranted]` on actions, `#[Assert\...]`
on properties, `#[AsCommand]`, `#[AsEventListener]`, `#[AsMessageHandler]`, and
`#[AsAlias]` / `#[AsTaggedItem]` / `#[Autoconfigure]` on services. No YAML or
XML routing.
- Rely on autowiring and autoconfiguration. Type-hint constructor arguments and
let the container resolve them. Where a type-hint can't express it, stay in the
class with `#[Autowire]` (parameters, env vars, expressions) or `#[Target]` (one
of several implementations of an interface). A YAML service definition is the
last resort, not the first.
- Controllers extend `AbstractController`, stay thin, and delegate to services.
- Use the framework for what it already does: Form for server-rendered forms,
Validator for validation, Serializer for JSON, Messenger for async work,
Security (voters, authenticators) for access control, Twig `path()`/`url()`
instead of hardcoded URLs.
- Before hand-writing infrastructure (locks, queues, caches, HTTP clients,
mailers, schedulers) or reaching for a third-party library, check whether a
Symfony component covers it. It usually does.

Three specifics worth spelling out, because they are easy to get wrong:

- Bind request data with `#[MapRequestPayload]` / `#[MapQueryString]` on action
arguments, which wires up Serializer and Validator for you, instead of calling
`json_decode()` or `SerializerInterface` by hand. If neither package is
installed yet, `composer require` them rather than falling back to manual
parsing.
- Use constructor property promotion, and `readonly` for DTOs and value objects.
Don't mark a service `readonly` if it might become `lazy: true`: a lazy proxy
can't extend a `readonly` class.
- Use `symfony/lock` (`LockFactory`) for mutual exclusion. A hand-built flag or
lock file looks fine in review and is usually wrong under concurrency.

## Everyday workflow

- Run the app with `symfony serve -d`, and commands with `symfony console ...`
(or `bin/console` when the Symfony CLI isn't available).
- When something fails, read `var/log/dev.log` and the web profiler
(`/_profiler`) before changing code.
- If `maker-bundle` is installed, prefer `bin/console make:*` with every argument
passed up front and `--no-interaction` where supported: makers prompt on a
terminal by default, which hangs a non-interactive shell. If a maker still
needs interactive input, hand-write the code instead.
- If Doctrine ORM is installed, schema changes go through migrations
(`bin/console make:migration`, then `doctrine:migrations:migrate`), never
`doctrine:schema:update` or hand-written SQL.
- `.env` is committed and holds defaults only. Real secrets belong in `.env.local`
(git-ignored) or the secrets vault (`bin/console secrets:set`), read via
`%env(...)%`.

## Testing

Install `symfony/test-pack` if it isn't already. Functional/HTTP tests extend
`WebTestCase`; service-level tests extend `KernelTestCase`. Run
`php bin/phpunit` (falls back to `vendor/bin/phpunit`). A feature isn't done
until it has a test that exercises it the way a caller would, an HTTP request for
a controller or a service call for a service, not just "it didn't throw."

## Code style

Symfony's coding standard, the `@Symfony` php-cs-fixer ruleset (a PSR-12-derived
superset). Run `vendor/bin/php-cs-fixer fix` if `friendsofphp/php-cs-fixer` is
installed; it isn't part of the skeleton by default.

## Discover, don't guess

Framework APIs change between versions and your training data may be stale. Look
things up in the project instead of relying on memory:

- `bin/console about`: versions, environment, paths.
- `bin/console debug:router`, `debug:container`, `debug:autowiring <name>`,
`debug:config <bundle>`, `config:dump-reference <bundle>`: what exists and how
it is configured.
- `bin/console lint:container`, plus `lint:twig templates/` and
`lint:yaml config/` where those packages are installed: validate before running.
- Read the installed source and docblocks under `vendor/`.
- Docs: https://symfony.com/doc/current/ (switch to the version matching
`composer.json` if it differs).
Loading
Loading