Skip to content

plyght/opus

Repository files navigation

Library Management System

Cross-platform library management with web and native iOS apps. Features barcode scanning, real-time updates, automated notifications, and role-based access control.

Monorepo Structure

library-management-app/
├── apps/
│   ├── web/              # React web application
│   └── ios/              # Native iOS app (SwiftUI)
├── services/
│   └── api/              # Rust API backend
└── packages/
    └── shared/           # Shared TypeScript types and tRPC schemas

Tech Stack

Frontend: React 18, TypeScript, Vite, Tailwind CSS, SwiftUI (iOS 26) Backend: Rust, Axum, Tokio, Prisma, SQLx Database: PostgreSQL/Supabase with real-time subscriptions Auth: Better Auth, Supabase Auth, OAuth (GitHub, Google) Monorepo: Turbo, Bun Workspaces

Quick Start

Prerequisites: Bun, Rust, PostgreSQL, Xcode (for iOS)

# 1. Clone and install
git clone <your-repo-url> && cd library-management-app
cp .env.example .env
bun install

# 2. Setup database
createdb library_db
bun run db:migrate && bun run db:generate

# 3. Start development (web + API)
bun run dev

Servers:

iOS Development:

cd apps/ios
open opus.xcodeproj
# Configure Supabase environment variables in Xcode scheme
# Build and run (Cmd + R)

See apps/ios/README.md for detailed iOS setup.

Environment Setup

Copy .env.example to .env and configure:

DATABASE_URL="postgresql://..."        # PostgreSQL or Supabase connection
SUPABASE_URL="https://..."            # Supabase project URL
SUPABASE_ANON_KEY="..."               # Supabase anonymous key
BETTER_AUTH_SECRET="..."              # Auth secret
RESEND_API_KEY="..."                  # Email service API key

Database Options: Local PostgreSQL, Docker, or Supabase (recommended for production)

Commands

bun run dev             # Start development servers
bun run build           # Build all workspaces
bun run test            # Run tests
bun run lint            # Lint code
bun run db:migrate      # Run database migrations

Features

  • Book management with ISBN barcode scanning and Open Library metadata
  • User management with role-based access control
  • Checkout system with loans, renewals, and returns tracking
  • Real-time updates across all clients
  • Automated overdue email notifications
  • OAuth authentication (GitHub, Google)
  • Admin dashboard with system statistics
  • Native iOS app with Liquid Glass design
  • Progressive web app with responsive design

About

a full-stack, small scale, library management app

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published