A comprehensive e-commerce web platform for Bulgarian honey products, built with ASP.NET Core 6.0. The platform connects beekeepers with customers, offering a marketplace for honey, propolis, bee pollen, and related products.
This project follows a Clean Architecture pattern with clear separation of concerns:
SaveTheBeeBulgaria/
βββ HoneyWebPlatform.Web/ # Presentation Layer (MVC)
βββ HoneyWebPlatform.Data/ # Data Access Layer
βββ HoneyWebPlatform.Data.Models/ # Domain Models
βββ HoneyWebPlatform.Services.Data/ # Business Logic Layer
βββ HoneyWebPlatform.Services.Data.Models/ # Service Models
βββ HoneyWebPlatform.Services.Mapping/ # AutoMapper Configuration
βββ HoneyWebPlatform.Web.Infrastructure/ # Infrastructure Services
βββ HoneyWebPlatform.Web.ViewModels/ # View Models
βββ HoneyWebPlatform.Common/ # Shared Constants
βββ HoneyWebPlatform.Services.Tests/ # Unit Tests
- .NET 6.0 - Core framework
- ASP.NET Core MVC - Web application framework
- Entity Framework Core 6.0 - ORM for data access
- SQL Server - Primary database
- SQLite - Development database
- AutoMapper - Object-to-object mapping
- SignalR - Real-time communication
- Razor Views - Server-side rendering
- Bootstrap - CSS framework
- jQuery - JavaScript library
- HTML5/CSS3 - Markup and styling
- JavaScript - Client-side functionality
- ASP.NET Core Identity - User management
- Google OAuth - Social authentication
- Facebook OAuth - Social authentication
- reCAPTCHA - Bot protection
- Anti-forgery tokens - CSRF protection
- Email Services - SMTP integration
- File Upload - Image handling
- Caching - Memory caching
- Real-time Chat - SignalR hubs
- Shopping Cart - Session management
- Order Management - E-commerce functionality
- ApplicationUser - Extended Identity user with profile information
- Beekeeper - Specialized user role for product sellers
- Admin - Administrative role
- Honey - Main product entity with categories, pricing, and beekeeper info
- Propolis - Secondary product type
- BeePollen - Additional product offering
- Category - Product categorization
- Flavour - Product flavor profiles
- Cart - Shopping cart functionality
- CartItem - Individual cart items
- Order - Customer orders with status tracking
- OrderItem - Individual order line items
- Post - Blog posts and articles
- Comment - User comments on posts
- SubscribedEmail - Newsletter subscriptions
- Product Browsing - Browse honey, propolis, and bee pollen
- Advanced Filtering - Filter by category, price, origin
- Shopping Cart - Add/remove items with real-time updates
- User Registration - Account creation and management
- Order Tracking - Track order status
- Blog Reading - Educational content about beekeeping
- Product Management - Add, edit, and manage products
- Profile Management - Manage beekeeper profile and farm images
- Order Management - View and process customer orders
- Analytics - View sales statistics
- User Management - Manage all users and beekeepers
- Content Management - Manage blog posts and comments
- Order Oversight - Monitor all orders across the platform
- Statistics - Platform-wide analytics
- .NET 6.0 SDK
- SQL Server (or SQLite for development)
- Visual Studio 2022 or VS Code
-
Clone the repository
git clone <repository-url> cd SaveTheBeeBulgaria
-
Restore dependencies
dotnet restore
-
Update connection strings
- Edit
appsettings.jsonorappsettings.Development.json - Configure your database connection string
- Edit
-
Run database migrations
dotnet ef database update --project HoneyWebPlatform.Data --startup-project HoneyWebPlatform.Web
-
Run the application
dotnet run --project HoneyWebPlatform.Web
- Development: Uses SQLite (LocalDB)
- Production: Uses SQL Server with Azure connection
Configure SMTP settings in appsettings.json:
{
"EmailSettings": {
"SmtpServer": "smtp.gmail.com",
"SmtpPort": 587,
"SmtpUsername": "your-email@gmail.com",
"SmtpPassword": "your-app-password"
}
}Set up Google and Facebook OAuth in Program.cs:
.AddGoogle(options => {
options.ClientId = "YOUR_GOOGLE_CLIENT_ID";
options.ClientSecret = "YOUR_GOOGLE_CLIENT_SECRET";
})
.AddFacebook(options => {
options.AppId = "YOUR_FACEBOOK_APP_ID";
options.AppSecret = "YOUR_FACEBOOK_APP_SECRET";
})The application uses a service-oriented architecture with interfaces for:
- IHoneyService - Honey product management
- IPropolisService - Propolis product management
- IBeekeeperService - Beekeeper management
- ICategoryService - Category management
- IOrderService - Order processing
- ICartService - Shopping cart operations
- IPostService - Blog post management
- IEmailSender - Email notifications
- ChatHub - Real-time customer support chat
- CartHub - Real-time cart updates
- OrderHub - Real-time order notifications for admins
The project includes unit tests in the HoneyWebPlatform.Services.Tests project:
- Service layer testing
- Database seeder for test data
- XUnit test framework
Run tests with:
dotnet testThe project is configured for deployment to Railway using a Modified Git Flow strategy:
-
Production Deployment
- Railway automatically deploys from the
masterbranch - Only production-ready code reaches the live site
- Uses semantic versioning with Git tags (v1.0.0, v1.1.0, etc.)
- Railway automatically deploys from the
-
Branching Strategy
master: Production branch (auto-deployed to Railway)dev: Development branch (safe for testing)release/*: Release preparation brancheshotfix/*: Emergency production fixesfeature/*: Optional feature development branches
-
Release Process
- Monthly releases:
devβrelease/v1.1.0βmaster - Hotfixes:
masterβhotfix/fix-nameβmaster - See BRANCHING_WORKFLOW.md for detailed workflows
- Monthly releases:
-
Environment Setup
- Configure Railway environment variables
- Set up connection strings for PostgreSQL
- Configure OAuth providers (Google, Facebook)
- Set up email settings (Resend/SMTP)
The project includes Docker configuration:
Dockerfilefor containerizationdocker-compose.ymlfor local development- Multi-stage build for optimized production images
Dockerfile.railwayfor Railway deployment
- DbContext - Entity Framework context
- Configurations - Entity configurations
- Migrations - Database migration files
- Interfaces - Service contracts
- Implementations - Business logic implementation
- Models - Service-specific models
- Controllers - MVC controllers
- Views - Razor view templates
- Areas - Admin and Identity areas
- Hubs - SignalR hubs for real-time features
- wwwroot - Static files (CSS, JS, images)
- Extensions - Custom extension methods
- Middlewares - Custom middleware components
- ModelBinders - Custom model binding
- Follow Clean Architecture principles
- Use dependency injection throughout
- Implement proper error handling
- Use async/await for I/O operations
- Use Entity Framework Code First approach
- Implement proper relationships between entities
- Use data annotations for validation
- Follow naming conventions
- Use HTTPS in production
- Implement proper authentication and authorization
- Validate all user inputs
- Use anti-forgery tokens
- Implement rate limiting
For support and questions:
- Email: savethebee2024@gmail.com
- GitHub Issues: Create an issue in the repository
This project is proprietary software developed for Save The Bee Bulgaria initiative.
Built with β€οΈ for Bulgarian beekeepers and honey lovers