How zhuinfo/django-erp works
• Web Server & Application Entry: At the center is the Django application itself with manage.py serving as the entry point, and mis/settings.py and mis/urls.py providing core configuration and URL routing.
• Common and Utility Modules: Include components like “common” (shared constants and generic functionalities), “midware” (middleware such as custom user handling), and “plugin” (extensible functionality such as workflow actions and Excel imports).
• Frontend Templates & Static Assets: Represent the “templates” directory (with admin and default templates for UI rendering) and the “static” assets (CSS, JS, and images) that support the web interface.
• Internationalization: Mark a component for localization with the “locale” directory which stores language-specific files.
• Upload & Documentation: Acknowledge the “upload” and “文档” directories as supporting resources for data import/export and user manuals.
• Installation & Setup: Optionally, mention the Install folder which includes SQL initial scripts and requirements.
Interactions and relationships
• That the Web Server (the Django framework) routes incoming HTTP requests to the appropriate app views (using mis/urls.py and individual app URL configurations, such as those found in invent/urls.py and selfhelp/urls.py).
• Middleware (“midware” module) as intercepting and processing requests/responses, ensuring proper user context, and potentially customizing session behavior.
• “plugin” module to the ERP modules (especially workflow) to signal how business logic like workflow actions and nodes are injected into the app.
• Static asset serving and template rendering flows: static files from the “static” directory and HTML templates from the “templates” directory feed into the presentation layer.
Architectural patterns and design principles
• That the project follows Django’s “MTV” (Model-Template-View) pattern. Each ERP module encapsulates its domain logic through models, presentation via views/templates, and business logic often found in views or dedicated services.
• Modularization: each ERP domain (sales, purchase, inventory, etc.) is encapsulated into separate apps, which encourages separation of concerns and easier future enhancements or isolated testing.
• Use of middleware and plugins as extension points within the application, adhering to a loosely coupled architecture.
Relevant technologies and frameworks
• MySQL as the chosen database backend.
• Cite additional technology components like the MySQL database driver (as mentioned in the README troubleshooting section) and potential usage of front-end assets (JavaScript and CSS in the static directory) that deliver interactivity to the UI.