├── .gitignore ├── LICENSE ├── Readme.md ├── cmd └── web │ ├── coverage.out │ ├── main.go │ ├── main_test.go │ ├── middleware.go │ ├── middleware_test.go │ ├── routes.go │ ├── routes_test.go │ ├── send-mail.go │ └── setup_test.go ├── email-template └── basic.html ├── exaple.database.yml ├── go.mod ├── go.sum ├── hotel-go ├── internal ├── config │ └── config.go ├── driver │ └── driver.go ├── forms │ ├── errors.go │ ├── forms.go │ └── forms_test.go ├── handlers │ ├── .DS_Store │ ├── coverage.out │ ├── handlers.go │ ├── handlers_test.go │ └── setup_test.go ├── helpers │ └── helpers.go ├── models │ ├── models.go │ └── templateData.go ├── render │ ├── .DS_Store │ ├── render.go │ ├── render_test.go │ └── setup_test.go └── repository │ ├── dbrepo │ ├── dbrepo.go │ ├── postgres.go │ └── test-repo.go │ └── repository.go ├── main.exe ├── migrations ├── 20230203153446_create_user_table.down.fizz ├── 20230203153446_create_user_table.up.fizz ├── 20230204055656_create_reservation_table.down.fizz ├── 20230204055656_create_reservation_table.up.fizz ├── 20230204060145_create_rooms_table.down.fizz ├── 20230204060145_create_rooms_table.up.fizz ├── 20230204060407_create_restrictions_table.down.fizz ├── 20230204060407_create_restrictions_table.up.fizz ├── 20230204060909_create_room_restrictions_table.down.fizz ├── 20230204060909_create_room_restrictions_table.up.fizz ├── 20230204062035_create_fkfor_reservations_table.down.fizz ├── 20230204062035_create_fkfor_reservations_table.up.fizz ├── 20230204063141_create_fkfor_room_restrictions.down.fizz ├── 20230204063141_create_fkfor_room_restrictions.up.fizz ├── 20230204065729_create_unique_index_for_users_table.down.fizz ├── 20230204065729_create_unique_index_for_users_table.up.fizz ├── 20230204070411_create_indices_on_room_restrictions.down.fizz ├── 20230204070411_create_indices_on_room_restrictions.up.fizz ├── 20230204073403_add_indices_to_reservation_table.down.fizz ├── 20230204073403_add_indices_to_reservation_table.up.fizz ├── 20230211170057_add_not_null_to_reservation_id_for_restriction.down.fizz ├── 20230211170057_add_not_null_to_reservation_id_for_restriction.up.fizz ├── 20230301151802_seed_rooms_table.postgres.down.sql ├── 20230301151802_seed_rooms_table.postgres.up.sql ├── 20230301152216_seed_restrictions_table.postgres.down.sql ├── 20230301152216_seed_restrictions_table.postgres.up.sql ├── 20230304051248_add_processed_to_reservations_table.down.fizz ├── 20230304051248_add_processed_to_reservations_table.up.fizz └── schema.sql ├── run.bat ├── static ├── css │ ├── admin-styles.css │ └── style.css ├── images │ ├── generals-quarters.png │ ├── hotel-dummy-image.jpg │ ├── marjors-suite.png │ ├── outside.png │ ├── tray.png │ └── woman-laptop.png └── js │ └── app.js └── templates ├── about.page.html ├── admin-all-reservations.page.html ├── admin-dashboard.page.html ├── admin-new-reservations.page.html ├── admin-reservation-show.page.html ├── admin-reservations-calendar.page.html ├── admin.layout.html ├── base.layout.html ├── choose-room.page.html ├── contact.page.html ├── generals.page.html ├── home.page.html ├── login.page.html ├── majors.page.html ├── make-reservation.page.html ├── reservation-summary.page.html └── search-availability.page.html /.gitignore: -------------------------------------------------------------------------------- 1 | database.yml 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/LICENSE -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/Readme.md -------------------------------------------------------------------------------- /cmd/web/coverage.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/cmd/web/coverage.out -------------------------------------------------------------------------------- /cmd/web/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/cmd/web/main.go -------------------------------------------------------------------------------- /cmd/web/main_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/cmd/web/main_test.go -------------------------------------------------------------------------------- /cmd/web/middleware.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/cmd/web/middleware.go -------------------------------------------------------------------------------- /cmd/web/middleware_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/cmd/web/middleware_test.go -------------------------------------------------------------------------------- /cmd/web/routes.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/cmd/web/routes.go -------------------------------------------------------------------------------- /cmd/web/routes_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/cmd/web/routes_test.go -------------------------------------------------------------------------------- /cmd/web/send-mail.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/cmd/web/send-mail.go -------------------------------------------------------------------------------- /cmd/web/setup_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/cmd/web/setup_test.go -------------------------------------------------------------------------------- /email-template/basic.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/email-template/basic.html -------------------------------------------------------------------------------- /exaple.database.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/exaple.database.yml -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/go.sum -------------------------------------------------------------------------------- /hotel-go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/hotel-go -------------------------------------------------------------------------------- /internal/config/config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/config/config.go -------------------------------------------------------------------------------- /internal/driver/driver.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/driver/driver.go -------------------------------------------------------------------------------- /internal/forms/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/forms/errors.go -------------------------------------------------------------------------------- /internal/forms/forms.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/forms/forms.go -------------------------------------------------------------------------------- /internal/forms/forms_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/forms/forms_test.go -------------------------------------------------------------------------------- /internal/handlers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/handlers/.DS_Store -------------------------------------------------------------------------------- /internal/handlers/coverage.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/handlers/coverage.out -------------------------------------------------------------------------------- /internal/handlers/handlers.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/handlers/handlers.go -------------------------------------------------------------------------------- /internal/handlers/handlers_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/handlers/handlers_test.go -------------------------------------------------------------------------------- /internal/handlers/setup_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/handlers/setup_test.go -------------------------------------------------------------------------------- /internal/helpers/helpers.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/helpers/helpers.go -------------------------------------------------------------------------------- /internal/models/models.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/models/models.go -------------------------------------------------------------------------------- /internal/models/templateData.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/models/templateData.go -------------------------------------------------------------------------------- /internal/render/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/render/.DS_Store -------------------------------------------------------------------------------- /internal/render/render.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/render/render.go -------------------------------------------------------------------------------- /internal/render/render_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/render/render_test.go -------------------------------------------------------------------------------- /internal/render/setup_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/render/setup_test.go -------------------------------------------------------------------------------- /internal/repository/dbrepo/dbrepo.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/repository/dbrepo/dbrepo.go -------------------------------------------------------------------------------- /internal/repository/dbrepo/postgres.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/repository/dbrepo/postgres.go -------------------------------------------------------------------------------- /internal/repository/dbrepo/test-repo.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/repository/dbrepo/test-repo.go -------------------------------------------------------------------------------- /internal/repository/repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/internal/repository/repository.go -------------------------------------------------------------------------------- /main.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/main.exe -------------------------------------------------------------------------------- /migrations/20230203153446_create_user_table.down.fizz: -------------------------------------------------------------------------------- 1 | sql("drop table users") -------------------------------------------------------------------------------- /migrations/20230203153446_create_user_table.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230203153446_create_user_table.up.fizz -------------------------------------------------------------------------------- /migrations/20230204055656_create_reservation_table.down.fizz: -------------------------------------------------------------------------------- 1 | sql("drop table reservations") -------------------------------------------------------------------------------- /migrations/20230204055656_create_reservation_table.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204055656_create_reservation_table.up.fizz -------------------------------------------------------------------------------- /migrations/20230204060145_create_rooms_table.down.fizz: -------------------------------------------------------------------------------- 1 | sql("drop table rooms") -------------------------------------------------------------------------------- /migrations/20230204060145_create_rooms_table.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204060145_create_rooms_table.up.fizz -------------------------------------------------------------------------------- /migrations/20230204060407_create_restrictions_table.down.fizz: -------------------------------------------------------------------------------- 1 | sql("drop table restrictions") -------------------------------------------------------------------------------- /migrations/20230204060407_create_restrictions_table.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204060407_create_restrictions_table.up.fizz -------------------------------------------------------------------------------- /migrations/20230204060909_create_room_restrictions_table.down.fizz: -------------------------------------------------------------------------------- 1 | sql("drop table room_restrictions") -------------------------------------------------------------------------------- /migrations/20230204060909_create_room_restrictions_table.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204060909_create_room_restrictions_table.up.fizz -------------------------------------------------------------------------------- /migrations/20230204062035_create_fkfor_reservations_table.down.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204062035_create_fkfor_reservations_table.down.fizz -------------------------------------------------------------------------------- /migrations/20230204062035_create_fkfor_reservations_table.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204062035_create_fkfor_reservations_table.up.fizz -------------------------------------------------------------------------------- /migrations/20230204063141_create_fkfor_room_restrictions.down.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204063141_create_fkfor_room_restrictions.down.fizz -------------------------------------------------------------------------------- /migrations/20230204063141_create_fkfor_room_restrictions.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204063141_create_fkfor_room_restrictions.up.fizz -------------------------------------------------------------------------------- /migrations/20230204065729_create_unique_index_for_users_table.down.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204065729_create_unique_index_for_users_table.down.fizz -------------------------------------------------------------------------------- /migrations/20230204065729_create_unique_index_for_users_table.up.fizz: -------------------------------------------------------------------------------- 1 | add_index("users", "email", {"unique": true}) -------------------------------------------------------------------------------- /migrations/20230204070411_create_indices_on_room_restrictions.down.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204070411_create_indices_on_room_restrictions.down.fizz -------------------------------------------------------------------------------- /migrations/20230204070411_create_indices_on_room_restrictions.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204070411_create_indices_on_room_restrictions.up.fizz -------------------------------------------------------------------------------- /migrations/20230204073403_add_indices_to_reservation_table.down.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204073403_add_indices_to_reservation_table.down.fizz -------------------------------------------------------------------------------- /migrations/20230204073403_add_indices_to_reservation_table.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230204073403_add_indices_to_reservation_table.up.fizz -------------------------------------------------------------------------------- /migrations/20230211170057_add_not_null_to_reservation_id_for_restriction.down.fizz: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /migrations/20230211170057_add_not_null_to_reservation_id_for_restriction.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230211170057_add_not_null_to_reservation_id_for_restriction.up.fizz -------------------------------------------------------------------------------- /migrations/20230301151802_seed_rooms_table.postgres.down.sql: -------------------------------------------------------------------------------- 1 | delete from rooms; -------------------------------------------------------------------------------- /migrations/20230301151802_seed_rooms_table.postgres.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230301151802_seed_rooms_table.postgres.up.sql -------------------------------------------------------------------------------- /migrations/20230301152216_seed_restrictions_table.postgres.down.sql: -------------------------------------------------------------------------------- 1 | delete from restrictions; -------------------------------------------------------------------------------- /migrations/20230301152216_seed_restrictions_table.postgres.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230301152216_seed_restrictions_table.postgres.up.sql -------------------------------------------------------------------------------- /migrations/20230304051248_add_processed_to_reservations_table.down.fizz: -------------------------------------------------------------------------------- 1 | drop_column("reservations", "processed") -------------------------------------------------------------------------------- /migrations/20230304051248_add_processed_to_reservations_table.up.fizz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/migrations/20230304051248_add_processed_to_reservations_table.up.fizz -------------------------------------------------------------------------------- /migrations/schema.sql: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /run.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/run.bat -------------------------------------------------------------------------------- /static/css/admin-styles.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/static/css/admin-styles.css -------------------------------------------------------------------------------- /static/css/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/static/css/style.css -------------------------------------------------------------------------------- /static/images/generals-quarters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/static/images/generals-quarters.png -------------------------------------------------------------------------------- /static/images/hotel-dummy-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/static/images/hotel-dummy-image.jpg -------------------------------------------------------------------------------- /static/images/marjors-suite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/static/images/marjors-suite.png -------------------------------------------------------------------------------- /static/images/outside.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/static/images/outside.png -------------------------------------------------------------------------------- /static/images/tray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/static/images/tray.png -------------------------------------------------------------------------------- /static/images/woman-laptop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/static/images/woman-laptop.png -------------------------------------------------------------------------------- /static/js/app.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/static/js/app.js -------------------------------------------------------------------------------- /templates/about.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/about.page.html -------------------------------------------------------------------------------- /templates/admin-all-reservations.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/admin-all-reservations.page.html -------------------------------------------------------------------------------- /templates/admin-dashboard.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/admin-dashboard.page.html -------------------------------------------------------------------------------- /templates/admin-new-reservations.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/admin-new-reservations.page.html -------------------------------------------------------------------------------- /templates/admin-reservation-show.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/admin-reservation-show.page.html -------------------------------------------------------------------------------- /templates/admin-reservations-calendar.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/admin-reservations-calendar.page.html -------------------------------------------------------------------------------- /templates/admin.layout.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/admin.layout.html -------------------------------------------------------------------------------- /templates/base.layout.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/base.layout.html -------------------------------------------------------------------------------- /templates/choose-room.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/choose-room.page.html -------------------------------------------------------------------------------- /templates/contact.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/contact.page.html -------------------------------------------------------------------------------- /templates/generals.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/generals.page.html -------------------------------------------------------------------------------- /templates/home.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/home.page.html -------------------------------------------------------------------------------- /templates/login.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/login.page.html -------------------------------------------------------------------------------- /templates/majors.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/majors.page.html -------------------------------------------------------------------------------- /templates/make-reservation.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/make-reservation.page.html -------------------------------------------------------------------------------- /templates/reservation-summary.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/reservation-summary.page.html -------------------------------------------------------------------------------- /templates/search-availability.page.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raihan2bd/hotel-bookings/HEAD/templates/search-availability.page.html --------------------------------------------------------------------------------