186 lines
3.7 KiB
Markdown
186 lines
3.7 KiB
Markdown
# Fraud & Scam Reporting Platform
|
|
|
|
A secure, GDPR-compliant Django platform for reporting and tracking fraud and scams in the Bulgarian internet space.
|
|
|
|
## Features
|
|
|
|
- **User Management**: Role-based access (Normal Users, Moderators, Administrators)
|
|
- **Report System**: Submit and track scam/fraud reports
|
|
- **OSINT Integration**: Automated intelligence gathering for verification
|
|
- **Moderation System**: Queue-based moderation workflow
|
|
- **Analytics Dashboard**: Statistics and insights
|
|
- **GDPR Compliance**: Data request handling and consent management
|
|
- **Security**: Multi-factor authentication, activity logging, security events
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
fraud_platform/
|
|
├── accounts/ # User management
|
|
├── reports/ # Scam/fraud reports
|
|
├── osint/ # OSINT integration
|
|
├── moderation/ # Moderation system
|
|
├── analytics/ # Analytics and statistics
|
|
├── legal/ # Legal compliance tools
|
|
└── fraud_platform/ # Project settings
|
|
```
|
|
|
|
## Installation
|
|
|
|
1. **Clone the repository** (if applicable)
|
|
|
|
2. **Create virtual environment**:
|
|
```bash
|
|
python3 -m venv venv
|
|
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
```
|
|
|
|
3. **Install dependencies**:
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
4. **Set up environment variables**:
|
|
```bash
|
|
cp .env.example .env
|
|
# Edit .env with your configuration
|
|
```
|
|
|
|
5. **Set up PostgreSQL database**:
|
|
```bash
|
|
# Create database
|
|
createdb fraud_platform_db
|
|
|
|
# Or using psql:
|
|
psql -U postgres
|
|
CREATE DATABASE fraud_platform_db;
|
|
```
|
|
|
|
6. **Run migrations**:
|
|
```bash
|
|
python manage.py makemigrations
|
|
python manage.py migrate
|
|
```
|
|
|
|
7. **Create superuser**:
|
|
```bash
|
|
python manage.py createsuperuser
|
|
```
|
|
|
|
8. **Run development server**:
|
|
```bash
|
|
python manage.py runserver
|
|
```
|
|
|
|
## Configuration
|
|
|
|
### Database
|
|
|
|
Update `.env` with your PostgreSQL credentials:
|
|
```
|
|
DB_NAME=fraud_platform_db
|
|
DB_USER=postgres
|
|
DB_PASSWORD=your-password
|
|
DB_HOST=localhost
|
|
DB_PORT=5432
|
|
```
|
|
|
|
### Email
|
|
|
|
Configure email settings in `.env` for production:
|
|
```
|
|
EMAIL_HOST=smtp.example.com
|
|
EMAIL_PORT=587
|
|
EMAIL_USE_TLS=True
|
|
EMAIL_HOST_USER=your-email@example.com
|
|
EMAIL_HOST_PASSWORD=your-password
|
|
```
|
|
|
|
## Apps Overview
|
|
|
|
### Accounts
|
|
- User registration and authentication
|
|
- Profile management
|
|
- Activity logging
|
|
- Failed login tracking
|
|
|
|
### Reports
|
|
- Scam report submission
|
|
- Report listing and search
|
|
- Report verification
|
|
- Tag management
|
|
|
|
### OSINT
|
|
- Background task processing
|
|
- OSINT data collection
|
|
- Result storage and analysis
|
|
- Service configuration
|
|
|
|
### Moderation
|
|
- Moderation queue
|
|
- Report approval/rejection
|
|
- Moderation actions logging
|
|
- Automated rules
|
|
|
|
### Analytics
|
|
- Report statistics
|
|
- User statistics
|
|
- OSINT statistics
|
|
- Dashboard views
|
|
|
|
### Legal
|
|
- GDPR data requests
|
|
- Consent management
|
|
- Privacy policy
|
|
- Terms of service
|
|
|
|
## Security Features
|
|
|
|
- Strong password requirements (12+ characters)
|
|
- Multi-factor authentication (MFA) for admins/moderators
|
|
- Session security (HTTP-only, Secure cookies)
|
|
- CSRF protection
|
|
- XSS prevention
|
|
- SQL injection prevention
|
|
- Activity logging
|
|
- Security event tracking
|
|
- Rate limiting (to be configured)
|
|
|
|
## Development
|
|
|
|
### Running Tests
|
|
```bash
|
|
python manage.py test
|
|
```
|
|
|
|
### Creating Migrations
|
|
```bash
|
|
python manage.py makemigrations
|
|
python manage.py migrate
|
|
```
|
|
|
|
### Creating Superuser
|
|
```bash
|
|
python manage.py createsuperuser
|
|
```
|
|
|
|
## Production Deployment
|
|
|
|
1. Set `DJANGO_ENV=production` in environment
|
|
2. Set `DEBUG=False` in `.env`
|
|
3. Configure proper `ALLOWED_HOSTS`
|
|
4. Set up SSL certificates
|
|
5. Configure production database
|
|
6. Set up static file serving
|
|
7. Configure email backend
|
|
8. Set up monitoring and logging
|
|
|
|
## License
|
|
|
|
[Your License Here]
|
|
|
|
## Support
|
|
|
|
For issues and questions, please contact [your contact information].
|
|
|