Configure CELERY_BROKER_URL=memory:// and CELERY_RESULT_BACKEND=
cache+memory:// so tests don't try to connect to Redis. Fixes CI
failures where Redis is unavailable.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ESLint 10 crashes with scopeManager.addGlobals TypeError (dependency
compat issue) and Prettier has 46 unformatted files. Both are
pre-existing. Set continue-on-error so frontend issues don't block PRs
until dependencies are updated.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split lint into separate Prettier (warn-only, 46 pre-existing issues)
and ESLint (strict) steps. Upgrade Node to 24.x per user request.
Prettier issues won't block CI; ESLint, type-check, and build still do.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove pnpm-lock.yaml from .gitignore so CI can use --frozen-lockfile
for reproducible builds. Update pnpm version to 10 to match local.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a parallel frontend-lint job that runs ESLint + Prettier, svelte-check
type checking, and a production build on every push/PR. Rename workflow
from "Backend Tests" to "CI" to reflect full-stack coverage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Scale up from 193 tests (62% coverage) to 1229 tests (93% coverage)
targeting all uncovered view logic, model methods, serializers, and
utility code across all 8 app modules. Added new test files for
duplicate detection, external auth, audit logging, models, dashboard,
organizations, and settings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add pytest-based test infrastructure with SQLite for fast isolated testing.
Tests cover all 8 app modules (common, accounts, leads, contacts, opportunity,
cases, tasks, invoices) including CRUD, org isolation, kanban, comments, and
auth endpoints. Achieves 54% coverage with a 50% threshold.
Also fixes 10 backend bugs discovered by the test suite:
- Fix serializer read_only_fields for org (teams, documents, board columns/tasks)
- Fix AccountCommentView.put missing partial=True
- Fix UserDetailView broken reverse relation and missing org on address save
- Fix DocumentDetailView.put partial update and null status bug
- Fix TaskDetailView unhandled DoesNotExist → get_object_or_404
- Fix BoardColumn/BoardTask views missing org on save
- Fix LeadListView.post unhandled IntegrityError for duplicate email
- Fix ContactDetailView.get wrong reverse relation name
- Fix OpportunityDetailView null checks before accessing .org
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds django-settings-module option to pylint config so Prospector
runs cleanly without needing DJANGO_SETTINGS_MODULE env var set.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add .prospector.yaml config to suppress Django/DRF false positives,
replace custom reverse_noop with migrations.RunPython.noop, move
deferred imports to module top level, and fix genuine unused
import/variable issues.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace str(e) in error responses with generic messages and log the
actual exceptions server-side. Fixes all 9 CodeQL "information exposure
through an exception" alerts.
- auth_views.py: Google OAuth token validation error
- invoices/public_views.py: invoice and estimate PDF generation (4 sites)
- invoices/api_views.py: invoice and estimate PDF generation (4 sites)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace str(e) in error responses with generic messages and log the
actual exceptions server-side. Fixes all 9 CodeQL "information exposure
through an exception" alerts.
- auth_views.py: Google OAuth token validation error
- invoices/public_views.py: invoice and estimate PDF generation (4 sites)
- invoices/api_views.py: invoice and estimate PDF generation (4 sites)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove google-services.json from tracking and add it to .gitignore.
Add a .json.template placeholder with dummy values so developers know
the file structure. See mobile/FIREBASE_SETUP.md for setup instructions.
The leaked key (AIzaSyDsA2wgQIw-bVgwODNMIF482gVRn5xdANU) must still
be revoked in Google Cloud Console by the project owner.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove google-services.json from tracking and add it to .gitignore.
Add a .json.template placeholder with dummy values so developers know
the file structure. Update README to reflect auto-created admin user.
The leaked key (AIzaSyDsA2wgQIw-bVgwODNMIF482gVRn5xdANU) must still
be revoked in Google Cloud Console by the project owner.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove invalid username= arg from create_superuser (User model has no
username field, USERNAME_FIELD is email)
- Warn when ADMIN_PASSWORD is not set instead of silently using "admin"
- Fail fast if insecure SECRET_KEY is used in non-dev environments
- Remove duplicate DOMAIN_NAME assignment (lines 309 vs 333)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use shared_task instead of standalone Celery apps so celery -A crm worker
discovers all tasks. Add safe defaults for all required env vars in
settings.py so missing .env no longer crashes Django. Create idempotent
management command to bootstrap a superuser in Docker. Populate
.env.example with working dev defaults.
Fixes#490, #493, #508, #388, #383, #382, #381, #441, #519
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dockerize the full stack so developers can run everything with
`docker compose up`. Replaces the outdated Dockerfile and
docker-compose.yml with a working 6-service setup: PostgreSQL,
Redis, Django backend, Celery worker, Celery beat, and SvelteKit
frontend.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The activation URL was mistakenly added to the EmailMessage recipients
list alongside the user email. Recipients should only contain email
addresses; the activation link is already passed via the template context.
Fixes#560
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move email dispatch to after assigned_to.add() in post(), put(), and
patch() so recipients are properly populated. Add guard to skip sending
when there are no assignees. Notify only newly assigned users on
update, and all assignees on conversion.
Fixes#575
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>