-Neo4j storage is currently being implemented and models are being remade
User Profiling & Trust Engine is a backend system designed to analyze user data, calculate trust scores, and support security-focused workflows such as identity verification and fraud detection.
The system processes both user-provided and historical data, transforming it into a structured trust score while identifying anomalies and suspicious behavior patterns.
At its core, the engine evaluates how consistent and reliable user data is by comparing input against historical records.
The scoring model:
- Aggregates multiple trust signals (devices, location, account data)
- Applies weighted logic
- Penalizes suspicious activity (e.g., brute-force attempts, abnormal IP behavior)
The final score is based on a weighted model:
- Matching user input with historical data increases trust
- Suspicious signals decrease trust
- The score is normalized and adjusted with penalties
The system collects and analyzes:
- Account creation date
- First known device
- Registration country and city
- Full device history
Built-in detection mechanisms:
- Suspicious IP analysis
- Brute-force attempt penalties
- Inconsistent or conflicting user data
The project currently consists of four main directories:
The central engine of the system.
- Calculates the final trust score
- Aggregates and processes user input
- Applies penalties for suspicious behavior
- Implements thread-safe logic
Responsible for system-wide logging.
- Tracks system events
- Supports debugging and auditing
Collects system-level information.
- Machine ID
- CPU cores
- RAM
- Operating system
- Device name and hardware details
Handles data persistence.
- Database interaction
- Storage of user data and logs
The project follows Clean Architecture principles:
- Clear separation of concerns
- Decoupled business logic
- Scalable and maintainable structure
Key aspects:
- Internal logic is encapsulated in the
internaldirectory - Shared packages are properly abstracted
- Strict layering (services, repositories, models)
- SOLID principles
- KISS (Keep It Simple, Stupid)
- Thread-safe design in critical components
- Fully documented codebase
- Singleton — shared instances
- Strategy — flexible scoring logic
- TDD (Test-Driven Development) — core logic is covered with tests
- Language: Go (Golang)
- Architecture: Clean Architecture
- Concurrency: Native goroutines (thread-safe)
- Database: PostgreSQL
- IP Intelligence: IPinfo API
- Documentation: GoDoc
- OS: Linux
- Sensitive data is processed internally
- Built-in risk detection mechanisms
- Safe behavior under concurrent load
- Designed to minimize data exposure
- Advanced behavioral analytics