Loading repository data…
Loading repository data…
harunmelic / repository
FITFanShop Frontend is a modern Angular application for an e-commerce platform specializing in sports equipment, football jerseys, and tracksuits. The project is modularly structured (auth, catalog, profile, admin) and leverages the latest technologies: Angular 21, TypeScript, Angular Material, RxJS, and ngx-translate.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Clean Architecture REST API built with .NET 8 for e-commerce and event ticketing platform.
FitFanShop is a comprehensive backend API supporting:
The project follows Clean Architecture principles with clear separation of concerns:
???????????????????????????????????????????????????????????
? FitFanShop.API ?
? (Controllers, Middleware, Configuration) ?
???????????????????????????????????????????????????????????
?
???????????????????????????????????????????????????????????
? FitFanShop.Application ?
? (CQRS Commands/Queries, Business Logic, DTOs) ?
???????????????????????????????????????????????????????????
?
?????????????????????????????????
? ?
???????????????????? ??????????????????????
? FitFanShop ? ? FitFanShop ?
? Domain ? ? Infrastructure ?
? (Entities) ? ? (EF Core, DB) ?
???????????????????? ??????????????????????
?
?
????????????????????
? FitFanShop ?
? Shared ?
? (Common DTOs) ?
????????????????????
| Layer | Responsibility |
|---|---|
| API | HTTP endpoints, middleware, CORS, Swagger, dependency injection setup |
| Application | CQRS implementation (MediatR), business logic, validation (FluentValidation), DTOs |
| Domain | Entities, value objects, domain logic |
| Infrastructure | EF Core, database context, migrations, interceptors, seeders |
| Shared | Shared DTOs, options, constants |
| Tests | Integration tests with WebApplicationFactory |
git clone https://dev.azure.com/rs1-2025-26-FIT-FanShop/FITFanShop/_git/FITFanShop
cd FitFanShop/FitFanShop.Backend
Edit FitFanShop.API/appsettings.Development.json:
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=FitFanShopDb;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}
dotnet restore
dotnet build
cd FitFanShop.API
dotnet run
API will be available at:
https://localhost:7260http://localhost:5099https://localhost:7260/swaggercd FitFanShop.Infrastructure
dotnet ef database update --startup-project ../FitFanShop.API
Database is automatically seeded on first run with:
Static Data:
User, AdminPending, Confirmed, Delivered, CancelledDynamic Data (via DynamicDataSeeder):
admin@fitfanshop.com / Admin123!cd FitFanShop.Infrastructure
dotnet ef migrations add MigrationName --startup-project ../FitFanShop.API
Access interactive Swagger documentation at: https://localhost:7260/swagger
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /api/auth/register | Register new user | ? |
| POST | /api/auth/login | Login and get JWT token | ? |
| POST | /api/auth/refresh | Refresh access token | ? |
| POST | /api/auth/logout | Logout and invalidate refresh token | ? |
Register/Login Response:
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "550e8400-e29b-41d4-a716-446655440000",
"expiresAt": "2025-01-24T12:00:00Z"
}
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/products | Get all products (paginated, filterable) | ? |
| GET | /api/products/{id} | Get product by ID | ? |
| POST | /api/products | Create new product | ? Admin |
| PUT | /api/products/{id} | Update product | ? Admin |
| DELETE | /api/products/{id} | Soft delete product | ? Admin |
Query Parameters for GET /api/products:
page (int): Page numberpageSize (int): Items per pagesearch (string): Search by name/descriptioncategoryId (int): Filter by categoryminPrice (decimal): Minimum pricemaxPrice (decimal): Maximum pricesortBy (string): Sort field (Name, Price, CreatedAt)sortOrder (string): asc/desc| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/categories | Get all categories | ? |
| GET | /api/categories/{id} | Get category by ID | ? |
| POST | /api/categories | Create category | ? Admin |
| PUT | /api/categories/{id} | Update category | ? Admin |
| DELETE | /api/categories/{id} | Soft delete category | ? Admin |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/cart | Get user's cart | ? User |
| POST | /api/cart/items | Add item to cart | ? User |
| PUT | /api/cart/items/{id} | Update cart item quantity | ? User |
| DELETE | /api/cart/items/{id} | Remove item from cart | ? User |
| DELETE | /api/cart/clear | Clear entire cart | ? User |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/orders | Get user's orders | ? User |
| GET | /api/orders/all | Get all orders (admin) | ? Admin |
| GET | /api/orders/{id} | Get order by ID | ? User |
| POST | /api/orders | Create order from cart | ? User |
| PUT | /api/orders/{id}/status | Update order status | ? Admin |
Order Statuses:
Pending - Order created, awaiting paymentConfirmed - Payment confirmed (auto-set after payment)Delivered - Order delivered (admin sets manually)Cancelled - Order cancelled| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /api/payments/mock-checkout | Mock payment & create order | ? User |
| GET | /api/payments/order/{orderId} | Get payment for order | ? User |
Mock Checkout Workflow:
Confirmed)| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/reviews/product/{productId} | Get product reviews (paginated) | ? |
| GET | /api/reviews/product/{productId}/stats | Get review statistics | ? |
| GET | /api/reviews/my | Get user's reviews | ? User |
| GET | /api/reviews/{id} | Get review by ID | ? |
| POST | /api/reviews | Create review | ? User |
| PUT | /api/reviews/{id} | Update review | ? User (own reviews) |
| DELETE | /api/reviews/{id} | Delete review | ? User (own reviews) |
Review Stats Response:
{
"productId": 1,
"totalReviews": 42,
"averageRating": 4.5,
"ratingDistribution": {
"5": 20,
"4": 15,
"3": 5,
"2": 1,
"1": 1
}
}
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/events | Get all events | ? |
| GET | /api/events/{id} | Get event by ID | ? |
| POST | /api/events | Create event | ? Admin |
| PUT | /api/events/{id} | Update event | ? Admin |
| DELETE | /api/events/{id} | Soft delete event | ? Admin |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/wishlist | Get user's wishlist | ? User |
| POST | /api/wishlist/items | Add product to wishlist | ? User |
| DELETE | /api/wishlist/items/{id} | Remove from wishlist | ? User |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/discounts | Get all discounts | ? Admin |
| GET | /api/discounts/{id} | Get discount by ID | ? Admin |
| POST | /api/discounts | Create discount | ? Admin |
| PUT | /api/discounts/{id} | Update discount | ? Admin |
| DELETE | /api/discounts/{id} | Delete discount | ? Admin |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/users | Get all users | ? Admin |
| GET | /api/users/{id} | Get user by ID | ? Admin |
| GET | /api/users/profile | Get current user profile | ? User |
| PUT | /api/users/profile | Update profile | ? User |
| DELETE | /api/users/{id} | Delete user | ? Admin |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/activitylogs | Get activity logs (admin only) | ? Admin |
JWT tokens are used for authentication with the following settings:
POST /api/auth/login
{
"email": "admin@fitfanshop.com",
"password": "Admin123!"
}
Authorization: Bearer <access_token>
POST /api/auth/refresh
{
"refreshToken": "<refresh_token>"
}
Admin Account:
Email: admin@fitfanshop.com
Password: Admin123!
cd FitFanShop.Tests
dotnet test
dotnet test --filter "FullyQualifiedName~ReviewCrudTests"
Current test suite includes:
Tests use WebApplicationFactory for realistic end-to-end testing with in-memory database.
FitFanShop.Backend/
?