# AyCode.Core Solution

.NET 9 core framework providing serialization (Binary, JSON, Toon), entity abstractions, database access, services, and shared utilities. Used as the foundation layer for AyCode applications.

## LLM Context

Domain rules and key pitfalls live in a single file: `.github/copilot-instructions.md`

| Tool | Auto-loaded | Action needed |
|------|------------|---------------|
| GitHub Copilot | ✅ `copilot-instructions.md` | None |
| Claude Code | ✅ `CLAUDE.md` → references above | None |
| Cursor / Windsurf | ✅ `README.md` | Read `copilot-instructions.md` via @file |

Solution-level docs in `docs/`:

| Document | Topic |
|---|---|
| `GLOSSARY.md` | Core terminology reference |
| `ARCHITECTURE.md` | Solution layers, dependency rules |
| `CONVENTIONS.md` | Coding conventions |

Project-level docs — each project's `docs/` folder documents the code it defines:

| Project | Documents |
|---|---|
| `AyCode.Core/docs/` | `BINARY/` (README, FORMAT, FEATURES, OPTIONS, …), `LOGGING/` (README, ISSUES, TODO) |
| `AyCode.Core.Server/docs/` | `LOGGING/README.md` (server-side variant) |
| `AyCode.Services/docs/` | `SIGNALR/`, `SIGNALR_BINARY_PROTOCOL/`, `LOGGING/README.md` (remote variant) |
| `AyCode.Services.Server/docs/` | `SIGNALR/` (README), `SIGNALR_DATASOURCE/` (README + ISSUES + TODO) |

## Solution Structure

| Project | Purpose | README |
|---|---|---|
| [`AyCode.Core`](AyCode.Core/README.md) | Core library: serializers, compression, logging, validation | [README](AyCode.Core/README.md) |
| [`AyCode.Core.Server`](AyCode.Core.Server/README.md) | Server-side core extensions (GlobalLogger) | [README](AyCode.Core.Server/README.md) |
| [`AyCode.Core.Serializers.SourceGenerator`](AyCode.Core.Serializers.SourceGenerator/README.md) | Roslyn source generator for binary serializers | [README](AyCode.Core.Serializers.SourceGenerator/README.md) |
| [`AyCode.Core.Serializers.Console`](AyCode.Core.Serializers.Console/README.md) | Serializer benchmark console app | [README](AyCode.Core.Serializers.Console/README.md) |
| [`AyCode.Interfaces`](AyCode.Interfaces/README.md) | Entity interfaces: IId<T>, IForeignKey, profiles, addresses | [README](AyCode.Interfaces/README.md) |
| [`AyCode.Interfaces.Server`](AyCode.Interfaces.Server/README.md) | Server-side interfaces (login services) | [README](AyCode.Interfaces.Server/README.md) |
| [`AyCode.Entities`](AyCode.Entities/README.md) | Abstract entity base classes (User, Profile, Address, Company) | [README](AyCode.Entities/README.md) |
| [`AyCode.Entities.Server`](AyCode.Entities.Server/README.md) | Server-side entities (LogItem) | [README](AyCode.Entities.Server/README.md) |
| [`AyCode.Models`](AyCode.Models/README.md) | DTOs and view models | [README](AyCode.Models/README.md) |
| [`AyCode.Models.Server`](AyCode.Models.Server/README.md) | Server-side models (Login, DynamicMethods) | [README](AyCode.Models.Server/README.md) |
| [`AyCode.Services`](AyCode.Services/README.md) | Client-side services (SignalR, logging, login) | [README](AyCode.Services/README.md) |
| [`AyCode.Services.Server`](AyCode.Services.Server/README.md) | Server-side services (SignalR hub, email, login) | [README](AyCode.Services.Server/README.md) |
| [`AyCode.Database`](AyCode.Database/README.md) | EF Core data access layer with DAL pattern | [README](AyCode.Database/README.md) |
| [`AyCode.Utils`](AyCode.Utils/README.md) | Zero-dependency utilities (string, datetime, lock wrappers) | [README](AyCode.Utils/README.md) |
| [`AyCode.Utils.Server`](AyCode.Utils.Server/README.md) | Server-side utilities (placeholder) | [README](AyCode.Utils.Server/README.md) |

### Test & Benchmark Projects

| Project | Purpose | README |
|---|---|---|
| [`AyCode.Benchmark`](AyCode.Benchmark/README.md) | BenchmarkDotNet performance suite | [README](AyCode.Benchmark/README.md) |
| [`AyCode.Core.Tests`](AyCode.Core.Tests/README.md) | Serialization, compression, and utility tests | [README](AyCode.Core.Tests/README.md) |
| [`AyCode.Core.Tests.Internal`](AyCode.Core.Tests.Internal/README.md) | Internal entity implementations for DB tests | [README](AyCode.Core.Tests.Internal/README.md) |
| [`AyCode.Database.Tests`](AyCode.Database.Tests/README.md) | Database layer test base classes | [README](AyCode.Database.Tests/README.md) |
| [`AyCode.Database.Tests.Internal`](AyCode.Database.Tests.Internal/README.md) | Concrete database integration tests | [README](AyCode.Database.Tests.Internal/README.md) |
| [`AyCode.Services.Tests`](AyCode.Services.Tests/README.md) | Service layer tests | [README](AyCode.Services.Tests/README.md) |
| [`AyCode.Services.Server.Tests`](AyCode.Services.Server.Tests/README.md) | Server-side SignalR and service tests | [README](AyCode.Services.Server.Tests/README.md) |
