A real-world migration log from a full-stack project (React + Spring Boot) — with all the mistakes I made and how I fixed them.
📚 Table of Contents
- Introduction
 - Why Supabase?
 - Project Architecture Overview
 - Setting Up Supabase
 - Connecting Spring Boot to Supabase
 - Pitfalls & Lessons: My Supabase Migration Mistakes
 - Final Thoughts: Free Hosting for Full-Stack Portfolios
 
🏁 1. Introduction
I built a full-stack demo project using React + Spring Boot + PostgreSQL. Initially, I hosted my backend and database on Render. However, its free PostgreSQL database expires after 30 days.
I needed a long-term free alternative — that’s when I found Supabase.
💡 2. Why Supabase?
- Free permanent tier
 - 100% compatible with PostgreSQL
 - Easy to manage via a modern UI
 - Quick setup for small projects
 
🧱 3. Project Architecture Overview
- Frontend: React + Material UI (hosted on Vercel)
 - Backend: Spring Boot (hosted on Render)
 - Database: Supabase PostgreSQL
 - 
Structure:
- 
entity(JPA models) - 
repository(Spring Data JPA) - 
controller(REST API) - 
config(security, DB) 
 - 
 
⚙️ 4. Setting Up Supabase
- Create a new project
 - Set a strong database password and region
 - Get DB credentials from Settings->Database
 
🔌 5. Connecting Spring Boot to Supabase
🌐 In your Render Environment Variables:
DB_URL=jdbc:postgresql://<host>:6543/postgres?sslmode=require
DB_USERNAME=postgres.<project-ref>
DB_PASSWORD=<your-password>
⚙️ Spring Boot application.properties
spring.datasource.url=${DB_URL}
spring.datasource.username=${DB_USERNAME}
spring.datasource.password=${DB_PASSWORD}
spring.datasource.driver-class-name=org.postgresql.Driver
✅ Use Pooler host
✅ Use port 6543
✅ Use SSL
✅ Don’t use just postgres — copy the full username shown in Supabase.
🧨 6. Pitfalls & Lessons: My Supabase Migration Mistakes
❌ Error 1: Network is unreachable
Used the default database host — Render couldn't connect
✅ Fix: Use Pooler host + port 6543
❌ Error 2: Tenant or user not found
Used wrong username (postgres)
✅ Fix: Use postgres.<project-ref> from Supabase dashboard
❌ Tried to manually create tables in Supabase
Hibernate threw schema conflict errors
✅ Fix: Let Spring Boot create tables automatically on startup
✅ Testing the App & Uploading Data
Once the backend started on Render, Spring Boot successfully connected to Supabase and auto-created the tables via Hibernate.
📦 7. Final Thoughts: Free Hosting for Full-Stack Portfolios
If you’re showcasing projects online, this stack works great — totally free and easy to set up:
Frontend: Vercel
Backend: Render
Database: Supabase
⚠️ Performance Tip:
If your frontend uses a DataGrid or similar component, make sure it supports true server-side pagination.
Otherwise, fetching all rows at once — even with visible pagination — can slow down your app significantly.
              
    
Top comments (0)