This is a powerful and flexible web-based ERP system designed to streamline the operations of a service-based agency. It provides a comprehensive suite of tools for managing customers, products, and applications, with a focus on document handling and workflow automation.
- 🧑💼 Customer Relationship Management (CRM): Maintain a centralized database of all your customers, including their personal information, contact details, and a history of their interactions with your agency.
- 📦 Product Catalog: Define and manage the services you offer, including their pricing, descriptions, and any associated documents or requirements.
- 📝 Application Processing: A sophisticated module for handling customer applications from start to finish. This includes:
- 📄 Document Management: Upload, store, and track all necessary documents for each application.
- 🤖 Workflow Automation: Define and enforce custom workflows for different types of applications, ensuring a consistent and efficient process.
- ⏱️ Status Tracking: Monitor the progress of each application in real-time, from submission to approval.
- 💸 Invoicing and Payments: Generate professional invoices for your services and track their payment status. The system supports multiple payment methods and provides a clear overview of your agency's financial health.
- 🔗 RESTful API: A comprehensive API that allows for seamless integration with other systems and services. This enables you to extend the functionality of the application and connect it to your existing tools.
- 🎨 Dynamic Frontend: The application utilizes a modern and interactive frontend built with a combination of Django templates, Bootstrap, and Javascript frameworks for a responsive and user-friendly experience.
- 🧠 Advanced Document Processing:
- 🛂 Passport OCR: Automatically extract information from passport scans, reducing manual data entry and errors.
- 📑 PDF Handling: Generate and process PDF documents as part of the application workflow.
- 🔍 MRZ Accuracy Boosters: Deskewing, adaptive thresholding, and multi-pass OCR retries are applied automatically to squeeze more signal out of low-quality passport scans.
- 🗄️ Backup and Storage:
- 🔒 Automated Backups: The system is configured to perform regular backups of the database to a secure cloud storage provider.
- ☁️ Cloud Storage Integration: Store and manage your documents and other files in the cloud for easy access and scalability.
- 👥 User and Permissions Management: A granular permissions system allows you to control access to different parts of the application, ensuring that each user only has access to the information and features they need.
- 🐍 Backend: Django 5, Django REST Framework
- 🖥️ Frontend: Django Templates, Bootstrap 5, FontAwesome, Django Unicorn
- 🗃️ Database: PostgreSQL
- ⏲️ Task Queue: Django Cron
- 🗂️ File Storage: Local storage, with support for Dropbox
- 🚢 Deployment: Gunicorn, Whitenoise, Docker
Django Unicorn is a reactive component framework for Django that allows you to build modern, interactive web applications without leaving the Django ecosystem. We chose Django Unicorn for several reasons:
- Seamless Integration: Unicorn is tightly integrated with Django and feels like a natural extension of the core Django experience.
- Reactive UI: It enables highly-interactive user interfaces by making AJAX calls in the background and dynamically updating the HTML DOM, similar to frameworks like Vue or React, but with pure Django templates.
- Simplicity: Unicorn installs just like any other Django package and is easy to implement. You only need to add a few magic attributes to your Django HTML templates to get started.
- No JavaScript Required: You can build interactive components without writing custom JavaScript, reducing complexity and keeping your codebase clean.
- Modern UX: It brings the power of reactive components to Django, allowing for a smoother and more engaging user experience.
By using Django Unicorn, our application benefits from a modern, dynamic frontend while maintaining the simplicity and robustness of Django. This choice helps us deliver a better experience to users and developers alike. ✨
To get started with the application, you will need to have Python, Django, and a PostgreSQL database installed. The application is designed to be deployed using Docker, which simplifies the setup process.
-
📥 Clone the repository.
-
📦 Install the required dependencies using uv and
pyproject.toml:uv pip install --editable . -
⚙️ Configure the database settings in the
.envfile. -
🛠️ Run the database migrations using
python manage.py migrate. -
🚀 Start the development server using
python manage.py runserver.
For a production environment, it is recommended to use the provided Docker setup.
-
Detect inline <script> tags: To help centralize JavaScript and avoid inline scripts in templates, run:
scripts/check_inline_script_tags.py— scanstemplates/for inline<script>tags and exits with non-zero code if any are found.- You can add this to CI or as a git pre-commit hook to prevent regressions.
To enable translations and generate compiled message files used by Django, follow these steps:
- Create or edit translation files under
locale/<lang>/LC_MESSAGES/django.po. - Compile translations to binary
.mofiles with:
python manage.py compilemessages
After compiling, make sure
LOCALE_PATHSinbusiness_suite/settings/base.pypoints to thelocale/folder (it already does).We include a minimal Indonesian translation for the
MaleandFemalelabels inlocale/id/LC_MESSAGES/django.po. Runcompilemessagesto generatedjango.moand have Django display the translated labels during runtime and tests.
The application exposes a RESTful API for interacting with its various modules. To use the API, you will need to obtain an authentication token. The API endpoints are documented and can be explored using the browsable API feature of Django REST Framework.
This comprehensive business management suite is a powerful tool for any agency looking to streamline its operations, improve efficiency, and provide a better experience for its customers. Its modular design and flexible architecture make it easy to customize and extend to meet the specific needs of your business. ✨