Skip to content

georgidelchev/AYN-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

252 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AYN β€” All You Need.

A full-stack peer-to-peer trading platform built with ASP.NET Core


Stars Forks License Build


C# JavaScript CSS HTML SCSS


Buy it. Sell it. Find everything you need β€” all in one place.


🧭 What is AYN?

AYN (All You Need) is a production-grade, peer-to-peer online marketplace built from scratch as a full-stack ASP.NET Core web application. It allows users to list items for sale, discover and purchase goods from other users, communicate in real time, and complete transactions securely β€” all within a single, cohesive platform.

This is not a tutorial project. It is a complete, layered application built with industry-standard architecture, a rich feature set, a live CI/CD pipeline, and a professional-grade tech stack β€” the result of bringing together everything learned across multiple courses and personal deep-dives into the .NET ecosystem.


✨ Feature Highlights

πŸ›’ Marketplace Core

  • Create, edit, and delete listings β€” title, description, price, category, subcategory, condition, and up to multiple images per ad
  • Rich-text ad descriptions powered by TinyMCE with HTML sanitization via HtmlSanitizer
  • Image upload & storage through Cloudinary CDN β€” fast, optimized, globally delivered
  • Advanced search & filtering β€” by keyword, category, subcategory, price range, town, and sort order
  • Watchlist / Favourites β€” save any listing and revisit it anytime from your profile

πŸ’¬ Real-Time Chat

  • Live messaging between buyers and sellers powered by SignalR WebSockets
  • Persistent conversation history β€” no messages are ever lost
  • Clean, responsive chat UI with unread message indicators

πŸ’³ Payments

  • Stripe integration for secure, card-based payments directly within the platform
  • Smooth checkout flow with real-time validation

πŸ“§ Email & Notifications

  • SendGrid transactional email β€” account confirmation, password reset, and system notifications
  • In-app notification system keeping users informed of activity on their listings

⏰ Background Jobs

  • Hangfire scheduled tasks β€” automated cleanup, periodic data processing, and recurring system operations
  • Full Hangfire Dashboard for monitoring jobs in real time

πŸ‘€ User Accounts & Security

  • ASP.NET Core Identity β€” registration, login, role-based authorization
  • Email confirmation flow and secure password reset
  • Admin area with user management β€” promote, demote, ban, and unban users
  • StyleCop + custom ruleset enforcing consistent, clean code across the entire codebase

πŸ“Š Administration

  • Full Admin Dashboard β€” manage categories, subcategories, towns, and platform users
  • Data scraping powered by AngleSharp for seeding realistic category and location data
  • Role-based access control β€” users vs. administrators

πŸ—οΈ Architecture

AYN follows a clean layered architecture separating concerns across distinct projects:

AYN/
β”œβ”€β”€ AYN.Common/          # Shared constants, helpers, GlobalConstants
β”œβ”€β”€ Data/
β”‚   β”œβ”€β”€ AYN.Data/        # DbContext, EF Core configuration, seeding
β”‚   β”œβ”€β”€ AYN.Data.Common/ # Repository pattern, base interfaces
β”‚   └── AYN.Data.Models/ # Domain entities (Ad, User, Category, Message…)
β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ AYN.Services/    # Business logic β€” ads, users, chat, notifications…
β”‚   └── AYN.Services.Data/ # Data-access services, AutoMapper profiles
β”œβ”€β”€ Tests/
β”‚   └── AYN.Services.Tests/ # Unit tests with nUnit + Moq
└── Web/
    β”œβ”€β”€ AYN.Web/         # ASP.NET Core MVC β€” controllers, views, areas
    └── AYN.Web.ViewModels/ # Input & view models, DTOs

Every layer communicates through interfaces, enabling full testability and clean separation of concerns. The repository pattern abstracts all data access, and AutoMapper handles all object-to-object mapping between layers.


πŸ› οΈ Tech Stack

Backend

Technology Purpose
ASP.NET Core Web framework β€” MVC, Razor views, middleware pipeline
Entity Framework Core ORM β€” code-first, migrations, LINQ queries
SignalR Real-time WebSocket communication (chat)
ASP.NET Core Identity Authentication, authorization, role management
Hangfire Background job scheduling and processing
AutoMapper Object mapping between layers
AngleSharp HTML parsing and data scraping for seeding
HtmlSanitizer Sanitizes user-generated rich-text content

Integrations

Integration Purpose
Stripe Payment processing
SendGrid Transactional email delivery
Cloudinary Image upload, storage, and CDN delivery

Frontend

Technology Purpose
Bootstrap Responsive UI framework
jQuery DOM manipulation and AJAX calls
TinyMCE Rich-text editor for ad descriptions
SCSS Custom styling and theme overrides

Testing & Quality

Tool Purpose
nUnit Unit testing framework
Moq Mocking library for isolated service tests
StyleCop Code style enforcement across the solution
GitHub Actions CI/CD pipeline β€” build and test on every push

πŸ—‚οΈ Data Model Overview

The application is built around a rich relational domain model:

  • Users β€” extended ASP.NET Identity user with profile image, town, phone, and activity metadata
  • Ads β€” listings with category, subcategory, condition, price, location, images, and view count
  • Categories & Subcategories β€” hierarchical classification of listings
  • Towns β€” location data for filtering and discovery
  • Messages β€” real-time chat messages between users, associated with a conversation thread
  • Notifications β€” system and user-generated notifications
  • Watchlist entries β€” per-user saved/favourited listings

πŸš€ Getting Started

Prerequisites

Setup

  1. Clone the repository

    git clone https://github.com/georgidelchev/AYN-.git
    cd AYN-
  2. Configure secrets β€” in Web/AYN.Web/appsettings.json (or user secrets), set your connection string and API keys:

    {
      "ConnectionStrings": {
        "DefaultConnection": "Server=.;Database=AYN;Trusted_Connection=True;"
      },
      "Stripe": { "SecretKey": "...", "PublishableKey": "..." },
      "SendGrid": { "ApiKey": "..." },
      "Cloudinary": { "CloudName": "...", "ApiKey": "...", "ApiSecret": "..." }
    }
  3. Apply migrations & seed the database

    cd Web/AYN.Web
    dotnet ef database update
    dotnet run
  4. Run the tests

    cd Tests/AYN.Services.Tests
    dotnet test
  5. Open your browser at https://localhost:5001 πŸŽ‰


πŸ”„ CI/CD Pipeline

AYN includes a GitHub Actions workflow that automatically builds and runs all tests on every push and pull request to main, ensuring the codebase stays green at all times.


πŸ‘€ Author

Georgi Delchev

GitHub LinkedIn Facebook


πŸ™ Acknowledgements


πŸ“„ License

This project is licensed under the MIT License.


If you found this project useful or interesting, a ⭐ goes a long way β€” thank you!

About

ASP.NET Core Application For Web Trading between people.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors