Skip to content

fcode-design/fcode-tracehub

Repository files navigation

FCODE TraceHub

CI

FCODE TraceHub is a lightweight, self-hosted monitoring and audit platform for ASP.NET Core applications.

It aims to help development teams inspect API requests, application errors, audit events, email delivery logs, and background-job failures from one dashboard.

This project is currently under active development and is not yet production-ready.

Goals

  • Simple self-hosted deployment
  • Minimal impact on monitored applications
  • Secure API key authentication
  • Structured and searchable telemetry
  • Support for multiple projects and environments
  • Developer-friendly ASP.NET Core integration

Current Features

  • Clean Architecture solution structure
  • Project and environment domain models
  • API key lifecycle management
  • Cryptographically secure API key generation
  • SHA-256 hashing and fixed-time API key verification
  • Unit and integration test projects
  • Sample ASP.NET Core application
  • Foundation for an installable ASP.NET Core SDK
  • GitHub Actions continuous integration
  • Project management REST API

Planned Features

  • Project, environment, and API key persistence with EF Core and PostgreSQL
  • Environment management API
  • API key creation and revocation endpoints
  • Request, exception, audit, and email event ingestion
  • Sensitive-data redaction
  • Searchable event dashboard
  • Retention policies
  • Docker Compose deployment
  • OpenTelemetry support
  • NuGet package publishing

Architecture

Monitored ASP.NET Core Application
                 |
                 v
      FCode.TraceHub.AspNetCore SDK
                 |
                 v
         FCODE TraceHub API
                 |
                 v
             PostgreSQL
                 |
                 v
          Next.js Dashboard

The backend follows Clean Architecture:

Domain <- Application <- Infrastructure <- API

Repository Structure

fcode-tracehub/
├── src/
│   ├── FCode.TraceHub.Api/
│   ├── FCode.TraceHub.Application/
│   ├── FCode.TraceHub.Domain/
│   └── FCode.TraceHub.Infrastructure/
├── packages/
│   └── FCode.TraceHub.AspNetCore/
├── tests/
│   ├── FCode.TraceHub.UnitTests/
│   └── FCode.TraceHub.IntegrationTests/
├── examples/
│   └── FCode.TraceHub.SampleApi/
├── deploy/
├── docs/
└── FCode.TraceHub.sln

Requirements

  • .NET SDK 10
  • Git
  • Docker Desktop for PostgreSQL and persistence integration tests

Getting Started

git clone https://github.com/fcode-design/fcode-tracehub.git
cd fcode-tracehub
dotnet restore
dotnet build FCode.TraceHub.sln
dotnet test FCode.TraceHub.sln

Start the local PostgreSQL database from the repository root:

docker compose -f deploy/docker-compose.yml up -d

The API reads the database connection from ConnectionStrings:TraceHubDatabase. A local development value matching the Docker Compose service is provided in appsettings.Development.json; use a secure configuration provider for deployed environments.

Apply database migrations manually before starting the API:

dotnet ef database update --project src/FCode.TraceHub.Infrastructure --startup-project src/FCode.TraceHub.Api

Project API

Projects can be created, listed, retrieved, updated, and archived through /api/projects. Slugs are normalized to lowercase, and archived projects are retained with isActive set to false.

curl -X POST http://localhost:5177/api/projects \
  -H "Content-Type: application/json" \
  -d '{"name":"TraceHub API","slug":"tracehub-api","description":"Main API"}'

curl http://localhost:5177/api/projects
curl http://localhost:5177/api/projects/{id}

curl -X PUT http://localhost:5177/api/projects/{id} \
  -H "Content-Type: application/json" \
  -d '{"name":"TraceHub API","slug":"tracehub-api","description":"Updated API"}'

curl -X DELETE http://localhost:5177/api/projects/{id}

Validation, missing-resource, and duplicate-slug responses use ProblemDetails.

Check dependencies for known vulnerabilities:

dotnet list FCode.TraceHub.sln package --vulnerable --include-transitive

Continuous Integration

Every pull request to main runs a Release build, unit tests, PostgreSQL integration tests using a temporary Testcontainers-managed database, and a direct and transitive dependency vulnerability check.

Project Status

The project is in early development. APIs, package contracts, configuration, and database schemas may change before the first stable release.

Contributing

Contributions, bug reports, and technical discussions are welcome. Read CONTRIBUTING.md before submitting a pull request.

Security

Do not report security vulnerabilities through public GitHub issues. Read SECURITY.md for the reporting process.

License

FCODE TraceHub is available under the MIT License.

Maintainer

Developed and maintained by FCODE Design.

About

A lightweight, self-hosted monitoring and audit platform for ASP.NET Core applications.

Topics

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages