initialize repository
This commit is contained in:
parent
64a96c94ad
commit
0725537b66
3
.gitignore
vendored
3
.gitignore
vendored
@ -166,5 +166,4 @@ cython_debug/
|
|||||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
#.idea/
|
#.idea/
|
||||||
|
|
||||||
21
.vscode/launch.json
vendored
Normal file
21
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: ForensicTrails",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "launch",
|
||||||
|
"module": "forensictrails",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"justMyCode": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Python: Current File",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"justMyCode": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
15
.vscode/settings.json
vendored
Normal file
15
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"python.defaultInterpreterPath": "${workspaceFolder}/venv/bin/python",
|
||||||
|
"python.testing.pytestEnabled": true,
|
||||||
|
"python.testing.pytestArgs": [
|
||||||
|
"tests"
|
||||||
|
],
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.rulers": [
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"files.exclude": {
|
||||||
|
"**/__pycache__": true,
|
||||||
|
"**/*.pyc": true
|
||||||
|
}
|
||||||
|
}
|
||||||
59
pyproject.toml
Normal file
59
pyproject.toml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools>=68.0", "wheel"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "forensictrails"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "Forensic Investigation Documentation System"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.12"
|
||||||
|
license = {text = "MIT"} # Change as needed
|
||||||
|
authors = [
|
||||||
|
{name = "Your Name", email = "your.email@example.com"}
|
||||||
|
]
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 3 - Alpha",
|
||||||
|
"Intended Audience :: Legal Industry",
|
||||||
|
"Programming Language :: Python :: 3.12",
|
||||||
|
]
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
"PyQt6>=6.6.0",
|
||||||
|
"PyQt6-WebEngine>=6.6.0",
|
||||||
|
"reportlab>=4.0.0",
|
||||||
|
"python-docx>=1.0.0",
|
||||||
|
"Pillow>=10.0.0",
|
||||||
|
"cryptography>=41.0.0",
|
||||||
|
"pyinstaller>=6.0.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
dev = [
|
||||||
|
"pytest>=7.4.0",
|
||||||
|
"pytest-qt>=4.2.0",
|
||||||
|
"pytest-cov>=4.1.0",
|
||||||
|
"black>=23.0.0",
|
||||||
|
"ruff>=0.1.0",
|
||||||
|
"mypy>=1.5.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
forensictrails = "forensictrails.__main__:main"
|
||||||
|
|
||||||
|
[tool.setuptools.packages.find]
|
||||||
|
where = ["src"]
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
line-length = 100
|
||||||
|
target-version = ['py313']
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
line-length = 100
|
||||||
|
target-version = "py313"
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
testpaths = ["tests"]
|
||||||
|
python_files = ["test_*.py"]
|
||||||
|
python_classes = ["Test*"]
|
||||||
|
python_functions = ["test_*"]
|
||||||
0
src/forensictrails/__init__.py
Normal file
0
src/forensictrails/__init__.py
Normal file
24
src/forensictrails/__main__.py
Normal file
24
src/forensictrails/__main__.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
"""Entry point for ForensicTrails application."""
|
||||||
|
import sys
|
||||||
|
from PyQt6.QtWidgets import QApplication
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main entry point for the application."""
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
app.setApplicationName("ForensicTrails")
|
||||||
|
app.setOrganizationName("Your Organization")
|
||||||
|
|
||||||
|
# TODO: Create and show main window
|
||||||
|
# from forensictrails.gui.main_window import MainWindow
|
||||||
|
# window = MainWindow()
|
||||||
|
# window.show()
|
||||||
|
|
||||||
|
print("ForensicTrails - Forensic Investigation Documentation System")
|
||||||
|
print("Application starting...")
|
||||||
|
|
||||||
|
sys.exit(app.exec())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
0
src/forensictrails/core/__init__.py
Normal file
0
src/forensictrails/core/__init__.py
Normal file
0
src/forensictrails/db/__init__.py
Normal file
0
src/forensictrails/db/__init__.py
Normal file
107
src/forensictrails/db/schema.sql
Normal file
107
src/forensictrails/db/schema.sql
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
-- Cases table
|
||||||
|
CREATE TABLE cases (
|
||||||
|
case_id TEXT PRIMARY KEY,
|
||||||
|
title TEXT NOT NULL,
|
||||||
|
date_opened TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
lead_investigator TEXT NOT NULL,
|
||||||
|
classification TEXT,
|
||||||
|
summary TEXT,
|
||||||
|
status TEXT DEFAULT 'Active',
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
modified_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
|
-- Notes table (append-only, immutable)
|
||||||
|
CREATE TABLE notes (
|
||||||
|
note_id TEXT PRIMARY KEY,
|
||||||
|
case_id TEXT NOT NULL,
|
||||||
|
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
content TEXT NOT NULL,
|
||||||
|
investigator TEXT NOT NULL,
|
||||||
|
question_tags TEXT, -- JSON array: ["WHO", "WHAT", etc.]
|
||||||
|
hash TEXT NOT NULL, -- SHA256 of content + timestamp
|
||||||
|
FOREIGN KEY (case_id) REFERENCES cases(case_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
-- Evidence table
|
||||||
|
CREATE TABLE evidence (
|
||||||
|
evidence_id TEXT PRIMARY KEY,
|
||||||
|
case_id TEXT,
|
||||||
|
description TEXT NOT NULL,
|
||||||
|
filename TEXT,
|
||||||
|
file_size INTEGER,
|
||||||
|
md5_hash TEXT,
|
||||||
|
sha256_hash TEXT,
|
||||||
|
source_origin TEXT,
|
||||||
|
received_date DATE,
|
||||||
|
received_by TEXT,
|
||||||
|
physical_location TEXT,
|
||||||
|
notes TEXT,
|
||||||
|
status TEXT DEFAULT 'Active',
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
FOREIGN KEY (case_id) REFERENCES cases(case_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
-- Chain of Custody table
|
||||||
|
CREATE TABLE chain_of_custody (
|
||||||
|
coc_id TEXT PRIMARY KEY,
|
||||||
|
evidence_id TEXT NOT NULL,
|
||||||
|
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
action TEXT NOT NULL, -- 'received', 'transferred', 'accessed', 'archived'
|
||||||
|
from_person TEXT,
|
||||||
|
to_person TEXT,
|
||||||
|
location TEXT,
|
||||||
|
purpose TEXT,
|
||||||
|
signature_hash TEXT, -- Digital signature if needed
|
||||||
|
FOREIGN KEY (evidence_id) REFERENCES evidence(evidence_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
-- Attachments table (screenshots, documents)
|
||||||
|
CREATE TABLE attachments (
|
||||||
|
attachment_id TEXT PRIMARY KEY,
|
||||||
|
case_id TEXT NOT NULL,
|
||||||
|
note_id TEXT, -- Optional link to specific note
|
||||||
|
filename TEXT NOT NULL,
|
||||||
|
file_path TEXT NOT NULL,
|
||||||
|
file_hash TEXT NOT NULL,
|
||||||
|
mime_type TEXT,
|
||||||
|
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
FOREIGN KEY (case_id) REFERENCES cases(case_id),
|
||||||
|
FOREIGN KEY (note_id) REFERENCES notes(note_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
-- Investigation Questions tracking
|
||||||
|
CREATE TABLE question_entries (
|
||||||
|
entry_id TEXT PRIMARY KEY,
|
||||||
|
case_id TEXT NOT NULL,
|
||||||
|
note_id TEXT NOT NULL,
|
||||||
|
question_type TEXT NOT NULL, -- WHO/WHAT/WHEN/WHERE/HOW/WHY/WITH_WHAT
|
||||||
|
entry_text TEXT NOT NULL,
|
||||||
|
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
FOREIGN KEY (case_id) REFERENCES cases(case_id),
|
||||||
|
FOREIGN KEY (note_id) REFERENCES notes(note_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
-- User settings (for multi-user)
|
||||||
|
CREATE TABLE users (
|
||||||
|
user_id TEXT PRIMARY KEY,
|
||||||
|
username TEXT UNIQUE NOT NULL,
|
||||||
|
full_name TEXT NOT NULL,
|
||||||
|
role TEXT DEFAULT 'Investigator', -- Investigator/Manager/Admin
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
|
-- Optional: Task assignments (team mode)
|
||||||
|
CREATE TABLE tasks (
|
||||||
|
task_id TEXT PRIMARY KEY,
|
||||||
|
case_id TEXT NOT NULL,
|
||||||
|
title TEXT NOT NULL,
|
||||||
|
description TEXT,
|
||||||
|
assigned_to TEXT,
|
||||||
|
assigned_by TEXT,
|
||||||
|
priority TEXT,
|
||||||
|
due_date DATE,
|
||||||
|
status TEXT DEFAULT 'Open',
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
FOREIGN KEY (case_id) REFERENCES cases(case_id)
|
||||||
|
);
|
||||||
0
src/forensictrails/gui/__init__.py
Normal file
0
src/forensictrails/gui/__init__.py
Normal file
0
src/forensictrails/gui/dialogs/__init__.py
Normal file
0
src/forensictrails/gui/dialogs/__init__.py
Normal file
0
src/forensictrails/gui/widgets/__init__.py
Normal file
0
src/forensictrails/gui/widgets/__init__.py
Normal file
0
src/forensictrails/utils/__init__.py
Normal file
0
src/forensictrails/utils/__init__.py
Normal file
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
Loading…
x
Reference in New Issue
Block a user