{"id":22712225,"url":"https://github.com/buildit/bookit-api","last_synced_at":"2026-07-02T23:34:13.005Z","repository":{"id":78235626,"uuid":"104783800","full_name":"buildit/bookit-api","owner":"buildit","description":"services api for BookIt","archived":false,"fork":false,"pushed_at":"2019-01-17T17:37:39.000Z","size":747,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-10-26T18:02:27.231Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buildit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-25T17:59:39.000Z","updated_at":"2019-01-17T17:37:40.000Z","dependencies_parsed_at":"2023-04-26T22:17:26.478Z","dependency_job_id":null,"html_url":"https://github.com/buildit/bookit-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/buildit/bookit-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Fbookit-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Fbookit-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Fbookit-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Fbookit-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildit","download_url":"https://codeload.github.com/buildit/bookit-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Fbookit-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35067031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-10T13:09:42.674Z","updated_at":"2026-07-02T23:34:12.978Z","avatar_url":"https://github.com/buildit.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BookIt-API\n\nA services api for booking bookable items such as rooms and/or resources\n\n## High level project information\n\nThe project uses:\n \n - language: Kotlin (1.8 JVM) \n - web framework: SpringBoot\n - build managers: Gradle\n - testing: Jupiter (Spek was also tried, and found wanting)\n - database: H2 (embedded - dev \u0026 test), AWS Aurora MySql (integration/staging/prod)\n - CI/CD: [Bookit-Infrastructure](https://github.com/buildit/bookit-infrastructure) - based on AWS Bare Metal Rig\n\nYou will need to have a 1.8 JVM installed to run.  Gradle will take care of the \ndependencies.\n\n## Architectural Decisions\n\nWe are documenting our decisions [here](../master/docs/architecture/decisions)\n\n## Quick Start\n\n### Docker\n\nIf you need to simply run the project locally, you can with 1 line via Docker.\n\n1. [Install Docker](https://www.docker.com/) and run it if you haven't already\n1. Clone this repo\n1. Run `docker-compose up` in the root\n1. Visit [http://localhost:8080/](http://localhost:8080/) in your web browser\n1. When you're finished run `docker-compose down` to cleanup\n\n### Development\n\nTo setup a proper local development environment follow these steps.\n\n1. [Install Java](http://www.oracle.com/technetwork/java/javase/downloads/index.html) version 8 if you haven't already\n    * If you need to change to version 8, install it. Then [swap your version](https://stackoverflow.com/questions/46513639/how-to-downgrade-java-from-9-to-8-on-a-macos-eclipse-is-not-running-with-java-9) via command line\n1. Run `./gradlew bootRun` and wait until the app reads *85% EXECUTING*\n1. Visit [http://localhost:8080/](http://localhost:8080/) in your web browser\n\n## Commands\n\nWe have bundled a gradle wrapper so you can run the below commands.  Alternatively, you can use gradle if you have it installed.\n    \n| Command                                           |     Description                                  | Notes                    \n| :---                                              | :---                                             | :---                            \n| `./gradlew`                                       | Builds the project                               |                          \n| `./gradlew tasks`                                 | Lists available tasks in the project             |                          \n| `./gradlew check`                                 | Runs linting, unit tests, static analysis, etc   | Good for pre-push checking                         \n| `./gradlew test`                                  | Runs unit/integration tests                      |                          \n| `./gradlew test-e2e`                              | Runs end-to-end tests                            | Requires running server  \n| `./gradlew bootRun`                               | Runs server                                      | Magically creates/updates the database and loads basic test data from `import.sql` using an in-memory H2 database.\n| `BOOKIT_DATABASE_URL=jdbc:mariadb://localhost/bookit BOOKIT_DATABASE_USER=root BOOKIT_DATABASE_DIALECT=org.hibernate.dialect.MySQL55Dialect BOOKIT_DATABASE_DIALECT=org.hibernate.dialect.MySQL55Dialect ./gradlew bootRun`| Runs server                                      | Magically creates the database and loads basic test data from `import.sql` using an (already running) MySql/MariaDB instance.                         \n| `SPRING_PROFILES_ACTIVE=dev ./gradlew bootRun`    | Runs server                                      | Magically creates the database and loads more voluminous `import-dev.sql` file into the H2 database.                         \n\n## Configuration Properties\n\nFollowing the [12 Factor App methodology](https://12factor.net) configuration is primarily driven via Environment Variables.  Spring Boot makes this quite easy via [Externalized Configuration](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html).\n\nIn addition to the [common Spring Boot properties](https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html), Bookit API honors the following:\n\n| Parameter                | Description   | Example \n| :---                     | :---          | :---          \n| BOOKIT_REQUIRE_SSL       | Force ssl/https, redirect if insecure          | true/false (defaults to false)\n| BOOKIT_DATABASE_URL      | The JDBC Connection URL                        | jdbc:mariadb:aurora://aurora.bookit.internal/bookit\n| BOOKIT_DATABASE_DRIVER   | The JDBC Driver Class (can be inferred via BOOKIT_DATABASE_URL) | org.mariadb.jdbc.Driver\n| BOOKIT_DATABASE_USER     | The username to use when logging into database | admin\n| BOOKIT_DATABASE_PASSWORD | The password to use when logging into the database | _password_\n| BOOKIT_DATABASE_DIALECT  | The hibernate dialect to use                   | org.hibernate.dialect.MySQL55Dialect\n| BOOKIT_DATABASE_DDL_AUTO | ddl-auto setting Spring JPA will use when initializing DataSource    | create/update/validate (defaults to create)\n| BOOKIT_ALLOW_TEST_TOKENS | Allow and verify test JWTs.  Default: allow only for localhost \u0026 integration    | true/false\n\nThe example values specified above are the values used in integration, staging, and production.  BOOKIT_DATABASE_PASSWORD is acquired via the appropriate AWS SSM Parameter Store value.\n\n\u003e _Note that when running via `./gradlew bootRun`, the database is magically configured to use an in-memory (H2) database.  See Quick Start, above._\n\n## Maintenance\n\nCommon maintenance tasks:\n\n* Add/Update locations and/or bookables - This is currently accomplished by updating the database tables.  The easiest way is to add/update to the [data.sql](./src/main/resources/data.sql)\n    * if updating make sure you also update the fields in the `ON DUPLICATE KEY UPDATE XXX` area\n    * these SQL statements are MySQL specific but work with H2 when in MySQL compatibility mode\n\n## Build information\n\n* [Build Pipeline](https://console.aws.amazon.com/codepipeline/home?region=us-east-1#/view/buildit-bookit-build-bookit-api-master-pipeline)\n* [Build Reports](http://rig.buildit.bookit.us-east-1.build.s3-website-us-east-1.amazonaws.com/buildit-bookit-build-bookit-api-master/reports/)\n\n## Deployment information\n\n### Deployments\n\n* [Integration](https://integration-bookit-api.buildit.tools)\n* [Staging](https://staging-bookit-api.buildit.tools)\n* [Production](https://bookit-api.buildit.tools)\n\n### Swagger Docs\n\n* [Integration](https://integration-bookit-api.buildit.tools/swagger-ui.html)\n* [Staging](https://staging-bookit-api.buildit.tools/swagger-ui.html)\n* [Production](https://bookit-api.buildit.tools/swagger-ui.html)\n\n### Logging\n\n* [Integration](https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logStream:group=buildit-bookit-integration-app-bookit-api-master)\n* [Staging](https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logStream:group=buildit-bookit-staging-app-bookit-api-master)\n* [Production](https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logStream:group=buildit-bookit-production-app-bookit-api-master)\n\n## Contributing\n\nSee [Contributing](./CONTRIBUTING.md)\n\n## TODOs \u0026 Skeletons\n\nThings that are on lists that should be done eventually:\n* Register the Azure App in Wipro\n    * It's currently registered in builditcontoso which is a 1 year O365 domain (used previously by bookit-web).  It might expire and who knows what happens then\n    * Wipro AD in their wisdom has blocked the ability to create apps - was chasing this down but hit many roadblocks\n* More validations around id_token\n    * We're currently only really validating the nbf and exp (via nimbus jose-jwt library)\n    * We should be all of this https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation\n* Tune JPA queries\n    * We are pretty inefficient when it comes to JPA - when expanding bookings while getting bookables?\n    * Also does queries when serializing (and following ManyToOne relationships) - is this ok or should it be eagerly fetched?\n    * No paging or limiting results - get all will be costly\n    * Still do interval overlaps in app code instead of WHERE clauses\n* Use real database migration tools\n    * Flyway or Liquibase\n    * What we have will only last for so long\n* https://github.com/buildit/bookit-api/pull/29#discussion_r158331469\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildit%2Fbookit-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildit%2Fbookit-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildit%2Fbookit-api/lists"}