Commit Graph
2 Commits
Author SHA1 Message Date
John Patrick TeruelandCopilot 186cd4cc7c Add CORS support for frontend on localhost:3000
The frontend at http://localhost:3000 was getting CORS (Cross-Origin Resource Sharing)
errors when trying to make API requests to http://localhost:8000.

Added CORSMiddleware to FastAPI backend with:
- allow_origins: http://localhost:3000 and http://127.0.0.1:3000
- allow_credentials: true (for Authorization headers)
- allow_methods: all (GET, POST, OPTIONS, etc.)
- allow_headers: all (including Authorization, Content-Type, etc.)

This allows the browser to make cross-origin requests from the frontend to the API.

CORS headers now properly returned:
  access-control-allow-origin: http://localhost:3000
  access-control-allow-credentials: true

Co-authored-by: Copilot <[email protected]>
2026-04-24 21:11:56 +08:00
John Patrick TeruelandCopilot aa4dd497e2 Initial PayGuard fraud detection system implementation
- Complete dual-layer architecture for fraud detection
- Phase 1: Docker Compose infrastructure (Kafka, Zookeeper, Redis)
- Phase 2: Mock ML models (Layer 1 fast, Layer 2 deep)
- Phase 3: FastAPI transaction ingestion with JWT auth
- Phase 4: Kafka consumer pipeline with feature extraction
- Phase 5: Test transaction producer with demo scenarios
- Phase 6: Clean code structure and comprehensive documentation
- Phase 7: End-to-end validation and demo readiness

Demonstrates key system design patterns:
- Microservices architecture with decoupled components
- Asynchronous event processing via Kafka
- Tiered decision-making (fast path vs deep analysis)
- Resilience patterns (circuit breaker for graceful degradation)
- Behavioral profiling with Redis caching

Ready for academic demonstration with clear pipeline observability.

Co-authored-by: Copilot <[email protected]>
2026-04-24 19:47:18 +08:00