A security-first, bilingual (English/French), Canada-focused tax filing web app built on Next.js fullstack to simplify CRA-aligned filing for individual, self-employed, and company pathways with progressive disclosure.
Tax filing should feel structured, understandable, and calm. This project prioritizes:
- Individual-first experience (with self-employed support)
- Integrated company path hidden behind guided branching
- Prior-year continuity and carry-forward profile data
- Strong account security + privacy controls
- Submission architecture for CRA-compatible e-filing integrations
- Guided interview for INDIVIDUAL, SELF_EMPLOYED, and COMPANY filing modes
- 44+ CRA field mappings per tax year (T1, T2125, T2, Schedule 3/6/9/11)
- Tax calculation engine with federal + provincial/territorial tax for all 13 jurisdictions
- Prior-year carry-forward with smart field filtering and "What changed?" diff
- Filing preflight checks (8 validations) before submission
- Real-time client-side Zod validation with inline error messages
- AES-256-GCM field-level PII encryption (SIN, name, DOB) at rest
- JWT sessions via NextAuth with OAuth providers (Google/Microsoft/Apple)
- Two-factor authentication (TOTP) with recovery codes
- Rate limiting, CSRF protection, nonce-based CSP on all routes
- Consent management, data retention controls, account recovery
- Admin dashboard with masked PII for support workflows
- Complete audit trail for auth, filing, and document actions
- Production e-filing providers: NETFILE (XML/T1) and EFILE (JSON/all modes)
- Document upload/download/delete with Vercel Blob storage (local fallback)
- XML escaping and ownership verification on all document operations
- Email notifications via Resend (filing confirmation, submission, sign-in alerts)
- PostgreSQL + Prisma with migrations for all models
- Bilingual EN/FR interface (370+ i18n key pairs)
- Loading states, skeleton screens, accessibility (skip nav, ARIA)
- Privacy Policy and Terms of Service pages (PIPEDA-aligned)
- CI/CD: GitHub Actions for lint/typecheck/test/build/security-scan
- Frontend + Backend: Next.js 15 (App Router)
- Language: TypeScript
- Auth: NextAuth (OAuth + credentials fallback)
- Database: PostgreSQL
- ORM: Prisma
- Validation: Zod
- Testing: Vitest
- Linting: ESLint (Next config)
- JWT sessions via NextAuth with Prisma adapter
- Security headers via
next.config.tsplus nonce-based CSP viamiddleware.ts - Audit logging for auth and filing actions
- Request metadata capture (IP/User-Agent) for filing and auth-route boundary events
- Demo credentials provider disabled in production by default (explicit opt-in only)
- PII-aware architecture and clear security documentation
- No hardcoded secrets, env-based config only
See SECURITY.md for vulnerability reporting policy.
npm installcp .env.example .env.localSet at minimum:
DATABASE_URLNEXTAUTH_URLNEXTAUTH_SECRETDEMO_EMAILDEMO_PASSCODE
Optional hardening toggle:
ENABLE_DEMO_AUTH(defaults to disabled in production unless explicitly set to a truthy value)
(Optional) add OAuth provider credentials.
npm run db:generateHTTP:
npm run devHTTPS local dev (recommended):
npm run dev:httpsnpm run typecheck
npm run lint
npm test
npm run buildGET /api/healthGET /api/returns(authenticated)GET /api/returns/:returnId(authenticated)POST /api/returns(authenticated)POST /api/returns/:returnId/prepare(authenticated)GET|POST /api/auth/[...nextauth]
- Use Vercel for preview and eventual production deployment of this fullstack Next.js app.
- This app depends on server-side routes (
/api/*), auth callbacks, and database access, which are all first-class on Vercel.
- GitHub Pages is static hosting only and cannot run Next.js API routes, NextAuth handlers, or server-side DB access required by this project.
- Keep
www.davidoncloud.comunchanged. - For live testing, use either:
- Vercel preview URLs, or
- a dedicated subdomain (example:
tax-preview.davidoncloud.com) pointed to Vercel via DNS.
This preserves your existing static site/CMS while allowing isolated app testing.
Workflow files live in .github/workflows:
ci-cd.yml– lint, typecheck, tests, build, security scanrelease-version.yml– semantic version bump (major|minor|patch), commit, tag, push
This project uses semantic versioning (major.minor.patch).
Run locally:
npm run version:bump -- --type patch
# or minor / majorThis updates:
package.jsonCHANGELOG.md
- This repository currently provides product/engineering scaffolding and a guided filing workflow.
- Production launch must include formal CRA integration readiness, legal/tax review, and compliance validation.
- This app is scoped to Canada for initial releases.
- Deeper CRA form mapping and validation rules by tax year
- Enhanced upload/document reconciliation
- Expanded company-filing requirements
- Production-grade e-filing partner integration
- iOS and Android integrated app clients (future phase)
- Shared secure backend and filing orchestration APIs
- Mobile-first flows for return status, reminders, and document capture
AGENTS.md– contributor agent playbook and guardrailsskill.md– capability matrix and quality barSECURITY.md– security standards and operational controlsCHANGELOG.md– release history