Nivo is a customer experience software that helps businesses manage customer flow and reduce waiting times.
- Real-time Queue Management - Live updates for instant synchronization
- Smart Appointment Scheduling - Advanced booking system with time slot management
- Customer Self-Service - QR code-based self-registration and check-in
- Multi-Channel Support - Web dashboard and customer-facing interfaces
- Business Analytics - Comprehensive insights into queue performance and customer behavior
- Responsive Design - Works seamlessly across desktop, tablet, and mobile devices
- Multi-tenant Architecture - Support for multiple businesses with isolated data
- RESTful API - Well-documented API for integrations and extensions
- Security First - JWT authentication, password hashing, and data validation
- React 18 - Modern React with hooks and concurrent features
- TypeScript - Type-safe development experience
- Vite - Lightning-fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- Chart.js - Interactive analytics and data visualization
- Bun - Fast JavaScript runtime and package manager
- TypeScript - Type-safe JavaScript development
- Express.js - Fast, minimalist web framework
- MongoDB - NoSQL database for flexible data storage
- Mongoose - MongoDB object modeling for Node.js
- Zod - TypeScript-first schema validation
- JWT - JSON Web Tokens for authentication
- bcryptjs - Password hashing library
Before you begin, ensure you have the following installed:
- Bun (v1.0.0 or higher) - Fast JavaScript runtime and package manager
- Node.js (v18.0.0 or higher) - For frontend development
- MongoDB (v5.0 or higher)
- Git
git clone https://github.com/yourusername/nivo.git
cd nivo
cd server
# Install dependencies
bun install
# Create environment file
cp .env.example .env
# Configure your environment variables
# Edit .env with your MongoDB connection string and other settings
# Start the backend server
bun run dev
# Optional: Create an admin user
bun run create-admin
cd client
# Install dependencies
npm install
# Start the development server
npm run dev
Make sure MongoDB is running on your system. The application will automatically create the necessary collections on first run.
cd server
# Development server with auto-reload
bun run dev
# Build the project
bun run build
# Format code
bun run format
# Lint code
bun run lint
# Create admin user
bun run create-admin
cd client
# Development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
Create a .env
file in the server directory:
# Server Configuration
PORT=5000
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-here-change-this-in-production
# MongoDB Configuration
MONGO_URI=mongodb+srv://your-username:[email protected]/your-db-name
nivo/
βββ client/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ hooks/ # Custom React hooks
β β βββ utils/ # Utility functions
β β βββ assets/ # Static assets
β βββ public/ # Public assets
β βββ package.json # Frontend dependencies
β
βββ server/ # TypeScript + Bun backend application
β βββ src/
β β βββ controllers/ # Request handlers
β β βββ services/ # Business logic
β β βββ routes/ # API route definitions
β β βββ models/ # Mongoose database models
β β βββ middlewares/ # Express middleware
β β βββ schemas/ # Zod validation schemas
β β βββ interfaces/ # TypeScript interfaces
β β βββ config/ # Configuration files
β β βββ utils/ # Utility functions
β βββ docs/ # API documentation
β βββ index.ts # Main server file
β βββ package.json # Backend dependencies
β βββ biome.json # Code formatting and linting
β
βββ backend/ # Legacy JavaScript backend (deprecated)
β
βββ README.md # This file
Base URL: /api/v1
POST /api/v1/user/signup # Register new business
POST /api/v1/user/login # Login user
GET /api/v1/user/profile # Get current user profile
GET /api/v1/user/patient-stats # Get patient statistics
PUT /api/v1/user/business-hours # Update business hours
GET /api/v1/queue/waitlist # Get current waitlist
GET /api/v1/queue/serving # Get currently serving patients
POST /api/v1/queue/patient # Add patient to queue (authenticated)
POST /api/v1/queue/customeradd/:userId # Add customer to specific user's queue (public)
PUT /api/v1/queue/patient/:id/serve # Move patient from waiting to serving
PUT /api/v1/queue/patient/:id/complete # Complete patient consultation
GET /api/v1/queue/patient/:id # Get patient details
GET /api/v1/queue/allpatient # Get all patients
GET /api/v1/appointment/available-slots/:userId/:date # Get available time slots
POST /api/v1/appointment/book/:userId # Book appointment (public)
POST /api/v1/appointment/add-booking # Add booking (authenticated)
GET /api/v1/appointment/user-appointments # Get user's appointments
GET /api/v1/appointment/today-bookings # Get today's bookings
PUT /api/v1/appointment/cancel/:appointmentId # Cancel appointment
GET /api/v1/user/queue-status/:userId # Get queue status for specific user
GET /api/v1/user/businessName/:userId # Get business name by user ID
GET /api/v1/user/get-user-by-business/:businessNameForUrl # Get user by business URL
Made with β€οΈ for efficient business management