Web apps

Client portal for accounting firm receipts and returns

Laravel and MySQL portal for client document uploads, missing-item checklists, e-signed engagement letters, tax return downloads, 2FA and audited file access.

laravelmysqllivewirebladefortifypest

Built 1 time, downloaded 0 times.

Install from your terminal

Run this in your project folder. It signs you in, shows what changes and asks before it overwrites a file.

npx claude-lab add client-portal-for-accounting-firm-receipts-and-returns-113177
11 filesDownload zip
CLAUDE.md
# Client portal (Laravel)

## Purpose

This is a client portal for a small accounting firm. Clients upload monthly receipts and bank statements, see which checklist items are still missing, sign engagement letters, and download their tax returns. Staff see a dashboard of clients who are late for the current month, manage checklist items, upload documents, and review the audit log.

## Stack

- Laravel. Use the version in composer.json.
- MySQL.
- Blade and Livewire for views.
- Laravel Fortify for authentication and TOTP two-factor (2FA).
- Pest or PHPUnit, whichever composer.json uses.
- Larastan for static analysis and Pint for formatting.

## Commands

- `composer install`
- `php artisan serve`
- `php artisan test`
- `vendor/bin/pint --test`
- `vendor/bin/phpstan analyse`
- `npm run build`
- `php artisan migrate` (ask first)

## Roles and access

- Roles are client, staff and admin.
- Clients may only see their own records.
- Enforce access with Policies and a global scope on client-owned models. Never rely on checks in controllers alone.

## Non-negotiable rules

- Store files encrypted at rest on the private disk. Never use the public disk, and never serve files by direct URL.
- Every download, by client or staff, writes one row to `document_access_logs` before the stream starts. The table is append-only.
- Require 2FA for all client accounts. Check it in middleware on every portal route.
- Never log or echo file contents, decrypted keys, TOTP secrets, recovery codes or tax IDs.
- Mask SSN and tax ID fields in views and logs.

## Code conventions

- Validate input with Form Requests.
- Authorize with Policies.
- Put file and audit logic in `app/Services`.
- Run virus scans and the late-client calculation in Jobs.
- Upload rules: allowed types are pdf, jpg, png, csv and xlsx. The maximum size comes from config. Store the original name as metadata only and generate random storage names.

## Gotchas

- Never edit a migration that has been committed. Add a new one.
- Never run `migrate:fresh`, `db:wipe` or `migrate:reset`.
- Tests use a separate database (sqlite in memory or a MySQL test database, as set in phpunit.xml). Never run them against the dev database.
- Dev mail uses the log driver.

## Workflow

- Explore, plan, code, then run the verify skill before saying a task is done.
- Use `/clear` between unrelated tasks.
- Use the test-runner subagent for full test runs.
- Use the security-reviewer subagent for changes to auth, storage, policies or logging.

## Pointers

@REVIEW.md
- SPEC.md has the requirements and data model.
- PLAN.md has the phase goals and the checklist.
Use for my project