Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Car Auction

πŸš— Car Auction Platform - Microservices Architecture

A full-stack car auction application built with .NET microservices backend and React frontend.

🎯 Features

  • Browse Auctions - View all available car auctions
  • Advanced Search - Search by make, model, or color
  • Smart Filters - Filter by Live, Ending Soon, or Finished
  • Authentication - Secure login with OIDC/OAuth2
  • Create Auctions - List your car for auction (authenticated)
  • Manage Auctions - View and delete your listings
  • Real-time Updates - Event-driven architecture with RabbitMQ
  • Responsive Design - Works on desktop, tablet, and mobile

πŸ—οΈ Architecture

Microservices

  • Frontend Service - React + Vite + Tailwind CSS
  • Gateway Service - YARP Reverse Proxy
  • Identity Service - Duende IdentityServer (OIDC)
  • Auction Service - CRUD operations for auctions
  • Search Service - Full-text search with MongoDB
  • Bidding Service - (Coming soon)

Infrastructure

  • PostgreSQL - Auction and Identity data
  • MongoDB - Search indexes
  • RabbitMQ - Message bus for events
  • Docker - Containerization
  • Nginx - Frontend web server

πŸš€ Quick Start

Prerequisites

  • Docker & Docker Compose
  • Node.js 18+ (for local frontend development)

Run Everything

cd Carauction
docker-compose up --build

Access the Application

Default Test Users

  • Username: bob / Password: Pass123$
  • Username: alice / Password: Pass123$

Or register a new account through the UI.

πŸ“š Documentation

πŸ› οΈ Technology Stack

Frontend

  • React 18
  • Vite
  • Tailwind CSS
  • React Router v6
  • OIDC Authentication
  • Axios
  • React Hot Toast

Backend

  • .NET 10
  • Entity Framework Core
  • Duende IdentityServer
  • YARP (Reverse Proxy)
  • MassTransit + RabbitMQ
  • AutoMapper

Databases

  • PostgreSQL 16
  • MongoDB

DevOps

  • Docker
  • Docker Compose
  • Nginx

πŸ“ Project Structure

Carauction/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ AuctionService/      # Auction CRUD
β”‚   β”œβ”€β”€ SearchService/       # Search & Filter
β”‚   β”œβ”€β”€ IdentityService/     # Authentication
β”‚   β”œβ”€β”€ GatewayService/      # API Gateway
β”‚   β”œβ”€β”€ BiddingService/      # Bidding (WIP)
β”‚   β”œβ”€β”€ FrontendService/     # React UI
β”‚   └── Contracts/           # Shared contracts
β”œβ”€β”€ docker-compose.yml       # Docker orchestration
└── Carauction.slnx         # Solution file

πŸ”§ Development

Backend Services

# Run with Docker
cd Carauction
docker-compose up

# Or run individually with .NET
cd src/AuctionService
dotnet run

Frontend

# Development mode
cd Carauction/src/FrontendService
npm install
npm run dev

# Production build
npm run build

πŸ§ͺ Testing

Test Search Functionality

# Search by make
curl "http://localhost:5004/api/search?searchTerm=Ford"

# Search by model
curl "http://localhost:5004/api/search?searchTerm=Mustang"

# Filter by status
curl "http://localhost:5004/api/search?filterBy=live"

Test Authentication

  1. Go to http://localhost:3000
  2. Click "Login"
  3. Enter credentials
  4. Try creating an auction

πŸ“Š API Endpoints

Search Service

  • GET /api/search - Search auctions
    • Query params: searchTerm, filterBy, seller, winner

Auction Service

  • GET /api/auctions - Get all auctions
  • GET /api/auctions/{id} - Get auction by ID
  • POST /api/auctions - Create auction (auth required)
  • PUT /api/auctions/{id} - Update auction (auth required)
  • DELETE /api/auctions/{id} - Delete auction (auth required)

Identity Service

  • GET /.well-known/openid-configuration - OIDC discovery
  • POST /connect/token - Get access token

πŸ” Security

  • Authentication: OIDC/OAuth2 with IdentityServer
  • Authorization: JWT Bearer tokens
  • CORS: Configured for frontend origin
  • Protected Routes: Create, Update, Delete require authentication

🎨 UI Features

  • Modern gradient design
  • Smooth animations
  • Responsive layout
  • Loading states
  • Error handling
  • Toast notifications
  • Empty states
  • Mobile menu

πŸ”„ Event-Driven Architecture

Services communicate via RabbitMQ:

  • AuctionCreated β†’ Search Service updates index
  • AuctionUpdated β†’ Search Service updates index
  • AuctionDeleted β†’ Search Service removes from index
  • BidPlaced β†’ Auction Service updates bid (future)

πŸ› Troubleshooting

See TROUBLESHOOTING.md for common issues.

Quick fixes:

# Restart all services
docker-compose restart

# Fresh start
docker-compose down -v
docker-compose up --build

# Check logs
docker-compose logs -f

πŸ“ Recent Updates

βœ… Fixed Search Service

  • MongoDB text index now includes Model field
  • Search works for make, model, and color

βœ… Built Professional Frontend

  • Vite + React 18 (replaced deprecated CRA)
  • Full OIDC authentication
  • Complete CRUD operations
  • Modern Tailwind CSS design
  • Responsive mobile layout

🚧 Roadmap

  • Bidding Service integration
  • Real-time bid updates (SignalR)
  • Image upload functionality
  • Email notifications
  • Payment integration
  • Admin dashboard
  • Auction analytics

πŸ“„ License

This is a practice project for learning microservices architecture.

🀝 Contributing

This is a personal learning project, but feel free to fork and experiment!

πŸ“ž Support

If you encounter issues:

  1. Check TROUBLESHOOTING.md
  2. Review logs: docker-compose logs -f
  3. Try fresh start: docker-compose down -v && docker-compose up --build

Built with ❀️ using .NET Microservices + React

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages