Skip to content

bry-ly/Amethyst-Inn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

67 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Amethyst Inn - Guest House Appointment Management System

A full-stack booking and management platform built with Next.js (frontend) and Node.js/Express/MongoDB (backend), designed for role-based access control, real-time features, and a seamless experience.

🎯 Overview

Amethyst Inn is a feature-rich system for client/guest appointment booking, staff management, and administrative control. It utilizes a modern stack, beautiful responsive UI, and scalable backend architecture. This project covers comprehensive practical features for Patients/Guests, Staff, and Administrators.

Key Highlights

  • Multi-Role System: Dashboards tailored for Patients/Guests, Staff, and Administrators
  • Secure Authentication: Auth with email/password and OAuth (Better Auth)
  • Real-time Notifications: Email notifications for events, updates, confirmations
  • Responsive Design: Sleek UI with TailwindCSS, Radix UI, Shadcn/ui
  • Type-Safe: TypeScript for the frontend, Zod validation schemas
  • Database-Driven: MongoDB + Mongoose & Prisma ORM
  • Payment Integration: Stripe for service payments

✨ Features

πŸ‘€ Patient/Guest Features

  • Booking: Search and book services or appointments
  • Manage Bookings: View, reschedule, or cancel
  • Profile: Health records/history or reservation history
  • Payments: Payment history and online checkout
  • Notifications: Alerts for confirmations, reminders, changes

🦷 Staff (or Dentist/Employee) Features

  • Dashboard: Daily schedule and stats
  • Manage Availability: Set working hours, update profile
  • Client Management: Patient/guest lists, records, services/treatments
  • Booking Management: Confirm, reschedule, cancel
  • Notifications: Updates on bookings

πŸ‘¨β€πŸ’Ό Admin Features

  • System Analytics: Usage stats, revenue, metrics
  • User Management: Manage patients, staff, accounts
  • Booking/Appointment Oversight: View/manage all bookings
  • Service Management: Add/edit offered services
  • Settings: Configure system, emails, payments

πŸ› οΈ Tech Stack

Frontend (bry-ly/Amethyst-Inn)

  • Next.js: Modern React framework, App Router
  • TypeScript: Type safety throughout
  • Tailwind CSS, Radix UI, Shadcn/ui: Fast, accessible, beautiful UI
  • React Hook Form, Zod: Form state and validation
  • Motion, Recharts, Lucide: Animation, charts, icons

Backend (bry-ly/amethyst-inn-server)

  • Node.js + Express.js: Robust API server
  • MongoDB + Mongoose: Data persistence for medical/guest data
  • Prisma (if used for some domain models)
  • Stripe: Payments
  • Resend: Email handling
  • Authentication: JWT, OAuth, and multi-factor support

Dev Tools

  • ESLint, Prisma Studio, Turbopack

πŸ“‹ Prerequisites

  • Node.js 18+
  • MongoDB (local/Atlas)
  • npm/yarn/pnpm/bun
  • Git

πŸš€ Getting Started

1. Clone Both Repositories

git clone https://github.com/bry-ly/Amethyst-Inn.git
git clone https://github.com/bry-ly/amethyst-inn-server.git

2. Install Dependencies

Frontend:

cd Amethyst-Inn
pnpm install # or npm/yarn

Backend:

cd ../amethyst-inn-server
npm install # or yarn/pnpm

3. Environment Variables

Set up the following (.env for both projects):

Frontend (Amethyst-Inn)

NEXT_PUBLIC_APP_URL=http://localhost:3000
DATABASE_URL="mongodb+srv://username:password@cluster.mongodb.net/amethyst_inn"
BETTER_AUTH_SECRET=your_secret
BETTER_AUTH_URL=http://localhost:3000
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
RESEND_API_KEY=your_resend_api_key
EMAIL_SENDER_NAME="Amethyst Inn"
EMAIL_SENDER_ADDRESS="send@amethystinn.com"
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
NEXT_STRIPE_PUBLISHABLE_KEY=pk_test_...

