Secure admin-controlled evidence management system with role-based access control.
- 8-Role RBAC System β
- Dual Authentication (MetaMask + Email) β
- Admin Dashboard & User Management β
- Evidence Upload/Download System β
- Database Security (RLS) β
- Real-time Notifications β
- Complete Documentation β
- TRUE BLOCKCHAIN INTEGRATION π
- FIX ALL PHASE 1 ISSUES π§
- IMPLEMENT IPFS STORAGE π¦
- MODERN UI/UX UPGRADE π¨
- ADVANCED SECURITY π
- PERFORMANCE OPTIMIZATION β‘
Digital evidence management often faces challenges like data tampering, lack of a verifiable chain of custody, and inconsistent access control. Traditional systems can be opaque, making it difficult for judicial and investigative bodies to trust the integrity of digital artifacts.
EVID-DGC addresses these issues by leveraging blockchain-inspired principles and robust role-based access control. By utilizing a secure Supabase backend and providing immutable audit logs, the system ensures that every actionβfrom evidence upload to court reviewβis tracked and verifiable, maintaining the highest standards of digital forensic integrity.
calmed your contribute certificate after your pr is merged https://evid-dgc-certificates.onrender.com/
- β 8-Role RBAC - Complete role-based access control
- β Dual Authentication - MetaMask wallet + Email/Password
- β Admin Dashboard - Full user management interface
- β Evidence Upload - Multi-format file support (PDF, images, videos, audio)
- β Database Security - Supabase PostgreSQL with Row Level Security
- β Real-time Notifications - Socket.IO WebSocket integration
- β Audit Logging - Complete activity tracking
- β File Processing - Watermarking and compression
- β Case Management - Full case lifecycle with status tracking
- β Export System - Evidence download with watermarks
- β Password Hashing - SHA-256 with salt
- β Rate Limiting - API protection
- β Input Validation - XSS and injection prevention
- β CORS Protection - Cross-origin security
- β Session Management - Secure user sessions
- β Test Account System - Automated test user creation
- β Role Testing - Easy role switching for development
- β Health Monitoring - System health endpoints
- β Error Handling - Comprehensive error management
| Category | Technologies | Status |
|---|---|---|
| Frontend | HTML5, CSS3, Vanilla JavaScript, Socket.IO Client | β Working |
| Backend | Node.js v16+, Express.js, Socket.IO (Real-time) | β Working |
| Database | Supabase (PostgreSQL with Row Level Security) | β Working |
| Authentication | MetaMask/Web3, Email/Password | β Working |
| File Processing | Multer, Sharp, PDF-Lib | β Working |
| Icons & UI | Lucide Icons, Custom CSS | β Working |
| Hosting | Render, Vercel, Netlify Compatible | β Working |
| Smart Contracts | Solidity (Code Ready) | |
| Storage | Local/Database (IPFS Planned) | |
| Blockchain | Polygon Network (Configured) |
The system implements 8 distinct roles to ensure strict access control:
- Public Viewer: Browse public case information.
- Investigator: Handle case creation and evidence uploads.
- Forensic Analyst: Perform technical analysis and generate reports.
- Legal Professional: Conduct legal reviews of cases and evidence.
- Court Official: Manage judicial proceedings and scheduling.
- Evidence Manager: Maintain the chain of custody and storage integrity.
- Auditor: Oversee system compliance and review audit logs.
- Administrator: Full system oversight, user management, and configuration.
βββ contracts/ # Smart contract files
β βββ EvidenceStorage.sol # Main evidence storage contract
βββ docs/ # Complete documentation
β βββ USER_GUIDE.md # User manual for all roles
β βββ DEVELOPER_GUIDE.md # Development setup and workflow
β βββ SECURITY.md # Security practices and policies
β βββ DEPLOYMENT.md # Production deployment guide
β βββ MAINTENANCE.md # System maintenance procedures
β βββ swagger.js # API documentation (OpenAPI)
βββ public/ # Frontend application files
β βββ index.html # Main landing page
β βββ app.js # Core frontend logic
β βββ config.js # Configuration settings
β βββ styles.css # Global styling
β βββ admin.html # Administrator dashboard
β βββ dashboard*.html # Role-specific dashboards (8 roles)
β βββ case-*.html # Case management interfaces
β βββ evidence-*.html # Evidence management pages
β βββ *-manager.js # Feature-specific managers
β βββ *-styles.css # Component-specific styles
β βββ *.js # Feature modules and utilities
βββ server.js # Express.js backend server
βββ complete-database-setup-fixed.sql # Complete database schema
βββ package.json # Dependencies and scripts
βββ render.yaml # Render.com deployment config
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules
βββ LICENSE # Apache 2.0 license
βββ SECURITY.md # Security policy
βββ README.md # Project documentation
Core System Files:
server.js- Express backend with Socket.IO, handles all API endpoints, authentication, file uploadspublic/app.js- Main frontend application logic, handles wallet connection, user registration, navigationpublic/config.js- Configuration settings for API URLs, file limits, blockchain network settingscomplete-database-setup-fixed.sql- Complete PostgreSQL schema with 17+ tables, RLS policies, functions
Frontend Pages:
public/index.html- Landing page with login options (MetaMask/Email)public/admin.html- Administrator dashboard for user management and system oversightpublic/dashboard-*.html- Role-specific dashboards for all 8 user rolespublic/case-management.html- Case creation and management interfacepublic/evidence-*.html- Evidence upload, viewing, comparison, and export interfaces
Feature Modules:
public/*-manager.js- JavaScript modules for specific features (case, evidence, role management)public/enhanced-*.js- Enhanced functionality modules (upload, error handling, stability)public/notifications.js- Real-time notification systempublic/storage.js- Local storage management utilities
Documentation:
docs/USER_GUIDE.md- Complete user manual with role-specific instructionsdocs/DEVELOPER_GUIDE.md- Development setup, API reference, architecture guidedocs/SECURITY.md- Security implementation details and best practicesdocs/DEPLOYMENT.md- Production deployment instructions for Render.comdocs/MAINTENANCE.md- System maintenance and troubleshooting procedures
Configuration:
.env.example- Template for environment variables (Supabase credentials, etc.)render.yaml- Render.com deployment configurationpackage.json- Node.js dependencies and npm scripts
- π Quick Start
- π User Guide
- π» Developer Guide
- π‘ API Documentation
- π Security Guide
- π Deployment Guide
- π§ Maintenance Guide
| Topic | Description | Link |
|---|---|---|
| User Guide | Role-specific guides and common tasks | π€ User Guide |
| Developer Guide | Setup, architecture, and development workflow | π» Developer Guide |
| API Documentation | Complete API reference with examples | π‘ API Docs |
| Security Guide | Security practices and vulnerability mitigations | π Security Guide |
| Deployment Guide | Deploy to Render, Vercel, or Netlify | π Deployment |
| Maintenance Guide | Regular maintenance and troubleshooting | π§ Maintenance |
Before you begin, ensure you have the following installed:
- Node.js (v16 or higher) - Download
- npm (comes with Node.js) or yarn
- Git - Download
- MetaMask browser extension - Install
- Supabase account - Sign up
- Code Editor (VS Code recommended)
# Clone the repository
git clone <repository-url>
# Navigate to project directory
cd blockchain-evidence# Install all required packages and run setup
npm install
# Or run setup manually
npm run setupThe setup script creates a .env file automatically. Update it with your Supabase credentials:
# Update these values in .env
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_anon_key- Log in to your Supabase Dashboard
- Create a new project or select existing one
- Navigate to SQL Editor
- Execute the following SQL files in order:
-- Step 1: Core database structure
-- Copy and run: complete-database-setup.sql
-- Step 2: Evidence tagging system (optional)
-- Copy and run: evidence-tagging-schema.sql
-- Step 3: Evidence export system (optional)
-- Copy and run: evidence-export-schema.sql# Start the backend server with auto-reload
npm run dev
# Or for production mode
npm startThe server will start on http://localhost:3000
Open your browser and navigate to:
- Main Application: http://localhost:3000
- Health Check: http://localhost:3000/api/health
- Navigate to the login page
- Click "Connect Wallet" button
- MetaMask extension will popup automatically
- Connect with any wallet address
- The system will create test users automatically
- Select a role and complete registration
Use these pre-configured test accounts:
| Password | Role | |
|---|---|---|
investigator@evid-dgc.com |
hashed_password_123 |
Investigator |
analyst@evid-dgc.com |
hashed_password_456 |
Forensic Analyst |
legal@evid-dgc.com |
hashed_password_789 |
Legal Professional |
admin@evid-dgc.com |
admin_password |
Administrator |
Note: These are demo credentials for testing. In production, use secure passwords and proper authentication.
Issue: "Config not defined" error
- Solution: Ensure
config.jsis loaded beforeapp.jsin HTML
Issue: Navigation not working
- Solution: Check browser console for JavaScript errors
- Ensure Lucide icons are loading properly
Issue: Wallet connection fails
- Solution: Install MetaMask browser extension
- Check browser console for detailed error messages
Issue: Server won't start
- Solution: Check
.envfile exists and has correct format - Ensure port 3000 is not in use by another application
# Start development server
npm start
# Install new dependency
npm install package-name
# Check server health
curl http://localhost:3000/api/health
# View logs
# Check browser console and server terminalThe application can be deployed on various platforms:
- Platform: Render.com, Vercel, or Netlify
- Database: Supabase (PostgreSQL)
- File Storage: IPFS via Pinata
Ensure the following environment variables are set in your production environment:
# Supabase Configuration
SUPABASE_URL=your_production_supabase_url
SUPABASE_KEY=your_production_supabase_key
# Server Configuration
PORT=3000
NODE_ENV=production
# IPFS/Pinata Configuration (if using)
PINATA_API_KEY=your_pinata_api_key
PINATA_SECRET_KEY=your_pinata_secret_key
# Blockchain Network
BLOCKCHAIN_NETWORK=polygon
BLOCKCHAIN_RPC_URL=your_rpc_url
-
Connect Repository:
- Go to Render Dashboard
- Click "New +" β "Web Service"
- Connect your GitHub repository
-
Configure Service:
Name: evid-dgc Environment: Node Build Command: npm install Start Command: npm start
-
Set Environment Variables:
- Add all required environment variables in Render dashboard
- Navigate to "Environment" tab
- Add each variable from the list above
-
Deploy:
- Click "Create Web Service"
- Render will automatically deploy on every push to main branch
# Install Netlify CLI
npm install -g netlify-cli
# Login to Netlify
netlify login
# Deploy
netlify deploy --prodOr drag and drop the public folder on Netlify Drop.
The project is configured for automatic deployment:
- Trigger: Push to
mainbranch - Build: Automatic via
npm install - Deploy: Automatic via hosting provider
- Rollback: Available through hosting dashboard
- Application Logs: Available in Render/Vercel/Netlify dashboard
- Database Logs: Available in Supabase dashboard
- Uptime Monitoring: Consider using services like UptimeRobot
For detailed deployment troubleshooting, see Deployment Documentation.
βββββββββββββββββββ
β Web Browser β
β (MetaMask + β
β Frontend) β
ββββββββββ¬βββββββββ
β
β HTTPS
βΌ
βββββββββββββββββββββββββββββββββββ
β Express.js Backend β
β ββββββββββββββββββββββββββββ β
β β Authentication Layer β β
β β (MetaMask/Email) β β
β ββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββ β
β β Role-Based Access β β
β β Control (RBAC) β β
β ββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββ β
β β Evidence Processing β β
β β (Upload/Watermark) β β
β ββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββ β
β β Real-time Events β β
β β (Socket.IO) β β
β ββββββββββββββββββββββββββββ β
ββββββ¬βββββββββββ¬ββββββββββ¬ββββββββ
β β β
β β β
βΌ βΌ βΌ
βββββββββββ βββββββββββ ββββββββββββ
βSupabase β β IPFS β βBlockchainβ
βPostgreSQLβ β(Pinata) β β(Polygon) β
β +RLS β β Storage β β Network β
βββββββββββ βββββββββββ ββββββββββββ
Evidence Upload Flow:
- User authenticates via MetaMask or Email
- Role verification through RBAC system
- Evidence file uploaded to Express backend
- File processed (watermark, compression)
- File stored in IPFS via Pinata
- Metadata and IPFS hash stored in Supabase
- Transaction recorded on Polygon blockchain
- Audit log created in database
- Real-time notification sent via Socket.IO
Access Control Flow:
- User login β JWT token generated
- Each request validated against user role
- Supabase RLS policies enforce database security
- Audit trail logged for compliance
| Component | Technology | Purpose |
|---|---|---|
| Frontend | HTML/CSS/JS | User interface and interactions |
| API Server | Express.js | REST API and business logic |
| WebSocket | Socket.IO | Real-time notifications |
| Database | Supabase (PostgreSQL) | Structured data storage |
| File Storage | IPFS/Pinata | Decentralized evidence storage |
| Blockchain | Polygon | Immutable audit trail |
| Authentication | MetaMask/Supabase Auth | User authentication |
| Authorization | Custom RBAC | Role-based permissions |
For detailed architecture documentation, see Implementation Summary.
If you find this project helpful, please consider giving it a Star! It helps others discover the project and keeps the maintainers motivated.
We value your feedback! If you have suggestions for new features or have found a bug, please open an issue or start a discussion in your repository.
We welcome contributions from developers, security researchers, legal professionals, and anyone passionate about improving digital evidence management!
- Fork the repository and clone it locally
- Read our Contributing Guide for detailed instructions
- Check out open issues for ways to help
- Join the discussion in GitHub Discussions
- π Bug Reports: Found an issue? Let us know!
- π‘ Feature Requests: Have ideas for improvements?
- π§ Code Contributions: Fix bugs or add new features
- π Documentation: Help improve our guides and docs
- π¨ Design & UX: Enhance the user interface
- π§ͺ Testing: Help us test new features
- π Localization: Translate the app to other languages
- Choose an issue or propose a new feature
- Fork and create a branch for your changes
- Make your changes following our coding standards
- Test thoroughly and add documentation
- Submit a pull request with a clear description
For detailed guidelines, see our Contributing Guide.
Thanks to all the amazing people who have contributed to EVID-DGC! π
![]() Gooichand π Project Lead & Core Developer |
Want to see your name here? Check out our Contributing Guide and start contributing today!
We recognize contributors in multiple ways:
- README Contributors Section (above)
- Release Notes for significant contributions
- GitHub Contributors Page automatic recognition
- Special Mentions in project updates and social media
- Star the repository β to show your support
- Watch the repository π to stay updated
- Fork and contribute π΄ to help improve the project
- Share with others π’ who might be interested
- Join discussions π¬ in GitHub Issues and Discussions
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Copyright 2025 EVID-DGC Blockchain Evidence Management System
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
We are committed to providing a friendly, safe, and welcoming environment. Please review our CODE_OF_CONDUCT.md.

