A Phoenix application demonstrating event sourcing with Commanded, featuring real-time domain scanning and analysis.
To start your Phoenix server:
docker run --name event-postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres- Run
mix setupto install and setup dependencies - Start Phoenix endpoint with
mix phx.serveror inside IEx withiex -S mix phx.server
Now you can visit localhost:4000 from your browser.
- Visit
localhost:4000/analysesin your browser - Click "Start New Analysis" to begin a domain scanning job
- Watch as the job progresses through various states:
- π Started - Initial scan setup
- π Discovering Domains - Finding associated domains
- π Discovering Subdomains - Scanning each domain for subdomains
- β Completed - Final analysis with scoring
- β Failed - If errors occur during scanning
Each scan demonstrates real-time updates through LiveView as it:
- Discovers associated domains
- Finds subdomains for each domain
- Handles retries for failed operations
- Calculates a final score based on findings
β Event Sourcing with Commanded
- Process managers for coordinating multi-step scans
- Aggregates for maintaining scan state
- Event handlers for side effects
- Projections for read models
β Real-time Updates
- Phoenix LiveView integration
- PubSub for broadcasting scan updates
- ETS-based projections for fast reads
β Resilient Processing
- Automatic retries for failed operations
- Configurable retry limits
- Error handling and failure states
β Simulated Scanning
- Mock domain discovery
- Subdomain detection
- Scoring system
The application uses:
- Commanded for event sourcing
- Phoenix LiveView for real-time updates
- ETS for high-performance read models
- PubSub for broadcasting updates
- Add persistence for projections
- Implement actual domain scanning logic
- Add authentication and user management
- Add more sophisticated scoring algorithms
- Add export capabilities
- Add historical analysis views
- Deploy to production environment