How jonmeister/db-2024-django-react_project_example works
Facturion is a Django REST backend with a React web client and an Expo/React Native starter app. The clearest implemented user workflow is customer listing and creation: the web customer page fetches records, submits a new customer, refreshes the list, and renders customer cards; the Django customer view handles list/create requests and persists validated data. The backend also has manufacturer, product, order, and order-item domains. Mobile files appear to be a starter surface; their relationship to backend features is not established by the excerpts. Unshown URL routing and database configuration limit some links.
Main entry points: clients/views.py Customer endpoint · manufacturer/views.py Manufacturer endpoint · product/views.py Product endpoint · order/views.py Order endpoint
Components 23
Web client
- App shell
frontend/src/App.js - Web routes
frontend/src/routes/index.js - Customer page
frontend/src/pages/Customer/index.js - Customer API client
frontend/src/api/customerApi.js - Customer card
frontend/src/components/customer.card.jsx
Django API
- Customer endpoint
backend/apps/clients/views.py - Customer serializer
backend/apps/clients/serializer.py - Customer model
backend/apps/clients/models.py
Catalog domains
- Manufacturer endpoint
backend/apps/manufacturer/views.py - Manufacturer serializer
backend/apps/manufacturer/serializer.py - Manufacturer model
backend/apps/manufacturer/models.py - Product endpoint
backend/apps/product/views.py - Product serializer
backend/apps/product/serializer.py - Product model
backend/apps/product/models.py
Order domains
- Order endpoint
backend/apps/order/views.py - Order serializer
backend/apps/order/serializer.py - Order model
backend/apps/order/models.py - Order-item endpoint
backend/apps/orderitem/views.py - Order-item serializer
backend/apps/orderitem/serializer.py - Order-item model
backend/apps/orderitem/models.py
Mobile starter
- Expo app
mobile/app/(tabs)/index.tsx
Other components
- User
- PostgreSQL
Connections 21
- User → App shell: uses
- App shell → Web routes: renders
frontend/src/App.js - Web routes → Customer page: routes to
frontend/src/routes/index.js - Customer page → Customer API client: fetches and creates
frontend/src/pages/Customer/index.js - Customer page → Customer card: renders
frontend/src/pages/Customer/index.js - Customer API client → Customer endpoint: HTTP requests
- Customer endpoint → Customer model: queries and saves
backend/apps/clients/views.py - Customer endpoint → Customer serializer: validates with
backend/apps/clients/views.py - Customer endpoint → PostgreSQL: persists via ORM
backend/apps/clients/views.py - Manufacturer endpoint → Manufacturer model: queries and saves
backend/apps/manufacturer/views.py - Manufacturer endpoint → Manufacturer serializer: validates with
backend/apps/manufacturer/views.py - Manufacturer endpoint → PostgreSQL: persists via ORM
backend/apps/manufacturer/views.py - Product endpoint → Product model: queries and saves
backend/apps/product/views.py - Product endpoint → Product serializer: validates with
backend/apps/product/views.py - Product endpoint → PostgreSQL: persists via ORM
backend/apps/product/views.py - Order endpoint → Order model: queries and saves
backend/apps/order/views.py - Order endpoint → Order serializer: validates with
backend/apps/order/views.py - Order endpoint → PostgreSQL: persists via ORM
backend/apps/order/views.py - Order-item endpoint → Order-item model: queries and saves
backend/apps/orderitem/views.py - Order-item endpoint → Order-item serializer: validates with
backend/apps/orderitem/views.py - Order-item endpoint → PostgreSQL: persists via ORM
backend/apps/orderitem/views.py