How tscarterjr/unsecuredapikeys-opensource works
Project type and purpose
• This is a full-stack, modular security-awareness platform (“UnsecuredAPIKeys”) combining:
• A Next.js UI for educational content and live dashboards
• A .NET 9 WebAPI backend exposing REST endpoints and SignalR hubs
• An Entity Framework Core + PostgreSQL data layer
• An extensible “Providers” library for API-key discovery/validation
• Two bots (Scraper and Verifier) for automated discovery and validation
File structure
• Top-level folders correspond to major components:
• UnsecuredAPIKeys.UI – Next.js frontend
• UnsecuredAPIKeys.WebAPI – .NET backend (REST + SignalR)
• UnsecuredAPIKeys.Data – EF Core DbContext, migrations, models
• UnsecuredAPIKeys.Providers – API-key provider implementations & registry
• UnsecuredAPIKeys.Bots.Scraper – Automated discovery worker
• UnsecuredAPIKeys.Bots.Verifier – Automated validation worker
• Shared configuration files (appsettings.json, .env), Dockerfile, scripts
• CI/CD, Docker Compose implied by root Dockerfile and PowerShell deploy scripts
README for additional insights
• Architectural patterns called out:
• Repository Pattern for data access
• Provider Pattern for pluggable validation/search
• CQRS separation (read/write via different services)
• Event-Driven real-time updates via SignalR
• Modular design for independent testing and extension
• External integrations: Discord OAuth, PayPal IPN, GitHub/GitLab/SourceGraph APIs, AI providers
a. Main components
• Frontend (Next.js UI)
• Backend API (UnsecuredAPIKeys.WebAPI)
• Data Layer (PostgreSQL + EF Core)
• Providers Library (internal assembly used by API and Bots)
• Scraper Bot (discovers keys, writes to DB)
• Verifier Bot (reads from DB, validates via providers, updates DB)
• External services: GitHub/GitLab/SourceGraph APIs, AI-provider endpoints, Discord OAuth, PayPal IPN
b. Relationships & interactions
• UI ↔ WebAPI: HTTP requests for CRUD + SignalR for live stats
• WebAPI ↔ Data Layer: EF Core DbContext for reads/writes
• WebAPI & Bots ↔ Providers Library: pluggable providers invoked for search/validation
• Bots ↔ Data Layer: Scraper writes raw key discoveries; Verifier reads raw keys and writes validation results
• WebAPI ↔ External Services:
– Search Providers for manual ad-hoc search
– Discord for OAuth and role assignments
– PayPal IPN webhook for donation tracking
• Optional: RateLimitCleanupService runs in WebAPI to purge old rate-limit logs
c. Key architectural patterns
• Modular separation (UI, API, Data, Providers, Bots)
• Provider Pattern for easy extension of new search/validation engines
• Repository Pattern via EF Core for DB abstraction
• CQRS/Event-Driven: Bots perform writes; API serves read queries and real-time push via SignalR
d. Relevant technologies/frameworks
• Next.js, React, Tailwind CSS, HeroUI, Framer Motion (UI)
• .NET 9, ASP.NET Core, SignalR, Entity Framework Core, PostgreSQL (Backend/Data)
• Docker (containerization)
• PowerShell scripts, Docker Compose for deployment
• Sentry (error tracking), GitHub Actions (CI/CD)
Detail
• Break out sub-components where appropriate: e.g., WebAPI’s Controllers, SignalR Hub, Services
• Providers library as a shared module or micro-library node used by multiple services
• Rate-limiting, error tracking (Sentry), and real-time features explicitly