Full-Stack Software Engineering ยท Database Design
Federal Forensic Case Management Suit
Federal Forensic Case Management Suit is an enterprise-grade case dossier and physical evidence tracking platform. Engineered with advanced MySQL Views, Transactions, Stored Procedures, and Automated Triggers to preserve data integrity and maintain a legally auditable Chain of Custody.
Federal Forensic Case Management Suit Dashboard โ live metrics, recent activity feed, and security logs
Problem & Solution
Understanding the core value proposition of Federal Forensic Case Management Suit.
โ The Problem
- โข Manual spreadsheets for physical evidence logs lead to broken Chain of Custody errors in court.
- โข Relational database constraints and log consistency are often neglected at the database server level.
- โข Deleting user accounts or cases can orphan records, ruining forensic accountability audit trails.
โ The Solution
- โข Database transactions bundle handover logs and evidence statuses atomically to guarantee consistency.
- โข Custom SQL Views offload complex multi-table queries and count aggregations to the MySQL engine.
- โข Database triggers automatically log user actions, maintaining an immutable security audit history.
My Role โ Full-Stack Developer & Database Architect
As the sole developer, I designed the database schemas, built the Python FastAPI controllers, wrote custom SQL stored procedures, views, and database triggers, and created the responsive frontend layout using Next.js.
Key Responsibilities
๐ Database & Project Metrics
Application Interface Showcase
Explore the core features of the Forensic Federal Case Management Suit.
๐ Case Dossier Printable Briefing
Printed Case briefing - optimized format for legal case portfolios
Enables officers to export case details into a printable file. The stylesheet strips out interactive buttons, background panels, and search bars, creating a clean document with case metadata, crime scenes, evidence registries, and suspect lists.
- โ Strips out interactive components automatically
- โ Structured tables for evidence grids and personnel listings
- โ Formatted case history logs
๐ก๏ธ Global Evidence Vault & Timeline
Chain of custody logs - interactive handover timeline and tracking
A centralized list of all physical evidence items logged in the system. Selecting an item loads its complete Chain of Custody handoff log history, tracking officers, coordinates, dates, and transfer remarks.
- โ Live Chain of Custody vertical timelines
- โ One-click locker seal status toggling
- โ Transaction-backed custody handover forms
๐ฅ User Accounts Administration Panel
User Management โ search, register credentials, and delete profiles
Allows administrators to manage profiles, assign roles, and allocate departments. New profiles receive hashed passwords and auto-generated employee IDs, while deleted accounts safely update referencing tables.
- โ Search and filter profiles by name or employee ID
- โ Add User modal with secure credentials creation
- โ Safety checks to prevent self-deletion
MySQL Database Integrations
Reviewing the custom views, stored procedures, and triggers implemented directly in MySQL.
๐ Stored Procedure with ACID Transaction
Bundles evidence custody handoffs into an atomic database operation, rolling back updates if either logging or status changes fail.
CREATE PROCEDURE sp_transfer_custody(
IN p_evidence_id INT, IN p_from_user INT, IN p_to_user INT,
IN p_purpose VARCHAR(255), IN p_location VARCHAR(255),
IN p_remarks TEXT, IN p_status VARCHAR(50), OUT p_success BOOLEAN
)
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
SET p_success = FALSE;
END;
START TRANSACTION;
INSERT INTO evidence_custody (evidence_id, from_user, to_user, transfer_date, purpose, location, remarks)
VALUES (p_evidence_id, p_from_user, p_to_user, NOW(), p_purpose, p_location, p_remarks);
UPDATE evidence SET current_status = p_status, storage_location = p_location
WHERE evidence_id = p_evidence_id;
COMMIT;
SET p_success = TRUE;
END;
โก Automatic Audit Triggers
Triggers automatically write state changes on cases and evidence tables to the `audit_logs` table, maintaining an independent audit history.
CREATE TRIGGER trg_evidence_update
AFTER UPDATE ON evidence FOR EACH ROW
BEGIN
IF OLD.current_status <> NEW.current_status OR OLD.storage_location <> NEW.storage_location THEN
INSERT INTO audit_logs (user_id, action, table_name, record_id, timestamp, ip_address)
VALUES (NEW.collected_by, CONCAT('EVIDENCE_STATUS: status=', NEW.current_status), 'evidence', NEW.evidence_id, NOW(), '127.0.0.1');
END IF;
END;
๐๏ธ Aggregated SQL Reporting Views
Calculates total counts for cases, scenes, investigators, and evidence on the database side to optimize query performance.
CREATE OR REPLACE VIEW v_case_summaries AS SELECT c.case_id, c.case_number, c.title, c.crime_type, c.priority, c.status, CONCAT(u.first_name, ' ', u.last_name) AS lead_investigator_name, (SELECT COUNT(*) FROM evidence e WHERE e.case_id = c.case_id) AS evidence_count, (SELECT COUNT(*) FROM suspects s WHERE s.case_id = c.case_id) AS suspect_count FROM cases c LEFT JOIN users u ON c.lead_investigator = u.user_id;
Architecture & Directory Structures
Platform component structures, directory mapping, and local setups.
๐ VS Code Workspace Explorer
โ๏ธ Runtime Architecture Stack
โฑ๏ธ Development Timeline
Challenges & Solutions
Engineering solutions implemented to address system limitations and integration challenges.
MySQL Semicolon Procedural Parsing
Python splits schema files using semicolon separators, breaking stored procedures and triggers. I bypassed this by executing advanced features as unified raw SQL blocks directly during bootstrap.
Session Reactivity & Page Refreshes
Browser refreshes reset tab selections. I solved this by synchronizing tab states with URL parameters (`?tab=...&caseId=...`), preserving coordinates across browser reloads.
Cascade Integrity Safeguards
Prevented orphaned records when deleting user profiles. Configured `ON DELETE SET NULL` for user-creator attributes while protecting the active session user profile from self-deletion.
What I Learned
- โข Designing transactional stored procedures in MySQL.
- โข Coding automated triggers for table updates.
- โข Constructing views to offload join queries.
- โข Synchronizing Next.js client states with URL parameters.
- โข Managing uvicorn connection pools in Python.
- โข Structuring print-ready CSS dossiers.
Future Improvements
- โข Barcode Scanner API: Integrating mobile camera APIs to support barcode scanning.
- โข Digital Signatures: Adding signature pad components to sign custody logs.
- โข Audit Log Visualizer: Adding charts to display audit logs.
Measurable Project Impact
Key outcomes from the Federal Forensic Case Management Suit project.
โ Legally Consistent Auditing
Enforces a clean transaction timeline for all evidence handovers, eliminating inconsistent database updates.
โ Optimized Relational Queries
Utilizes database-level views to aggregate statistics, reducing case overview query loading times.
โ Independent Security Logs
Records case and evidence state modifications automatically using triggers, ensuring auditing is independent of application routes.
Case Study Key Takeaways
- โ Engineered relational case timelines and evidence directories
- โ Programmed MySQL transactions and stored procedures
- โ Structured automated triggers and auditing logs
- โ Migrated components to Next.js with state parameter synchronization
- โ Designed print-ready CSS briefing dossier layouts
Lighthouse Metrics