Skip to Content
For DevelopersArchitecture

Architecture

This page describes Auktiva’s technical architecture and project structure.

Project Structure

auktiva/ β”œβ”€β”€ cli/ # CLI setup wizard β”œβ”€β”€ docs/ # Documentation (Nextra) β”œβ”€β”€ prisma/ β”‚ β”œβ”€β”€ schema.prisma # Database schema β”‚ └── seed-currencies.ts # Currency seed data β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ components/ # React components β”‚ β”œβ”€β”€ generated/ # Generated Prisma client β”‚ β”œβ”€β”€ hooks/ # Custom React hooks β”‚ β”œβ”€β”€ lib/ # Utility libraries β”‚ └── pages/ # Next.js pages β”œβ”€β”€ .env.example # Environment template └── package.json # Dependencies

Tech Stack

Frontend

  • Next.js 16 - React framework with Pages Router
  • React 19 - UI library
  • Tailwind CSS - Utility-first CSS
  • DaisyUI - Tailwind component library
  • SWR - Data fetching and caching

Backend

  • Next.js API Routes - Serverless API endpoints
  • Prisma ORM - Database access layer
  • NextAuth.js v4 - Authentication

Database

  • SQLite - Local file-based database
  • Turso/LibSQL - Cloud-distributed SQLite

Data Flow

Page Request Flow

Browser β†’ Next.js Server β†’ getServerSideProps ↓ Prisma Query ↓ Database ↓ Props β†’ React Component β†’ HTML

Real-Time Updates

Auktiva supports WebSocket-based real-time updates using Soketi (self-hosted) or Pusher (cloud). When realtime is not configured, it falls back to SWR polling.

With WebSocket (Soketi/Pusher): Browser ← WebSocket ← Soketi/Pusher ← API (on data change) ↓ Instant UI update Fallback (Polling): Browser β†’ SWR (interval) β†’ API Route β†’ Database ↓ Update UI on change

See Realtime Features for configuration details.

Database Schema

Core Entities

  • User has many AuctionMembers (memberships)
  • Auction has many AuctionMembers and AuctionItems
  • AuctionItem has many Bids and ItemImages
  • Bid belongs to User and AuctionItem

API Structure

RESTful Endpoints

/api/auth/* # NextAuth endpoints /api/auctions # List/create auctions /api/auctions/[id] # Get/update/delete auction /api/auctions/[id]/items # List/create items /api/notifications # User notifications /api/upload # File uploads
Last updated on