- WeFa (Web Factory) ships two publishable packages:
django/contains thenside-wefaDjango toolkit,vue/contains the@nside/wefaVue 3 component library. - Goal: provide production-ready auth, legal-consent, other backend packages, and UI building blocks so product teams can assemble full-stack experiences quickly.
- Primary technologies: Python 3.12+, Django 5.2 + Django REST Framework, Vitest + Playwright, Vue 3 + PrimeVue + Tailwind 4.
README.md– top-level overview; defer todjango/README.mdandvue/README.mdfor workspace specifics.django/– reusable apps (nside_wefa.common,.authentication,.legal_consent, etc) plusdemo/project and pytest setup.vue/– component library, demo playground, Storybook, scripts (e.g.wefa-install), and AI guidance (scripts/files/copilot-instructions.md).- Contribution guides:
django/CONTRIBUTE.md&vue/CONTRIBUTE.mddefine environment setup, quality gates, and release discipline.
- For frontend work inside
vue/(components, containers, stories/docs, translations, tests), use the$wefa-vue-frontendskill defined atskills/wefa-vue-frontend/SKILL.md. - For work inside
django/, use the backend guidance in this file until a dedicateddjango/AGENTS.mdis introduced. - For cross-cutting work (API + UI), follow this file for shared expectations and apply the
wefa-vue-frontendskill for the frontend part.
- Convention over configuration: align with provided settings helpers (
NSIDE_WEFAfor Django and documented Vue defaults) before introducing bespoke wiring. - Type safety & documentation: keep Python and TypeScript hints accurate; add comments only for non-obvious logic; update relevant docs whenever behaviour changes.
- Tests as gatekeepers: extend existing suites when behaviour changes; no feature lands without matching tests unless explicitly justified.
- App structure: extend existing apps (
nside_wefa.authentication,.legal_consent,.common, etc) unless a new domain warrants a standalone package. Mirror current layout:apps.py,checks.py,models/,serializers.py,urls.py,views/,tests/,README.md. - Settings contract: all configuration flows through the
NSIDE_WEFAdict. When adding options, document indjango/README.md, add system checks inchecks.py, and ensure defaults keep migrations optional. - APIs & serializers: follow DRF patterns already present; keep authentication utilities DRY by placing shared logic under
utils/. Expose URLs throughinclude('nside_wefa.<app>.urls')and cover them in tests. - Testing & quality: use pytest with Django (
pytestorpython manage.py test) plus coverage when needed. Runruff format .,ruff check ., andmypy nside_wefa/before submission. Demo project (django/demo) is available for manual validation.
- Stay within the workspace toolchain:
uv/pip + Hatchling builds for Django, npm scripts + Vite for Vue. - Keep lockfiles consistent with the package manager in use (
uv.lock,package-lock.json). - Maintain documentation parity: adjust relevant READMEs, MDX docs, or changelog entries (once introduced) whenever behaviour changes.
- For cross-cutting features, coordinate backend API shape first, then wire the frontend through the generated clients/composables.
- Before shipping backend change:
- Update/extend system checks and settings docs.
- Provide migrations only when required and reversible.
- Add pytest coverage for new branches/edge cases.
- Before opening a PR:
- Run required backend lint/format/test commands.
- Update backend docs/demo snippets as needed.
- Document breaking changes and version impacts.
- Backend install:
cd django && pip install -e .[dev](oruv sync --all-extras) - Backend tests:
cd django && pytest - Backend lint/type:
cd django && ruff check . && ruff format --check && mypy nside_wefa/
- Re-read the relevant
README.mdandCONTRIBUTE.mdbefore altering flows. - Trace existing backend implementations (e.g.,
nside_wefa/legal_consent) to mirror patterns. - Surface open questions early (e.g., new authentication modes) so design/system owners can confirm direction.
Following this guide keeps contributions aligned with the existing architecture, ensures compliance with the WeFa component hierarchy, and preserves release quality across both Django and Vue packages.