LuxuryStay Admin is the admin-facing backend and static dashboard for the LuxuryStay hotel chain. It provides administrators with a comprehensive interface to manage hotel operations using a modern tech stack of Express.js, TypeScript, Tailwind CSS, MongoDB (Mongoose), and Socket.IO.
- Admin Authentication (JWT-based)
- Dashboard Analytics for monitoring rooms, bookings, and revenue
- CRUD Management for rooms, bookings, invoices, housekeeping, and maintenance
- Real-Time Notifications via Socket.IO
- Role & Permissions system with admin model featuring granular scopes
- Backend: Express.js (v5.1.0)
- Language: TypeScript
- Database: MongoDB with Mongoose ODM
- Authentication: JWT (JSON Web Tokens)
- Styling: Tailwind CSS
- Real-time Communication: Socket.IO
- Security: bcrypt for password hashing
- Environment: dotenv for environment variable management
luxurystay-admin/
├── .env
├── .env.example
├── .gitignore
├── LICENSE
├── package-lock.json
├── package.json
├── Readme.md
├── tsconfig.json
├── vercel.json
├── node_modules/
├── public/ # Static assets and HTML pages
└── src/
├── controllers/ # Request handling logic
├── interfaces/ # TypeScript interfaces
├── middleware/ # Express middleware
├── routes/ # API route definitions
└── utils/ # Utility functions
- Node.js (v18 or higher)
- MongoDB (local instance or cloud Atlas)
- Environment variables configured in
.envfiles
- Navigate to the project directory:
cd luxurystay-admin- Install dependencies:
npm install- Configure environment variables:
cp .env.example .env
# Edit .env with your configuration- Build and run the application:
npm run startThe application will compile TypeScript files and start the server on the configured port (typically 5000, but check your .env file).
/- Main dashboard/api- Dashboard statistics API/api/auth- Authentication-related endpoints/login- Login page/signup- Signup page/logout- Logout functionality
- JWT-based authentication system
- Password hashing with bcrypt
- Cookie-based session management
- Protected routes with middleware
- TypeScript is used throughout the application
- Modern ESNext features with NodeNext module resolution
- Strict TypeScript configuration with comprehensive type checking
- Consistent file naming with .mjs for modules
The project includes a vercel.json file, suggesting it's configured for deployment on Vercel. The application can also be deployed to other Node.js hosting platforms with minimal configuration.
Since this is an admin panel, it likely interacts with the same MongoDB collections as the main application but focuses on administrative views and actions.