WIP: v1.0.0
The Cannabis system is a digital platform developed for DBCA's Herbarium. This application streamlines the documentation and certification of determinations made by Approved Botanists for suspected cannabis specimens, providing legally admissible evidence for law enforcement and court proceedings.
The primary purpose of this application is certificate generation from determination results. Approved Botanists perform their assessments on-site at police stations using Priority 3 forms, then the results are entered into this system for processing.
- Law enforcement officers collect suspected cannabis samples during operations
- Officers contact DBCA Herbarium to arrange an assessment
- An Approved Botanist* travels to the police station, examines the specimens, and records determinations on a Priority 3 form with bag identification tags
- Case Creation -- Finance Officer creates a case, entering details from the completed Priority 3 form (officer, defendant, and bag information)
- Assessment Entry -- Determination results from the physical form are entered per bag (species, weight, determination outcome)
- Certificate Generation -- The system generates unsigned PDF certificates from the entered data, ready for printing
- Batching -- Completed cases are grouped into batches for invoicing and cost tracking and provided to finance officers via a zip file
- Completion -- Certificates are printed and provided to the Approved Botanist for signing. After invoices are raised externally, the invoice number is recorded in-app
- Approved Botanist signs the printed certificates
- Finance Officers scan signed certificates back into the system and send automated emails with certificate and police form attached
- Endorsed certificates are delivered to police to serve as legal evidence for prosecution
This application is built using a modern tech stack:
- Frontend: React.js with responsive design for efficient use across devices
- Backend: Django REST framework providing robust API endpoints
- Database: PostgreSQL for secure, reliable data storage
- Authentication: Multi-level access controls with role-based permissions. Utilises DBCA Utils for SSO
- Document Generation: PrinceXML integration for creating maintainable and legally compliant PDF certificates with digital signatures
- Frontend: React, Vite, Bun, Typescript, Mobx, Tanstack Query, Tailwind, Shadcn, React Hook Form, Zod, Axios, React Helmet, React Router, React Icons
- Backend: Django, Python, Celery, Redis, Django Rest Framework, PrinceXML
- Extraction, transformation, and loading (ETL) of historical records from legacy systems into the new, well-structured database
- Automated certificate generation with tamper-evident features
- Task Dashboard with status updates on Submissions
- Recordkeeping of costs involved and revenues, including adjustment of certication fee
- *(Limited) Integration capabilities with law enforcement systems (for requesting an assessment), providing an email trail for recordkeeping
This system modernises the cannabis identification workflow by replacing an outdated Microsoft Access database with a robust digital platform. It ensures seamless processing of specimen determinations while maintaining secure, court-admissible evidentiary records that meet legal standards for prosecution.
This project has been setup to run entirely locally or in a Docker environment. You can use docker-compose.dev.yml to establish a local docker setup (after run migrations and createsuperuser) or use bun and poetry:
# From frontend folder after bun install
bun run dev # From backend folder after poetry init/shell and install
python manage.py runserver*Approved Botanists as defined in the Misuse of Drugs Act 1981 and the Misuse of Drugs Amendment Act 1995.