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 # DependenciesTech 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 β HTMLReal-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 changeSee 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 uploadsLast updated on