A full-stack pizza shop web application built with ASP.NET Core 9 and Vue.js 3. This project serves as an interview tool for developers to demonstrate their skills in identifying and fixing code issues.
This application allows users to browse pizzas, view details, and authenticate. The initial implementation focuses on core functionality with clean architecture principles.
Note for Interview Candidates: Future PRs will include cart and order functionality with intentional code issues for you to identify and fix as part of the interview process.
- Framework: ASP.NET Core 9 (MVC API)
- Database: SQLite with Entity Framework Core (Code-First)
- Authentication: JWT Bearer Tokens
- Architecture: Clean Code / Layered Architecture
PizzaApp.DTO- Data Transfer ObjectsPizzaApp.Data- Entity Framework Context, Entities, MigrationsPizzaApp.Service- Business Logic LayerPizzaApp.API- Web API Controllers
- Framework: Vue.js 3 with Composition API
- Build Tool: Vite
- State Management: TanStack Query (Vue Query)
- UI Framework: Vuetify (Material Design)
- Styling: Tailwind CSS
- Routing: Vue Router
Before you begin, ensure you have the following installed:
- .NET 9 SDK
- Node.js (v18 or higher)
- npm or yarn
- A code editor (VS Code recommended)
- SQLite (usually comes pre-installed on macOS/Linux)
# Check .NET version
dotnet --version
# Check Node.js version
node --version
# Check npm version
npm --version-
Navigate to the backend directory
cd backend -
Restore NuGet packages
dotnet restore
-
Apply database migrations
cd PizzaApp.API dotnet ef database updateThis will create the SQLite database and seed it with sample data.
-
Run the API
dotnet run
The API will start on
http://localhost:5000(orhttps://localhost:5001for HTTPS).Swagger documentation will be available at
http://localhost:5000/swagger
-
Navigate to the frontend directory (from project root)
cd frontend -
Install dependencies
npm install
-
Start the development server
npm run dev
The application will start on
http://localhost:5173 -
Open your browser
Navigate to
http://localhost:5173to view the application.
sample-vue-repo/
βββ backend/
β βββ PizzaApp.sln # Solution file
β βββ PizzaApp.DTO/ # Data Transfer Objects
β β βββ Requests/ # API request models
β β βββ Responses/ # API response models
β β βββ Models/ # Shared DTOs
β βββ PizzaApp.Data/ # Data Access Layer
β β βββ Context/ # DbContext
β β βββ Entities/ # Entity models
β β βββ Configurations/ # EF configurations
β β βββ Migrations/ # EF migrations
β βββ PizzaApp.Service/ # Business Logic Layer
β β βββ Interfaces/ # Service interfaces
β β βββ Services/ # Service implementations
β β βββ Repositories/ # Repository pattern
β βββ PizzaApp.API/ # Web API
β βββ Controllers/ # API controllers
β βββ Middleware/ # Custom middleware
β βββ Extensions/ # Extension methods
β βββ appsettings.json # Configuration
β βββ Program.cs # Application entry point
βββ frontend/
β βββ src/
β β βββ components/ # Reusable components
β β β βββ layout/ # Layout components
β β β βββ auth/ # Auth components
β β β βββ pizza/ # Pizza components
β β βββ views/ # Page components
β β βββ services/ # API services
β β βββ composables/ # Vue composables
β β βββ router/ # Vue Router config
β β βββ App.vue # Root component
β β βββ main.js # Application entry
β βββ package.json # Dependencies
β βββ vite.config.js # Vite configuration
β βββ tailwind.config.js # Tailwind configuration
βββ plans/ # Architecture documentation
βββ README.md # This file
-
β User Authentication
- Register new account
- Login with JWT tokens
- Secure password hashing
-
β Pizza Browsing
- View all available pizzas
- See pizza details with toppings
- Computed pricing (base price + toppings)
-
β Responsive UI
- Material Design components
- Tailwind CSS styling
- Mobile-friendly layout
- π Shopping cart functionality
- π Order placement and history
- π Admin panel for pizza management
- π Pizza customization (add/remove toppings)
- π User profile management
The application comes pre-seeded with 5 classic pizzas:
-
Margherita - $8.99
- Mozzarella, Tomato Sauce, Basil
-
Pepperoni - $10.99
- Mozzarella, Tomato Sauce, Pepperoni
-
Hawaiian - $11.99
- Mozzarella, Tomato Sauce, Ham, Pineapple
-
Meat Lovers - $13.99
- Mozzarella, Tomato Sauce, Pepperoni, Sausage, Bacon, Ham
-
Veggie Supreme - $12.99
- Mozzarella, Tomato Sauce, Bell Peppers, Onions, Mushrooms, Olives
POST /api/auth/register- Register a new userPOST /api/auth/login- Login and receive JWT token
GET /api/pizzas- Get all pizzas with computed pricesGET /api/pizzas/{id}- Get pizza details with toppings
GET /api/toppings- Get all available toppings
-
Start both backend and frontend servers
-
Test Authentication
- Navigate to
/register - Create a new account
- Login with your credentials
- Verify JWT token is stored in localStorage
- Navigate to
-
Test Pizza Listing
- Navigate to home page (
/) - Verify all 5 pizzas are displayed
- Check that computed prices are shown correctly
- Navigate to home page (
-
Test Pizza Details
- Click on any pizza card
- Verify navigation to detail page
- Check that all toppings are listed
- Verify computed price matches (base + sum of toppings)
- Navigate to
http://localhost:5000/swagger - Test API endpoints directly
- Use "Authorize" button to add JWT token for protected endpoints
Database not created
cd backend/PizzaApp.API
dotnet ef database updatePort already in use
- Edit
backend/PizzaApp.API/Properties/launchSettings.json - Change the port numbers
Migration errors
# Remove existing migrations
dotnet ef migrations remove
# Create new migration
dotnet ef migrations add InitialCreate
# Apply migration
dotnet ef database updateDependencies not installing
# Clear npm cache
npm cache clean --force
# Delete node_modules and reinstall
rm -rf node_modules package-lock.json
npm installCORS errors
- Verify backend CORS configuration in
Program.cs - Check that frontend URL matches allowed origins
- Ensure backend is running before making requests
Vite port conflict
- Edit
frontend/vite.config.js - Change the port in server configuration
- ASP.NET Core Documentation
- Entity Framework Core
- Vue.js 3 Documentation
- TanStack Query
- Vuetify Documentation
- Tailwind CSS
- See
plans/pizza-app-architecture.mdfor detailed architecture - See
plans/implementation-guide.mdfor implementation details
This codebase represents a working pizza shop application. In the interview process, you will:
- Review the current implementation
- Understand the architecture
- Explore the codebase
- Run the application locally