Backend (amethyst-inn-server)

Consult config/ for custom variables:

  • Database connection, JWT secret, SMTP/API keys, Stripe keys, etc.

4. Database Setup

Backend:

  • MongoDB must be running/Atlas up and URI in env.
  • Seeders are in seeder/

5. Run Development Servers

Frontend:

cd Amethyst-Inn
pnpm dev # or yarn/ npm run dev

Backend:

cd amethyst-inn-server
npm run dev # or node server.js / app.js

Visit http://localhost:3000

πŸ“ Project Structure

Frontend (Amethyst-Inn)

Amethyst-Inn/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (auth)/
β”‚   β”œβ”€β”€ (main)/
β”‚   β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ services/
β”‚   └── page.tsx
β”œβ”€β”€ components/
β”œβ”€β”€ hooks/
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ actions/
β”‚   β”œβ”€β”€ auth-session/
β”‚   β”œβ”€β”€ email/
β”‚   └── types/
β”œβ”€β”€ public/
β”œβ”€β”€ types/
β”œβ”€β”€ utils/
└── middleware.ts

Backend (amethyst-inn-server)

amethyst-inn-server/
β”œβ”€β”€ api/           # REST API logic
β”œβ”€β”€ config/        # Configuration files (env, DB, Stripe, Mail, etc)
β”œβ”€β”€ controllers/   # Route logic/handlers
β”œβ”€β”€ docs/          # API docs, guides
β”œβ”€β”€ middleware/    # Middleware logic
β”œβ”€β”€ models/        # Mongoose models
β”œβ”€β”€ routes/        # API routes
β”œβ”€β”€ scripts/       # Utilities / tasks scripts
β”œβ”€β”€ seeder/        # DB seed scripts
β”œβ”€β”€ services/      # Business logic/services
β”œβ”€β”€ uploads/       # Static uploads
β”œβ”€β”€ utils/         # Helpers/utilities
β”œβ”€β”€ server.js      # Server entry
β”œβ”€β”€ app.js         # Express app logic
β”œβ”€β”€ package.json
└── vercel.json

πŸ” Authentication

Both apps support secure login, registration, and session management, using JWT, cookies, and optionally Google OAuth. Email verification, password reset, and role-based dashboards are provided.

πŸ“Š Database

  • User: (role, profile, payment)
  • Service: (name, category, pricing)
  • Appointment: (patient/guest, provider, slot, status)
  • Payment, Notification, Audit Log, etc

See backend /models and frontend /prisma/schema.prisma (if TypeScript models exist).

πŸ’³ Payment Integration

  • Stripe: Secure checkout, PCI-compliant, payment history, multi-methods

πŸ§ͺ Scripts

(Frontend)

pnpm run dev        # Dev server
pnpm run build      # Build production
pnpm run lint       # Code lint

(Backend)

npm run dev         # Start API server
npm run seed        # Seed DB (see /seeder)

πŸš€ Deployment

  • Frontend: Vercel recommended (see Vercel, Netlify, or similar)
  • Backend: Vercel, Railway, Render, or own VPS
  • MongoDB: Atlas preferred

Don't forget:

  • Update production URLs and secrets; whitelist IP for Atlas

πŸ“§ Email & Notifications

  • Using Resend for transactional emails (verification, reminders, etc)
  • Email config in .env

πŸ› Troubleshooting

  • Database: Ensure MongoDB Atlas/local is up & URI correct
  • Email: Resend API key, verify sender address
  • Payments: Stripe test keys for dev, check webhooks

πŸ“ License

Educational/demo only.

πŸ‘₯ Contributors

  • [Your Name/Team Name]

πŸ“ž Support

For issues:

  • Open GitHub issues
  • Contact maintainers
  • See /docs

Built with ❀️ using Next.js, Node.js, MongoDB, and modern web tech.

About

Resources

Stars

Watchers

Forks

Contributors

Languages