Dynamic API for Multiple Tables with Zero Backend Changes

I got tired of writing the same code 7 times. Same controller. Same service. Same repository. Just different table names. So I built something to fix it. One API. Any table. No code changes. Here's how it works 👇 Most backends look like this: ❌ SupplierController → SupplierService → SupplierRepository ❌ PartController → PartService → PartRepository ❌ LocationController → LocationService → LocationRepository Mine looks like this: ✅ DynamicController → one API → any table The secret? Two config tables in PostgreSQL. table_config → stores entity class names field_config → stores field names and types Java Reflection reads these at runtime. Builds the entity dynamically. Fetches the data. Returns the response. No hardcoded table logic anywhere. Want to add a new table? Just insert a row in the config table. That's it. Zero backend changes. I also added: → Metadata caching so Reflection runs once not every request → View-based dropdown resolution to avoid N+1 queries → Pagination for 100k+ records 7 tables. 1 API. Clean architecture. Full code on GitHub 👇 https://lnkd.in/g7yZHm9m What would you have done differently? #Java #SpringBoot #BackendEngineering #OpenSource #SoftwareArchitecture #JavaDeveloper #Microservices

  • graphical user interface, website

Really impressive work 👏👏

See more comments

To view or add a comment, sign in

Explore content categories