smooth-app
전 세계 식품의 성분·영양·정보를 자유롭게 협업하고 공개하는 데이터베이스
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Operative Resource Manager-ORM - UNTH Ituku Ozalla
A comprehensive theatre management system for the University of Nigeria Teaching Hospital Ituku Ozalla, designed to streamline surgical operations, inventory management, and patient care tracking.
1. Role-Based Authentication
• Multi-role access control (Admin, Theatre Manager, Theatre Chairman, Surgeon, Scrub Nurse)
• User profile creation with admin approval workflow
• Secure password hashing with bcrypt
• Session management with NextAuth.jsREADME 전문 보기 ↗A comprehensive theatre management system for the University of Nigeria Teaching Hospital Ituku Ozalla, designed to streamline surgical operations, inventory management, and patient care tracking.
Before you begin, ensure you have the following installed:
git clone <repository-url>
cd "theatre manger"
npm install
-- Connect to PostgreSQL
psql -U postgres
-- Create database
CREATE DATABASE theatre_db;
-- Exit psql
\q
Create a .env file in the root directory with the following:
DATABASE_URL="postgresql://postgres:natiss_natiss@localhost:5432/theatre_db"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-super-secret-key-change-this-in-production"
Important: Change NEXTAUTH_SECRET to a random secure string in production.
# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma db push
# (Optional) Seed database with sample data
npx prisma db seed
npm run dev
The application will be available at http://localhost:3000
npm run build
npm start
After setting up the database, create an admin account:
Navigate to http://localhost:3000/auth/register
Register with the following details:
Manually approve the account in the database:
UPDATE users SET status = 'APPROVED' WHERE username = 'admin';
Or use Prisma Studio:
npx prisma studio
theatre-manger/
├── prisma/
│ └── schema.prisma # Database schema
├── src/
│ ├── app/
│ │ ├── api/ # API routes
│ │ │ ├── auth/ # Authentication endpoints
│ │ │ ├── inventory/ # Inventory management
│ │ │ ├── surgeries/ # Surgery scheduling
│ │ │ ├── patients/ # Patient management
│ │ │ └── dashboard/ # Dashboard statistics
│ │ ├── auth/ # Authentication pages
│ │ │ ├── login/
│ │ │ └── register/
│ │ ├── dashboard/ # Main application
│ │ │ ├── inventory/
│ │ │ ├── surgeries/
│ │ │ ├── patients/
│ │ │ ├── transfers/
│ │ │ ├── checklists/
│ │ │ ├── cancellations/
│ │ │ └── users/
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ └── providers.tsx
│ ├── lib/
│ │ ├── auth.ts # NextAuth configuration
│ │ ├── prisma.ts # Prisma client
│ │ └── utils.ts # Utility functions
│ └── types/
│ └── next-auth.d.ts # TypeScript type definitions
├── .env # Environment variables
├── .gitignore
├── next.config.js
├── package.json
├── postcss.config.js
├── tailwind.config.ts
├── tsconfig.json
└── README.md
The system uses the following main entities:
# Run linting
npm run lint
# Type checking
npx tsc --noEmit
# Check PostgreSQL is running
pg_isready -U postgres
# Verify database exists
psql -U postgres -l | grep theatre_db
# Reset database (CAUTION: Deletes all data)
npx prisma db push --force-reset
# Kill process on port 3000 (Windows)
netstat -ano | findstr :3000
taskkill /PID <PID> /F
# Use different port
PORT=3001 npm run dev
This project is proprietary software developed for the University of Nigeria Teaching Hospital Ituku Ozalla.
For technical support or feature requests, contact the hospital IT department.
University of Nigeria Teaching Hospital Ituku Ozalla
Excellence in Healthcare Delivery