Arca Hotel
A hotel platform split into eight Go services behind one API gateway — rooms, bookings, payments, reviews, chat, revenue reporting, and an AI service for recommendations and travel plans.

Background
A hotel’s booking flow touches several concerns that are easy to tangle in one application: identities for three roles, room inventory, bookings, payments, reviews, chat, and revenue reporting. As the schema and the team grow, one codebase also means one deployment and one failure domain. This project separates those concerns into independently runnable services while keeping a single entry point for the browser.
Process
Service boundaries
Split the domain into auth, room, booking, payment, chat, review, report, and AI services, each with its own models, controllers, database connection, and entry point. Shared packages hold configuration, JWT handling, the service-to-service HTTP client, and the response format.
API gateway
Built a Gin gateway that reverse-proxies requests to each service by path, normalizes repeated slashes, handles CORS, and serves the static assets and HTML templates for the browser pages.
Domain services
Implemented the CRUD and business rules for customers, owners, staff, room types, rooms, bookings, payments, chats and messages, reviews, and revenue reports on PostgreSQL through GORM, with JWT authentication and role checks at the edge.
AI and reporting
Added an AI service that reads room and booking data and calls a Python ML service for room recommendations and Lombok travel plans, plus a report service that aggregates revenue and a matching management page.
Gallery
Key Features
Single API gateway
Every browser request enters through one Gin server, which proxies it to the right service on ports 8001–8008. CORS, path cleanup, static files, and the HTML pages live in one place.
Role-based authentication
Auth issues a 24-hour JWT for customers, owners, and staff. Protected endpoints expect a bearer token, so each service can identify the caller without its own login flow.
Room inventory
Rooms are grouped under room types, with CRUD for both and a public listing that joins each room with its type for the booking page.
Booking and payment records
Bookings and payments are separate services with their own tables and endpoints; the booking service reads room data, and the payment service reads the booking it settles.
Chat with message history
Chats keep a thread per conversation, and messages support listing, sending, editing, and deleting. Deleting a chat cascades to its messages.
AI recommendations and travel plans
An AI service combines booking and room data with a Python ML service to recommend rooms and generate Lombok travel itineraries, exposed as two public endpoints.
Revenue reporting
The report service aggregates earnings into revenue reports with list, create, update, and delete endpoints, surfaced on a dedicated management page.
The repository runs the complete hotel flow across one gateway and eight Go services, plus a Python ML service: register, log in by role, browse rooms, book, pay, review, chat with staff, and read revenue reports. API.md documents every endpoint, its payload, and its auth requirement, which keeps the browser pages and the services in step.