Skip to main content
This comprehensive guide covers all installation options for the Hub platform, from local development to production deployment.

System Requirements

Minimum Requirements

Development Environment

  • OS: Linux, macOS, or Windows (with WSL2)
  • RAM: 8GB minimum, 16GB recommended
  • Storage: 10GB free space
  • Docker: Version 20.10+
  • Docker Compose: v2.0+

Production Environment

  • RAM: 16GB minimum
  • CPU: 4 cores minimum
  • Storage: 50GB+ SSD recommended
  • OS: Ubuntu 22.04 LTS or similar
  • Network: Static IP recommended

Tech Stack Overview

Hub is built with modern technologies for scalability and performance:
Framework: Spring Boot 3.5.10
Language: Java 21
Build Tool: Maven 3.9
Database: PostgreSQL 16 with PostGIS 3.4
Authentication: OAuth2 + JWT (Auth0)
Image Storage: Cloudinary
Email Service: Brevo
API Documentation: SpringDoc OpenAPI 3

Installation Methods

Auth0 Configuration

Detailed Auth0 setup for authentication:
1

Create Auth0 Application

  1. Go to Auth0 Dashboard
  2. Navigate to Applications > Applications
  3. Click Create Application
  4. Choose Regular Web Application
  5. Name it “Hub Platform”
2

Configure Application Settings

In your application settings:Application URIs:
  • Allowed Callback URLs:
    http://localhost:3000/api/auth/callback,
    https://yourdomain.com/api/auth/callback
    
  • Allowed Logout URLs:
    http://localhost:3000,
    https://yourdomain.com
    
  • Allowed Web Origins:
    http://localhost:3000,
    https://yourdomain.com
    
Save your settings.
3

Create Auth0 API

  1. Navigate to Applications > APIs
  2. Click Create API
  3. Set:
    • Name: Hub API
    • Identifier: https://api.yourdomain.com (this is your AUTH0_AUDIENCE)
    • Signing Algorithm: RS256
  4. Enable RBAC and Add Permissions in the Access Token
4

Configure API Permissions

Add the following permissions (scopes):
  • read:venues - Read venue information
  • write:venues - Create and update venues
  • read:bookings - Read bookings
  • write:bookings - Create and manage bookings
  • read:profile - Read user profile
  • write:profile - Update user profile
5

Copy Credentials

From your Auth0 application, copy:
  • Domain (e.g., your-tenant.auth0.com)
  • Client ID
  • Client Secret
Use these in your .env and .env.local files.

Database Schema

The application uses Flyway migrations to manage the database schema. On startup, the following tables are created:
Core Tables:
  • city - Spanish cities with geospatial data
  • users - User accounts and profiles
  • venue - Padel venues with location data
  • resource - Courts/resources at venues
  • booking - Court bookings
  • payment - Payment records
  • match_request - Match-making requests
PostGIS Extensions:
  • postgis - Spatial database extension
  • pgcrypto - Cryptographic functions
  • btree_gist - Generalized index support
The database includes pre-seeded data for major Spanish cities including Madrid, Barcelona, Valencia, Sevilla, and others.

Verification

After installation, verify everything is working:
1

Check Backend Health

curl http://localhost:8080/actuator/health
Expected response:
{"status":"UP"}
2

Access API Documentation

Open http://localhost:8080/swagger-ui.html in your browser to view the OpenAPI documentation.
3

Test Database Connection

docker compose exec postgres psql -U hub_user -d hub -c "SELECT COUNT(*) FROM city;"
Should return a count of cities (seeded data).
4

Verify Frontend

Open http://localhost:3000 and test:
  • Page loads successfully
  • Login button is visible
  • Auth0 login flow works

Troubleshooting

If you see “port already in use” errors:
# Check what's using the port
lsof -i :8080
lsof -i :3000
lsof -i :5432

# Kill the process or change ports in .env
BACKEND_PORT=8081
If Flyway migrations fail:
# Check migration history
docker compose exec postgres psql -U hub_user -d hub -c "SELECT * FROM flyway_schema_history;"

# Reset database (CAUTION: deletes all data)
docker compose down -v
docker compose up -d
If you see JWT validation errors:
  • Verify AUTH0_ISSUER ends with a trailing slash
  • Ensure AUTH0_AUDIENCE matches between backend and frontend
  • Check that your Auth0 API is configured for RS256
  • Verify the token has not expired
If image uploads fail:
  • Verify your Cloudinary credentials in .env
  • Check that your Cloudinary account is active
  • Ensure the cloud name, API key, and secret are correct
  • Test credentials at the Cloudinary Console
If Next.js build fails:
# Clear Next.js cache
rm -rf .next

# Remove node_modules and reinstall
rm -rf node_modules package-lock.json
npm install

# Rebuild
npm run build

Next Steps

Development Guide

Learn about the development workflow and coding standards

API Reference

Explore the REST API endpoints and authentication

Architecture

Understand the system architecture and design patterns

Configuration

Configure environment variables and integrations