A RESTful API for hotel management, built with NestJS and PostgreSQL.
- User Authentication: Secure registration and login using JWT.
- Role-Based Access: Granular routes for
ADMINandUSERroles. - Hotel Management: Create, list, and update hotels with facilities and images.
- Owner Management: Register, list, and remove hotel owners.
- Reservation System: Book hotels for users.
- Interactive API Docs: Swagger (OpenAPI) documentation available.
Access interactive documentation at
http://localhost:4000/api-docs
- Node.js (v14+)
- PostgreSQL
- npm or pnpm
-
Clone the repository:
git clone https://github.com/ME-Atish/meat-place.git cd meat-place -
Install dependencies:
npm install # or pnpm install -
Configure environment variables:
- Copy
.env.exampleto.env - Fill in the values:
PORT=4000 DATABASE_URL=postgresql://username:password@localhost:5432/place ACCESS_TOKEN_SECRET=your-secret REFRESH_TOKEN_SECRET=your-refresh-secret REMEMBER_ME_TOKEN_SECRET=your-remember-token
- Copy
-
Build the project:
npm run build
-
Initialize the database:
npm run db:init
-
Start the server:
npm run start
-
(Optional) Lint your code:
npm run lint
-
View API docs:
Open http://localhost:4000/api-docs in your browser.
Refer to Swagger docs for request/response details and authorization info.
Licensed under the MIT License.
Author: ME-Atish