Skip to content

Repository files navigation

🚗 AuctionForge - Real-Time Car Auction Platform

A modern, scalable car auction platform built with NestJS, React, PostgreSQL, Redis, and WebSocket technology.

✨ Features

  • Real-time Live Bidding - WebSocket-powered auction participation
  • Comprehensive Car Management - Detailed vehicle information and images
  • Advanced Auction System - Scheduling, status management, automated processing
  • Secure Authentication - JWT-based auth with role-based access control
  • Real-time Notifications - Instant updates for bids and auction events
  • Admin Dashboard - Complete user and auction management
  • DDoS Protection - Rate limiting and abuse prevention

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • Docker & Docker Compose
  • PostgreSQL 14+
  • Redis 6+
  • RabbitMQ 3.8+

Installation

  1. Clone and install

    git clone <repository-url>
    cd AuctionForge
    npm run install:all
  2. Set up environment

    cp backend/env.example backend/.env
    cp frontend/env.example frontend/.env
    # Edit .env files with your configuration
  3. Start services

    # Start infrastructure
    docker-compose -f docker-compose.dev.yml up -d
    
    # Setup database
    cd backend
    npm run db:generate
    npm run db:migrate
    npm run db:seed
    
    # Start applications
    npm run dev
  4. Access the application

🏗️ Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Frontend      │    │   Backend       │    │   Infrastructure │
│   (React)       │◄──►│   (NestJS)      │◄──►│   (Docker)      │
└─────────────────┘    └─────────────────┘    └─────────────────┘
         │                       │                       │
         │              ┌─────────────────┐              │
         └─────────────►│   WebSocket     │◄─────────────┘
                        │   Gateway       │
                        └─────────────────┘
                                │
         ┌─────────────────┐    │    ┌─────────────────┐
         │   PostgreSQL    │    │    │   Redis         │
         │   Database      │◄───┼───►│   Cache         │
         └─────────────────┘    │    └─────────────────┘
                                │
                        ┌─────────────────┐
                        │   RabbitMQ      │
                        │   Message Queue │
                        └─────────────────┘

🛠️ Development

Available Scripts

npm run dev              # Start both frontend and backend
npm run dev:backend      # Start only backend
npm run dev:frontend     # Start only frontend
npm run build            # Build both projects
npm run lint             # Lint all code
npm run test             # Run all tests

Database Commands

cd backend
npm run db:generate      # Generate Prisma client
npm run db:migrate       # Run migrations
npm run db:seed          # Seed with sample data
npm run db:studio        # Open Prisma Studio

🔧 Technology Stack

Backend

  • Framework: NestJS with TypeScript
  • Database: PostgreSQL with Prisma ORM
  • Cache: Redis
  • Message Queue: RabbitMQ
  • Real-time: Socket.IO
  • Authentication: JWT with Passport

Frontend

  • Framework: React 18 with TypeScript
  • Build Tool: Vite
  • Styling: Tailwind CSS
  • Real-time: Socket.IO Client
  • HTTP Client: Axios

Infrastructure

  • Containerization: Docker & Docker Compose
  • Process Management: PM2
  • Code Quality: ESLint + Prettier

📊 Key Endpoints

Authentication

  • POST /auth/register - User registration
  • POST /auth/login - User login
  • GET /auth/profile - Get user profile

Auctions

  • GET /auctions - List auctions
  • POST /auctions - Create auction (Admin)
  • GET /auctions/:id - Get auction details
  • POST /auctions/:id/start - Start auction

Bidding

  • POST /bids - Place a bid
  • GET /bids/auction/:auctionId - Get auction bids

WebSocket Events

  • joinAuction - Join auction room
  • placeBid - Place real-time bid
  • bidUpdate - Real-time bid updates

🔒 Security Features

  • JWT Authentication with role-based access
  • Rate limiting and DDoS protection
  • Input validation and sanitization
  • CORS configuration
  • Audit logging

📈 Performance Features

  • Redis caching for sessions and data
  • Database optimization with Prisma
  • Message queuing with RabbitMQ
  • Real-time WebSocket communication
  • Connection pooling

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License.


AuctionForge - Where every car finds its perfect bidder! 🚗💎

About

A scalable, real-time car auction bidding system that handles high-frequency bids from multiple users with enterprise-level reliability, security, and performance.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages