Commit Graph
57 Commits
Author SHA1 Message Date
westfarn 33859fa28b Update company_site/financial/templates/emails/invoice_pay_link.txt for Stripe invoices (#23) 2026-07-31 04:35:00 -07:00
westfarn fe4fcfdd13 Update company_site/financial/templates/emails/invoice_pay_link.html for Stripe invoices (#23) 2026-07-31 04:34:54 -07:00
westfarn 11de91faf7 Update company_site/financial/stripe_billing.py for Stripe invoices (#23) 2026-07-31 04:34:47 -07:00
westfarn 109aea2242 Update company_site/financial/migrations/0016_billing_invoices_subscriptions.py for Stripe invoices (#23) 2026-07-31 04:34:41 -07:00
westfarn cb7b39bf43 Update company_site/financial/invoice_views.py for Stripe invoices (#23) 2026-07-31 04:34:34 -07:00
westfarn cbdeb93810 Update company_site/financial/urls.py for Stripe invoices (#23) 2026-07-31 04:34:27 -07:00
westfarn 73448806cc Update company_site/financial/tests.py for Stripe invoices (#23) 2026-07-31 04:34:21 -07:00
westfarn 2fdd322640 Update company_site/financial/templates/financial/index.html for Stripe invoices (#23) 2026-07-31 04:34:14 -07:00
westfarn eefa59abad Update company_site/financial/models.py for Stripe invoices (#23) 2026-07-31 04:34:08 -07:00
westfarn d63c6af374 Update company_site/financial/forms.py for Stripe invoices (#23) 2026-07-31 04:34:01 -07:00
westfarn 71e64cfc45 Update company_site/financial/admin.py for Stripe invoices (#23) 2026-07-31 04:33:55 -07:00
westfarn db95cabe9c Update company_site/company_site/settings/base.py for Stripe invoices (#23) 2026-07-31 04:33:48 -07:00
westfarn f932fcbdba Update .env.prod.example for Stripe invoices (#23) 2026-07-31 04:33:42 -07:00
westfarn bccab2b6e9 Add admin Stripe invoices and recurring customer subscriptions.
Closes #23: one-off hosted invoices, monthly Checkout subscriptions, pay-link email, and webhook status sync for admins.
2026-07-31 04:33:35 -07:00
westfarn 5fa61d02e8 added pricing, utm tracking, and leads (#20)
Unit Tests / test (push) Successful in 11s
Reviewed-on: #20
2026-07-24 18:29:19 -07:00
westfarn 139f375f73 Fix logout 403 CSRF verification failed (#18) (#19)
Unit Tests / test (push) Successful in 11s
## Summary
- Closes #18
- Logout POST was failing CSRF Origin checks on HTTPS because `CSRF_TRUSTED_ORIGINS` was unset (Django 5)
- Derive trusted origins from `DJANGO_ALLOWED_HOSTS` (override via `DJANGO_CSRF_TRUSTED_ORIGINS`)
- Trust reverse-proxy TLS headers in prod/beta (`SECURE_PROXY_SSL_HEADER`, secure cookies)

## Test plan
- [x] `python manage.py test public.tests.CsrfTrustedOriginsTests public.tests.LogoutCsrfTests`
- [ ] Deploy, log in on aimloperations.com, click Log Out → redirect home, no 403
- [ ] Confirm login still works after deploy

Reviewed-on: #19
2026-07-10 17:39:29 -07:00
westfarn c97bd16445 Require auth for /preview_email/ (#16) (#17)
Unit Tests / test (push) Successful in 10s
## Summary
- Closes #16
- Confirms `/preview_email/<pk>/` requires an authenticated user (`@login_required` already on the view)
- Adds unit tests for unauthenticated redirect and authenticated preview access

## Test plan
- [x] `python manage.py test public.tests.PreviewEmailAuthTests`
- [ ] Manually hit `/preview_email/1/` logged out → redirect to `/accounts/login/`
- [ ] Log in and hit same URL → email preview renders

Reviewed-on: #17
2026-07-10 10:57:48 -07:00
westfarn 8ccf17655d updateing deploy for westfarn user
Unit Tests / test (push) Successful in 11s
2026-07-08 12:26:07 -05:00
westfarn 04d842d799 Test who runs the job
Unit Tests / test (push) Successful in 10s
2026-07-08 12:21:50 -05:00
westfarn ae0f8a8bc5 Updated deploy to use act_runner keys
Deploy Company Site / test (push) Successful in 10s
Unit Tests / test (push) Successful in 10s
Deploy Company Site / docker (push) Successful in 16s
Deploy Company Site / deploy (push) Failing after 0s
2026-07-08 11:51:33 -05:00
westfarn 16dfb3faae Updated deploy to use act_runner keys
Unit Tests / test (push) Successful in 10s
2026-07-08 11:46:43 -05:00
westfarn a5fa08d4a0 update docker unittests
Unit Tests / test (push) Successful in 10s
2026-07-08 06:12:21 -05:00
westfarn 9a383c0ee9 Update workflow to use server-infra
Unit Tests / test (push) Successful in 10s
2026-07-08 06:05:11 -05:00
westfarn 6f97f6084d Adding images
Unit Tests / test (push) Successful in 11s
2026-07-07 15:28:45 -05:00
westfarn 426cc82f04 Dockerize Django app with dev/beta/prod env config and uv (#6)
Unit Tests / test (push) Successful in 10s
## Summary

- Containerize the Django app with Docker and docker-compose (dev + production)
- Refactor settings into `dev` / `beta` / `prod` environments driven by environment variables
- Connect to PostgreSQL via `DATABASE_URL` or `DB_*` vars
- Migrate package management from pip to uv (`pyproject.toml`, `uv.lock`)
- Split Gitea workflows: PRs run unit tests only; pushes to `master` run tests, Docker validation, and deploy
- Update deploy script to rsync code, preserve server `.env`, validate config, and run Docker compose

Closes #4

## Test plan

- [x] `uv run python manage.py test` passes locally (10/10)
- [x] `DJANGO_ENV=beta` and `DJANGO_ENV=prod` load with correct logging levels
- [x] `scripts/validate-env.sh` rejects missing production variables
- [ ] `docker compose up --build` starts app + Postgres locally
- [ ] Containerized unit tests pass in CI Docker job
- [ ] Server `.env` created from `.env.prod.example` before first production deploy
- [ ] CI workflow runs on this PR (tests only, no deploy)

Reviewed-on: #6
2026-07-07 11:23:50 -07:00
westfarn 7dd5ec3be1 Add Employee vs Client user type and filter time/reports by employee (#14) (#15)
Unit Tests / test (push) Successful in 16s
## Summary

- Adds `UserProfile` model with mutually exclusive **Employee** / **Client** types
- Replaces auto-Employee signal with auto-Client profile on user creation
- Data migration: users with time log entries → Employee; others → Client (orphan Employee rows removed)
- Admin UI at `/financial/manage_users` to set any user's type; profile page shows current type
- **Employees** can log time; **Clients** get read-only access to reports and time logs
- Time logs, reports, and dashboard filter to employees only
- 14 new tests covering signals, type switching, access control, and filtering

## Design decisions (from issue Q&A)

1. Client login = read-only financial access (reports + time logs, no edit/log time)
2. Employee and Client are strictly mutually exclusive
3. Admins (superusers) can change type via Manage Users
4. Bulk migration applied for existing users

## Test plan

- [x] `python manage.py test financial.tests` (14 tests pass)
- [x] `python manage.py test public.tests` (21 tests pass)
- [ ] Run migration on staging: `python manage.py migrate`
- [ ] Verify admin can set user types at `/financial/manage_users`
- [ ] Verify employee can log time at `/financial/timekeeping`
- [ ] Verify client sees reports/time logs read-only, cannot log time
- [ ] Verify employee filter dropdown excludes clients

Closes #14

Reviewed-on: #15
2026-07-05 12:54:50 +00:00
westfarn 2fb5204614 Fix WebMCP schema validity on contact form (#13)
Deploy Company Site / test (push) Successful in 9s
Deploy Company Site / deploy (push) Successful in 4s
## Summary

Follow-up to PR #12 / Lighthouse agentic-browsing audit on `/contact` (score 0.88).

- Add `toolparamdescription` to all contact form fields for WebMCP schema validity
- Move reCAPTCHA outside the annotated `<form>` so `g-recaptcha-response` is excluded from the declarative tool schema
- Always render `toolname` / `tooldescription` on the contact form (not gated by `WEBMCP_ENABLED`)
- Override `django_recaptcha/widget_v3.html` to associate captcha with `form="contact-form"`
- Update docs with HTTPS Lighthouse commands

## Test plan

- [x] `python manage.py test public.tests` — 21 tests pass
- [ ] Deploy and re-run Lighthouse agentic-browsing on `https://aimloperations.com/contact`
- [ ] Confirm `webmcp-schema-validity` passes (expected overall score 1.0)

Reviewed-on: #13
2026-07-02 18:02:44 +00:00
westfarn bb5aa6de82 Add WebMCP tool registration for agentic browsing (#9) (#12)
Deploy Company Site / test (push) Successful in 10s
Deploy Company Site / deploy (push) Successful in 4s
## Summary

- Add `WEBMCP_ENABLED` setting and guarded `webmcp-tools.js` loader on public pages
- Register navigation tools (`list_services`, `get_page_content`, `navigate_to_service`, `open_contact_with_subject`) and contact tool (`submit_contact_inquiry`)
- Annotate contact form with declarative WebMCP attributes for Lighthouse form coverage
- Extend `PUBLIC_PAGE_ENTRIES` with summaries shared by SEO and WebMCP tools
- Add `docs/webmcp.md`, update `docs/agentic-browsing.md`, and regression tests

Closes #9

## Test plan

- [x] `python manage.py test public.tests` — 20 tests pass
- [ ] Set `WEBMCP_ENABLED=True`, enable Chrome experimental web platform features flag
- [ ] Verify homepage HTML includes `webmcp-config` and `webmcp-tools.js`
- [ ] Verify `/contact` form has `toolname="submit_contact_inquiry"`
- [ ] Run Lighthouse agentic-browsing on `/` and `/contact` with experimental flag
- [ ] Call `list_services` from WebMCP-capable Chrome on homepage
- [ ] Call `submit_contact_inquiry` on `/contact` with `DEBUG=True` (reCAPTCHA bypass)

Reviewed-on: #12
2026-07-02 16:57:47 +00:00
westfarn 7c9aba7e6c feature/7-tianji-acknowledge-banner (#11)
Deploy Company Site / test (push) Successful in 10s
Deploy Company Site / deploy (push) Successful in 5s
Reviewed-on: #11
2026-07-02 14:20:19 +00:00
westfarn b5ab8eb512 Switch Tianji tracking from opt-in consent to acknowledge notice. (#10)
Deploy Company Site / test (push) Successful in 10s
Deploy Company Site / deploy (push) Successful in 4s
Load analytics on page load so visitors who never interact still produce data, while an informational banner lets users acknowledge the practice. Migrate legacy declined and accepted consent values so prior opt-outs are cleared and tracking resumes.

Closes #7

Reviewed-on: #10
2026-07-02 12:04:10 +00:00
westfarn 846f1b8a37 Improve Lighthouse Agentic Browsing readiness (#8)
Deploy Company Site / test (push) Successful in 10s
Deploy Company Site / deploy (push) Successful in 5s
## Summary

- Add `robots.txt`, `sitemap.xml`, and `llms.txt` endpoints so crawlers and AI agents can discover public pages
- Fix accessibility tree issues: contact form labels, semantic nav/profile dropdown buttons, cookie consent dialog ARIA, and dead `href="#"` links
- Reduce layout shift on homepage/contact via hero min-heights, trusted-by marquee sizing, and fixed cookie banner
- Add regression tests and `docs/agentic-browsing.md` for Lighthouse agentic-browsing audits

Closes #5. Also addresses overlap with #3 (sitemap + robots.txt).

## Test plan

- [x] `python manage.py test public.tests` (14 tests pass)
- [ ] Verify `GET /robots.txt`, `/sitemap.xml`, `/llms.txt` return 200 in staging/prod
- [ ] Confirm contact form labels visible and submittable on `/contact`
- [ ] Run Lighthouse `--only-categories=agentic-browsing` on homepage and contact page
- [ ] Smoke test mobile nav dropdown and cookie consent banner

Reviewed-on: #8
2026-07-02 11:36:54 +00:00
westfarn c8574d76d4 Updated the consent banner
Deploy Company Site / test (push) Successful in 9s
Deploy Company Site / deploy (push) Successful in 4s
2026-06-29 05:14:18 -05:00
westfarn 63edf8c64f Fixing how the consent banner loads
Deploy Company Site / test (push) Successful in 10s
Deploy Company Site / deploy (push) Successful in 5s
2026-06-28 07:14:35 -05:00
westfarn 0f2b255b59 Tieing tianji to debug
Deploy Company Site / test (push) Successful in 10s
Deploy Company Site / deploy (push) Successful in 5s
2026-06-28 07:00:55 -05:00
westfarn 9c7e02e41e Add unittests and fix tracking error
Deploy Company Site / test (push) Successful in 10s
Deploy Company Site / deploy (push) Successful in 5s
2026-06-28 06:55:44 -05:00
westfarn 6e7bd25e29 Adding site tracking and consent to Tianji
Deploy Company Site / deploy (push) Successful in 4s
2026-06-28 06:47:52 -05:00
westfarn 7e448cf61a Update .gitea/workflows/deploy.yml
Deploy Company Site / deploy (push) Successful in 8s
2026-06-27 18:06:03 +00:00
westfarn afc197ecdf Update README.md 2026-06-27 18:04:27 +00:00
westfarn e625dc30ad Updated to get gitea action runner 2026-06-27 12:19:54 -05:00
westfarn 06ac8d6eca A bunch of updates 2026-06-20 06:05:50 -05:00
westfarn 8cd3aa5f84 EVM complete 2026-03-23 03:31:44 -05:00
westfarn c88e344198 Implemented financial tracking 2026-03-20 13:07:28 -05:00
westfarn 6fa4fc1f7c updated company logo 2025-12-08 10:49:18 -06:00
westfarn 2d9b987d03 seo optimization 2025-11-24 20:37:30 -06:00
westfarn 7d079607cb Fixing sending contact emails 2025-11-24 13:14:45 -06:00
westfarn 9b99ac92ee small updates and refined chat page 2025-11-24 06:03:32 -06:00
westfarn 9979c5bb9c site redesign 2025-11-22 06:55:40 -06:00
westfarn 75c6bf2a53 added site tracking 2025-04-21 06:37:57 -05:00
westfarn 68463c5013 Update company_site/public/admin.py 2025-03-25 20:52:18 +00:00
westfarn 150e240363 preview email 2025-03-24 13:06:45 -05:00
westfarn 1fe85321e0 Update company_site/public/templates/admin/public/emailmessage/change_form.html 2025-03-23 16:38:43 +00:00
westfarn 40cd595e90 added video to homepage and black as pre-commit 2025-03-11 07:49:52 -05:00
westfarn 1047d262c8 Update for the new redisn 2025-03-06 11:30:36 -06:00
westfarn 9272f64677 Merge pull request 'Issue-1: addes site tracking' (#2) from gitea/issue-1 into master
Reviewed-on: #2
2025-03-06 16:54:52 +00:00
westfarn 5af6f8b4ed Issue-1: addes site tracking 2025-03-06 10:53:37 -06:00
westfarn cdb3c1b771 Initial commit 2025-03-06 10:51:12 -06:00
westfarn 2737ca7241 Initial commit 2025-03-03 10:54:16 +00:00