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 overall process is submission, determination, and certification. Here is a detailed breakdown:
- Police Collection (👮): Law enforcement officers collect suspected cannabis samples during operations
- Case Initiation (📞): Officers contact DBCA Herbarium to initiate the identification process
- Scientist Assignment (👩🔬): Approved Botanists within the meaning of Acts* are assigned to the case
- Appointment Set (📅): A time and location is set for the Approved Botanist to travel to and assess the specimens
- Laboratory Analysis (🔬): Approved Botanist examines the product at the specified location, marking determintions on a police form with bag identification tags
- Digital Processing (💻): Form passed on to BCS Finance Officers. Results are entered into the system's secure database, along with any attachments
- Certificate Generation (📄): System saves and outputs unsigned certificate/s, which are printed and provided to Approved Botanist (If erroneous, Approved Botanist uses system to request changes)
- Final Sign Off (✅): Approved Botanist signs and provides copies to Finance Officers to scan back into our system and send automated email of certificate and police form attached
- Court Proceedings (🏛️): Endorsed Certificate/s hand-delivered back 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.