Skip to content

FashionClothesAndTrends is a comprehensive web application designed to help users discover, purchase and manage the latest fashion trends.

License

Notifications You must be signed in to change notification settings

TheMysteriousStranger90/FashionClothesAndTrends

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FashionClothesAndTrends

Image 1

FashionClothesAndTrends is a comprehensive web application designed to help users discover, purchase, and manage the latest fashion trends. The application offers a wide range of features including browsing clothing items, managing wishlists, applying discount coupons, user authentication, and much more.

Features

  • User Authentication and Authorization: Secure login and registration.
  • Clothing Items Management: Browse, search, and manage clothing items.
  • Wishlist Management: Add items to wishlist and manage them.
  • Comments and Reviews: Add and view comments on clothing items.
  • Favorites: Mark clothing items as favorites and manage them.
  • Likes and Dislikes: Like or dislike comments.
  • Order Management: Create and manage orders.
  • Order History: View order history.
  • Payments: Handle payments and payment intents.
  • Notifications: Notify users about discounts on wishlist items.
  • Photo Management: Upload and manage photos for clothing items.
  • Ratings: Rate clothing items.

Technology Stack

  1. Backend Architecture: The backend of our application is structured using a Clean Architecture, ensuring a clean separation of concerns and a maintainable codebase.

  2. Frontend Framework: Angular, a robust platform for building web applications, is used for the frontend. It allows us to structure our codebase in a modular and maintainable manner.

  3. UI Components: For the user interface, we have chosen Angular Material. It's a UI component library that adheres to Material Design principles and offers a wide array of ready-to-use components.

  4. Caching: Redis, an open-source in-memory data structure store, is used for caching. It serves as a database, cache, and message broker.

  • ASP.NET Core 8: A framework for building web applications and APIs.
  • Entity Framework Core 8: An ORM for working with relational databases.
  • RESTful API: An architectural style for creating APIs.
  • Relational Database: SQL Server: A relational database for data storage.
  • Distributed Cache: Redis: A distributed cache for improving performance and scalability.
  • Clean Architecture: An architectural approach that ensures separation of concerns and framework independence.
  • S.O.L.I.D. Principles: Object-oriented design principles for creating flexible and maintainable systems.
  • Unit of Work and Repository Pattern: Patterns for managing transactions and abstracting data access.
  • AutoMapper: A library for automatic object mapping.
  • SignalR: A library for adding real-time functionality such as notifications.
  • Client-side: Angular with Angular Material: A framework and UI component library for building client-side applications.

Running the Application

To run this project, you need to create an appsettings.json file in the WebAPI section with the following structure:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "DefaultDockerDbConnection": "Server=sql_server2022,1433;Database=FashionClothesAndTrendsDB;User Id=sa;Password=MyPass@word90_;MultipleActiveResultSets=true;TrustServerCertificate=True",
    "DefaultLocalDbConnection": "Server=(localdb)\\MSSQLLocalDB;Database=FashionClothesAndTrendsDB;MultipleActiveResultSets=true",
    "Redis": "redis:6379,abortConnect=false",
    "RedisLocalDb": "localhost:6379,abortConnect=false"
  },
  "Token": {
    "Key": "<......>",
    "Issuer": "https://localhost:5001",
    "Audience": "https://localhost:5001"
  },
  "CloudinarySettings": {
    "CloudName": "<.....>",
    "ApiKey": "<.....>",
    "ApiSecret": "<.....>"
  },
  "StripeSettings": {
    "PublishableKey": "<.....>",
    "SecretKey": "<.....>",
    "WhSecret": "<.....>"
  }
}

Replace "" with your actual data respectively.

Configuration

Using Local Database

The application allows you to choose between running with a local database (localdb) or fully within Docker using SQL Server.

If you want to use localdb instead of Docker for the database, follow these steps:

  1. Open the appsettings.json file in the WebAPI project.

  2. Set the connection string for DefaultLocalDbConnection example:

    "ConnectionStrings": {
      "DefaultLocalDbConnection": "Server=(localdb)\\MSSQLLocalDB;Database=FashionClothesAndTrendsDB;MultipleActiveResultSets=true",
      "RedisLocalDb": "localhost:6379,abortConnect=false"
    }
  3. Modify the ApplicationServicesExtensions.cs file (or the corresponding file where services are configured). Ensure that the application is using DefaultLocalDbConnection for SQL Server and RedisLocalDb for Redis.

  4. Make sure Redis is running locally. You can run Redis using Docker (run the application using docker-compose.yml).

  5. After configuring the appsettings.json file and ApplicationServicesExtensions.cs you need to run docker-compose.yml.

Running the Application Fully in Docker

  1. Open the appsettings.json file in the WebAPI project.

  2. Set the connection strings for DefaultDockerDbConnection and Redis example:

    "ConnectionStrings": {
      "DefaultDockerDbConnection": "Server=sql_server2022,1433;Database=FashionClothesAndTrendsDB;User Id=sa;Password=MyPass@word90_;MultipleActiveResultSets=true;TrustServerCertificate=True",
      "Redis": "redis:6379,abortConnect=false"
    }
    
  3. For running ASP.NET core with HTTPS inside of docker, you need to generate a self-signed certificate. You can do this by running the following command in your terminal:

dotnet dev-certs https -ep $env:USERPROFILE/.aspnet/https/aspnetapp.pfx -p MyPass@word90_
dotnet dev-certs https --trust

Then open the appsettings.json file in the WebAPI project again and insert these lines:


,
  "Kestrel": {
    "Endpoints": {
      "Https": {
        "Url": "https://+:443",
        "Certificate": {
          "Path": "/https/aspnetapp.pfx",
          "Password": "MyPass@word90_"
        }
      }
    }
  }
  1. Modify the ApplicationServicesExtensions.cs file (or the corresponding file where services are configured) to use DefaultDockerDbConnection for SQL Server and Redis for Redis:
public static IServiceCollection AddApplicationServices(this IServiceCollection services, IConfiguration config)
{
    services.AddDbContext<ApplicationDbContext>(options =>
    {
        options.UseSqlServer(config.GetConnectionString("DefaultDockerDbConnection"));
    });
    
    services.AddSingleton<IConnectionMultiplexer>(c =>
    {
        var redisOptions = ConfigurationOptions.Parse(config.GetConnectionString("Redis"), true);
        return ConnectionMultiplexer.Connect(redisOptions);
    });

    return services;
}
  1. Run the application using Docker by executing the following command in your terminal:
docker-compose -f docker-compose.debug.yml up --build

This will start all the services, including SQL Server and Redis, in Docker containers.

  1. Ensure your docker-compose.debug.yml file are properly configured to start the necessary services for SQL Server, Redis, and the WebAPI. Image 31 Image 32 Image 33

For Administrator Privileges

Email: admin@example.com

Password: Pa$$w0rd

Database Diagram

Image 1

Screenshots

Image 2 Image 3 Image 4 Image 5 Image 6 Image 7 Image 8 Image 9 Image 10 Image 11 Image 12 Image 13 Image 14 Image 15 Image 16 Image 17 Image 18 Image 19 Image 20 Image 21 Image 22 Image 23 Image 24 Image 25 Image 26 Image 27 Image 28 Image 29 Image 30

Contributing

Contributions are welcome. Please fork the repository and create a pull request with your changes.

Author

Bohdan Harabadzhyu

License

MIT