Skip to main content

Setup your development environment

Learn how to set up your development environment and make your first API request to Harbor Parking.
Before getting started, make sure you have:
  • Node.js 18+ installed on your machine
  • A Supabase account and project
  • Basic familiarity with REST APIs and HTTP requests
  • An API testing tool like Postman, Insomnia, or curl
  1. Set up Supabase project
    • Create a new project in your Supabase dashboard
    • Note your project URL and anon key from Settings > API
  2. Configure Harbor Parking
    • Clone the Harbor Parking repository
    • Set up environment variables with your Supabase credentials
    • Run the database migrations to create required tables
  3. Create a test user
    • Sign up through the Harbor Parking web interface
    • Get admin approval for full API access
    • Extract your JWT token for API requests

Make your first request

Expected Response

If your request is successful, you’ll receive a response like this:

Common Workflows

Now that you’ve made your first request, try these common workflows:

1. Register a Parking Spot

2. Set Spot Availability

3. Claim an Available Spot

4. Get Dashboard Data

Error Handling

The API uses standard HTTP status codes and returns detailed error messages:
Common status codes:
  • 200 - Success
  • 201 - Created successfully
  • 400 - Bad request (validation error)
  • 401 - Unauthorized (invalid or missing token)
  • 403 - Forbidden (insufficient permissions)
  • 404 - Not found
  • 409 - Conflict (duplicate resource)
  • 500 - Internal server error

Next Steps

Great! You’ve successfully made your first API requests. Here’s what to explore next:

Authentication Deep Dive

Learn about JWT tokens, refresh tokens, and security best practices

API Reference

Complete documentation for all endpoints

Need Help?