A modern discussion application that takes inspiration from Reddit. Built with C# and .NET 9, following Clean Architecture principles and Test-Driven Development.
- User Authentication: Secure JWT-based authentication
- Posts and Discussions: Create, view, and interact with posts
- Communities: Join and participate in topic-focused communities
- Voting System: Upvote and downvote content
- Comments: Nested comment threads for rich discussions
- Language: C# 12
- Framework: .NET 9
- Architecture: Clean Architecture
- Data: Entity Framework, SQL Server
- Authentication: JWT (JSON Web Token)
- Patterns: CQRS (MediatR)
- Test-Driven Development: xUnit for testing
- API Documentation: OpenAPI
- Dependency Injection: .NET DI container
Scuttle follows Clean Architecture principles with clear seperation of concerns:
Scuttle.sln
├── src/
│ ├── Scuttle.Domain/ # Core business logic and entities
│ ├── Scuttle.Application/ # Application logic and use cases
│ ├── Scuttle.Infrastructure/ # External dependencies implementation
│ └── Scuttle.API/ # Web API presentation layer
├── tests/
│ ├── Scuttle.Domain.Tests/ # Domain layer unit tests
│ ├── Scuttle.Application.Tests/ # Application layer unit tests
│ ├── Scuttle.Infrastructure.Tests/ # Infrastructure layer unit tests
│ └── Scuttle.API.Tests/ # API layer tests
└── docs/ # Documentation
- Maintainability: Clear seperation of concerns makes code easier to maintain
- Testability: Domain logic is isolated and easily testable
- Flexibility: Infrastructure details can cahnge without affecting business logic
- Scalability: Components can be scaled independently
Scuttle uses the Command Query Responsibility Segregation pattern with MediatR:
- Commands: Represent operations that change state
- Queries: Represent operations that return data without changing state
- Handlers: Process commands and queries
- Notifications: Enable pub/sub
- .NET 9 SDK
- SQL Server (or any EF Core compatible database)
- IDE
- Clone the repo:
git clone https://github.com/scrapcode/scuttle.git
cd scuttle
- Restore packages:
dotnet restore
- Update database connection string in
appsettings.json
- Apply migrations:
cd src/Scuttle.API
dotnet ef database update
- Run:
dotnet run