diff --git a/README.md b/README.md index b339ff1..cbc51a6 100644 --- a/README.md +++ b/README.md @@ -1,132 +1,49 @@ -# ClaudeClothes - Casual Clothing Sales Platform +# ClaudeClothes -A modern e-commerce platform for selling casual clothing, built with .NET 8, Blazor Server, Entity Framework Core, and SQL Server. +> Demo project for the session **"From user story to release, powered by AI"** at [SharpCoding 2026](https://conf.sharpcoding.it/). -## ๐ŸŽฏ Features +This is a sample e-commerce platform for casual clothing, built entirely with AI-assisted development to demonstrate a complete workflow from user story to production release. -- **Product Catalog**: 9 casual clothing items with details, prices, and sizes -- **Review System**: Customers can leave reviews and ratings -- **Pagination**: Homepage with product pagination (3 per page) -- **Responsive Design**: Interface optimized for mobile and desktop -- **Casual Colors**: Denim blue (#5B8DBE), military green (#7BA05B), and concrete gray (#95A3A6) palette +## The Session -## ๐Ÿ“ฆ Technologies +The session explores how AI tools can drive the entire software development lifecycle: writing user stories, generating code, running tests, performing code reviews, and deploying to production. **ClaudeClothes** is the live example used throughout the talk. -- **.NET 8**: Backend framework -- **Blazor Server**: Interactive UI -- **Entity Framework Core 9**: ORM -- **SQL Server 2022**: Database -- **Docker**: SQL Server containerization -- **NUnit**: Testing framework +## Tech Stack -## ๐Ÿ—๏ธ Architecture +- **.NET 8** / **Blazor Server** / **Entity Framework Core 9** +- **SQL Server 2022** (Azure SQL for prod) +- **NUnit** for testing +- **Azure App Service** for deployment -\`\`\` -ClaudeClothes/ -โ”œโ”€โ”€ src/ -โ”‚ โ”œโ”€โ”€ ClaudeClothes.Core/ # Domain models and interfaces -โ”‚ โ”œโ”€โ”€ ClaudeClothes.Infrastructure/ # EF Core, Services, Data -โ”‚ โ””โ”€โ”€ ClaudeClothes.Web/ # Blazor Server UI -โ””โ”€โ”€ tests/ - โ””โ”€โ”€ ClaudeClothes.Tests/ # Unit tests -\`\`\` +## Quick Start -## ๐Ÿš€ Quick Start +**Prerequisites:** .NET 8 SDK, SQL Server (local or Docker) -### Prerequisites -- .NET 8 SDK -- Docker Desktop - -### Quick Start - -**macOS/Linux:** -\`\`\`bash -./scripts/start-dev.sh -\`\`\` - -**Windows PowerShell:** -\`\`\`powershell -.\scripts\start-dev.ps1 -\`\`\` - -The application will be available at: **https://localhost:5001** - -### Manual Commands - -\`\`\`bash -# Start SQL Server -docker-compose up -d - -# Build and Run +```bash dotnet restore dotnet build -cd src/ClaudeClothes.Web -dotnet run +dotnet run --project src/ClaudeClothes.Web +``` -# Run tests -dotnet test -\`\`\` +App available at: **https://localhost:5001** -## ๐Ÿ’พ Database +### Tests -### Development Configuration -- **Server**: localhost,1433 -- **Database**: claudeclothes_dev -- **Username**: sa -- **Password**: ClaudeClothes2024! +```bash +dotnet test +``` -### Migrations +## Database -\`\`\`bash -# Create migration +```bash +# Add migration cd src/ClaudeClothes.Infrastructure dotnet ef migrations add MigrationName --startup-project ../ClaudeClothes.Web # Apply migration dotnet ef database update --startup-project ../ClaudeClothes.Web -\`\`\` - -### Reset Database - -\`\`\`bash -docker-compose down -v -docker-compose up -d -\`\`\` - -## ๐Ÿงช Testing - -\`\`\`bash -# Run all tests -dotnet test - -# Run specific test class -dotnet test --filter "FullyQualifiedName~ClothingItemServiceTests" -\`\`\` - -## ๐Ÿ“ Data Structure - -### ClothingItem -- Name, Category, Description -- **Price** (โ‚ฌ), **Available Sizes** -- Average rating, Reviews - -### Review -- Reviewer, Comment, Rating (1-5 stars) -- Creation date - -## ๐ŸŽจ Design - -**Theme Colors:** -- Denim Blue: \`#5B8DBE\` -- Military Green: \`#7BA05B\` -- Concrete Gray: \`#95A3A6\` - -**Font:** Inter (Google Fonts) - -## ๐Ÿ“ License - -MIT License - ยฉ 2026 ClaudeClothes +``` --- -**Made with โค๏ธ for casual style lovers** +**SharpCoding 2026** - [conf.sharpcoding.it](https://conf.sharpcoding.it/) diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index a15577c..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: '3.8' - -services: - sqlserver: - image: mcr.microsoft.com/mssql/server:2022-latest - container_name: claudeclothes-sqlserver - environment: - - ACCEPT_EULA=Y - - SA_PASSWORD=ClaudeClothes2024! - - MSSQL_PID=Developer - ports: - - "1433:1433" - volumes: - - sqlserver_data:/var/opt/mssql - networks: - - claudeclothes-network - healthcheck: - test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P ClaudeClothes2024! -Q "SELECT 1" || exit 1 - interval: 10s - timeout: 3s - retries: 10 - start_period: 10s - -volumes: - sqlserver_data: - driver: local - -networks: - claudeclothes-network: - driver: bridge diff --git a/scripts/start-dev.ps1 b/scripts/start-dev.ps1 deleted file mode 100644 index 0d53d20..0000000 --- a/scripts/start-dev.ps1 +++ /dev/null @@ -1,55 +0,0 @@ -# PowerShell script per avviare l'ambiente di sviluppo ClaudeClothes - -Write-Host "๐Ÿš€ Starting ClaudeClothes Development Environment..." -ForegroundColor Green -Write-Host "" - -# Check if Docker is running -try { - docker info | Out-Null -} catch { - Write-Host "โŒ Docker is not running. Please start Docker Desktop and try again." -ForegroundColor Red - exit 1 -} - -# Start SQL Server container -Write-Host "๐Ÿ“ฆ Starting SQL Server container..." -ForegroundColor Yellow -docker-compose up -d - -# Wait for SQL Server to be ready -Write-Host "โณ Waiting for SQL Server to be ready..." -ForegroundColor Yellow -Start-Sleep -Seconds 10 - -# Check if SQL Server is healthy -Write-Host "๐Ÿ” Checking SQL Server health..." -ForegroundColor Yellow -$maxAttempts = 20 -$attempt = 0 -do { - $result = docker exec claudeclothes-sqlserver /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "ClaudeClothes2024!" -Q "SELECT 1" 2>&1 - if ($LASTEXITCODE -eq 0) { - break - } - Write-Host " SQL Server is starting..." -ForegroundColor Gray - Start-Sleep -Seconds 3 - $attempt++ -} while ($attempt -lt $maxAttempts) - -if ($attempt -ge $maxAttempts) { - Write-Host "โŒ SQL Server failed to start in time." -ForegroundColor Red - exit 1 -} - -Write-Host "โœ… SQL Server is ready!" -ForegroundColor Green -Write-Host "" -Write-Host "๐Ÿ“Š Database Connection Info:" -ForegroundColor Cyan -Write-Host " Server: localhost,1433" -ForegroundColor Gray -Write-Host " Database: ClaudeClothesDB (will be created automatically)" -ForegroundColor Gray -Write-Host " Username: sa" -ForegroundColor Gray -Write-Host " Password: ClaudeClothes2024!" -ForegroundColor Gray -Write-Host "" -Write-Host "๐ŸŒ Starting Blazor application..." -ForegroundColor Yellow -Write-Host " Navigate to: https://localhost:5001" -ForegroundColor Cyan -Write-Host "" - -# Start the web application -Set-Location -Path "..\src\ClaudeClothes.Web" -dotnet run diff --git a/scripts/start-dev.sh b/scripts/start-dev.sh deleted file mode 100755 index 86e7629..0000000 --- a/scripts/start-dev.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -echo "๐Ÿš€ Starting ClaudeClothes Development Environment..." -echo "" - -# Check if Docker is running -if ! docker info > /dev/null 2>&1; then - echo "โŒ Docker is not running. Please start Docker Desktop and try again." - exit 1 -fi - -# Start SQL Server container -echo "๐Ÿ“ฆ Starting SQL Server container..." -docker-compose up -d - -# Wait for SQL Server to be ready -echo "โณ Waiting for SQL Server to be ready..." -sleep 10 - -# Check if SQL Server is healthy -echo "๐Ÿ” Checking SQL Server health..." -until docker exec claudeclothes-sqlserver /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "ClaudeClothes2024!" -Q "SELECT 1" > /dev/null 2>&1 -do - echo " SQL Server is starting..." - sleep 3 -done - -echo "โœ… SQL Server is ready!" -echo "" -echo "๐Ÿ“Š Database Connection Info:" -echo " Server: localhost,1433" -echo " Database: ClaudeClothesDB (will be created automatically)" -echo " Username: sa" -echo " Password: ClaudeClothes2024!" -echo "" -echo "๐ŸŒ Starting Blazor application..." -echo " Navigate to: https://localhost:5001" -echo "" - -# Start the web application -cd ../src/ClaudeClothes.Web -dotnet run diff --git a/scripts/stop-dev.ps1 b/scripts/stop-dev.ps1 deleted file mode 100644 index 7efba2b..0000000 --- a/scripts/stop-dev.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -# PowerShell script per fermare l'ambiente di sviluppo ClaudeClothes - -Write-Host "๐Ÿ›‘ Stopping ClaudeClothes Development Environment..." -ForegroundColor Yellow -Write-Host "" - -# Stop Docker containers -Write-Host "๐Ÿ“ฆ Stopping SQL Server container..." -ForegroundColor Yellow -docker-compose down - -Write-Host "" -Write-Host "โœ… Development environment stopped!" -ForegroundColor Green -Write-Host "" -Write-Host "๐Ÿ’ก To start again, run: .\scripts\start-dev.ps1" -ForegroundColor Cyan -Write-Host "๐Ÿ’ก To remove all data, run: docker-compose down -v" -ForegroundColor Cyan diff --git a/scripts/stop-dev.sh b/scripts/stop-dev.sh deleted file mode 100755 index a2687d0..0000000 --- a/scripts/stop-dev.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -echo "๐Ÿ›‘ Stopping ClaudeClothes Development Environment..." -echo "" - -# Stop Docker containers -echo "๐Ÿ“ฆ Stopping SQL Server container..." -docker-compose down - -echo "" -echo "โœ… Development environment stopped!" -echo "" -echo "๐Ÿ’ก To start again, run: ./scripts/start-dev.sh" -echo "๐Ÿ’ก To remove all data, run: docker-compose down -v" diff --git a/slides/slides.pdf b/slides/slides.pdf new file mode 100644 index 0000000..943019a Binary files /dev/null and b/slides/slides.pdf differ