This guide walks you through standing up the CoworkingBooking API on your local machine and making your first three API calls — creating a user, registering a coworking space, and booking that space — from scratch.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/devdavco/backend_1/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites before you begin:
- Java 21 (the project targets
java.version=21inpom.xml) - Apache Maven 3.9+ (or use the included
mvnwwrapper — no separate install needed) - PostgreSQL 14+ running and accessible (local instance or a hosted provider such as Supabase)
Clone the repository
Download the project source and move into the backend directory:The Maven wrapper (
mvnw / mvnw.cmd) is included, so no separate Maven installation is required.Set environment variables
The API reads all database credentials from environment variables at startup. Create a file named If you are using Supabase, find these values in your project’s Settings → Database page. The
.env (or export them in your shell) with the following values substituted for your environment:DB_PORT for Supabase is typically 5432 (direct connection) or 6543 (connection pooler).To export the variables in a Unix shell session directly:Run the application
Start the Spring Boot application using the Maven wrapper.Linux / macOS:Windows:Maven will download dependencies on the first run. Once startup is complete you should see output similar to:The API is now listening at
http://localhost:8080. Verify with the built-in ping endpoints — one per resource group — each returns the plain string "pong":Create a user
Register the first user by posting to Sample response (Note the returned
/usuarios/create:201 Created):id — you will reference it when creating a booking in Step 6.Register a coworking space
Add a meeting room to the system via Sample response (
/espacios/create:201 Created):minutos_limpieza is the buffer added after a session ends before the space becomes available again. The total end time of a booking (horaFinTotal) should equal horaFinUsuario plus this cleaning duration.Book the space
Create a reservation linking the user (Sample response (The
usuarioId: 1) to the space (espacioId: 1):201 Created):version field is managed by Hibernate for optimistic locking. The 15-minute gap between horaFinUsuario and horaFinTotal reflects the minutos_limpieza value set on the space.