Setup your development environment
Learn how to set up your development environment and make your first API request to Harbor Parking.Prerequisites
Prerequisites
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
Get your API credentials
Get your API credentials
-
Set up Supabase project
- Create a new project in your Supabase dashboard
- Note your project URL and anon key from Settings > API
-
Configure Harbor Parking
- Clone the Harbor Parking repository
- Set up environment variables with your Supabase credentials
- Run the database migrations to create required tables
-
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:200- Success201- Created successfully400- Bad request (validation error)401- Unauthorized (invalid or missing token)403- Forbidden (insufficient permissions)404- Not found409- 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?
- GitHub Discussions - Community support
- API Reference - Complete endpoint documentation