Backendless Fullstack Development: React useForm + RushDB
TL;DR: This example shows how to build a full-stack application using React Hook Form + RushDB with zero schema setup, backend efforts or data normalization. View the complete source code.
In modern web development, we often spend more time dealing with data modeling, normalization, and database migrations than on the actual business logic that drives our applications. What if we could skip all of that and focus solely on the shape of our data and the user experience?
This article explores how combining React Hook Form with RushDB creates a powerful, backendless approach to fullstack development that eliminates the traditional complexity of working with form data.
The Traditional Form Submission Flow
Let's consider what typically happens when building a form in a web application:
- Define database schema/migrations
- Create models with proper validation
- Build controllers to handle data transformation
- Set up services to process business logic
- Design a REST API to connect your frontend
- Implement API calls from your frontend form
- Normalize nested data before storing it
This approach requires maintaining multiple data representations across your stack, writing repetitive boilerplate code, and continuously synchronizing changes between layers. Even with ORMs and other tools, the complexity remains significant.
The Backendless Approach with RushDB
RushDB offers a radically different approach by providing a graph database that:
- Accepts any JSON structure directly
- Automatically normalizes nested objects into a graph
- Requires zero schema setup or migrations
- Preserves the exact shape of your data
This means you can take your form data exactly as it is structured in your frontend and store it directly without any transformation or normalization.
Let's See It In Action
Let's examine a comprehensive form implementation using React Hook Form with Zod validation and RushDB for storage.
1. Setting Up RushDB
First, we initialize the RushDB client:
That's it! No schema definitions, no models, no complex setup.
You can get a free API token by signing up at app.rushdb.com. For more information on getting started, see the official documentation.
2. Defining Our Form Schema
We use Zod to define the validation schema for our form:
Notice how we naturally represent the form data with nested objects and arrays - this matches exactly how we think about the data in our application.
3. Submitting Form Data to RushDB
The most remarkable part is how we handle form submission:
That's it! Just a single API call to store the entire form data, including nested objects and arrays, without any normalization or transformation.
Network request contains the raw form data that gets sent to RushDB. Notice how the nested structure stays intact with no transformation required.
What's Happening Behind the Scenes?
When you submit the form data to RushDB:
- The entire JSON structure is accepted as-is
- Nested objects (like
address
andpreferences
) are automatically normalized into separate nodes in the graph - Array items (like
skills
) are stored as a normal Property ofFORM_DATA
Record - The original structure is preserved for querying later
RushDB handles all the complexity of storing a deeply nested object structure while maintaining the relationships between entities.
The 3D graph visualization shows how RushDB has automatically normalized your form data into a graph structure. Each node represents an entity from your form, and the edges show the relationships between them.
Despite being stored as a graph, RushDB also provides this familiar table view of your data. This makes it easy to query and analyze your data in a familiar way.
Benefits of This Approach
1. Zero Backend Complexity
No need to:
- Define schemas or migrations
- Create models or DTOs
- Build controllers and services
- Normalize data manually
2. Preserve Natural Data Structures
- Store data in the same shape as your application thinks about it
- No need to flatten nested objects
- Arrays are handled seamlessly
3. Full-Stack Type Safety
- Your Zod schema generates TypeScript types that can be used throughout your application
- The same types work for both form validation and data storage
4. Rapid Development
- Focus on business logic and UX, not database structure
- Iterate quickly without worrying about schema changes
- Add new fields without migrations
Querying the Data
One of the most powerful aspects of RushDB is its ability to query this complex data structure easily. For example, finding all form submissions from senior engineers:
Or finding all users who have subscribed to the newsletter and have JavaScript skills:
Conclusion
The combination of React Hook Form for frontend validation and RushDB for data storage creates a powerful backendless approach to full-stack development. It allows you to focus on what really matters - the shape of your data and the user experience - without getting bogged down in database schemas, normalization, and complex backend architectures.
This approach is particularly well-suited for:
- Rapid prototyping and MVP development
- Applications with complex, nested data structures
- Teams looking to reduce backend complexity
- Projects where the data model is evolving rapidly
By removing the traditional backend complexity, you can build sophisticated applications faster and with less code. RushDB's ability to handle nested JSON structures directly means you can model your data in the most natural way for your application without worrying about how it will be stored.
For more information about RushDB's capabilities, check out the official documentation and explore the examples repository.
Source Code: The complete example from this article is available at github.com/rush-db/examples/tree/main/vite-react-useForm
Ready to Build Faster? Zero Config Database for Modern Apps & AI
Join developers shipping at maximum velocity. Push JSON, query instantly with our auto-normalizing graph database. Zero setup, zero schemas — just pure, frictionless development. 2 projects free forever, no credit card required.
Start Building FreeFAQ
How is RushDB different from Firebase or Supabase?
Unlike Firebase's document hierarchies or Supabase's rigid schemas, RushDB offers a zero-config graph database that automatically normalizes your data. You can push JSON directly without planning your data structure in advance, and query across relationships naturally without complex joins.
Can I use RushDB for AI applications and LLM outputs?
Absolutely! RushDB is designed for the AI era with seamless JSON storage for LLM outputs, automatic relationship detection, and graph-based querying that's perfect for RAG applications, embeddings storage, and knowledge graphs. Our auto-normalization feature is particularly valuable for handling the varied structures of AI-generated content.
How much data preparation do I need before using RushDB?
Zero. RushDB's core value is eliminating data preparation overhead. Just push your JSON or CSV as-is, and RushDB automatically normalizes, connects, and indexes your data with proper relationships and types. This means you can start building features immediately instead of planning database schemas.
What's the performance like for real-world applications?
RushDB processes data at ~0.25ms per record with ACID transaction support, handling payloads up to 32MB. It can manage 10,000+ e-commerce products, 100,000+ financial transactions, or 1,000,000+ API logs in a single operation, making it production-ready for demanding applications.
Can I self-host RushDB or do I have to use the cloud version?
Both options are available. You can self-host using our Docker container with your Neo4j instance, or use RushDB Cloud which offers 2 free projects forever with no maintenance required. For teams that want to focus on building rather than infrastructure, our cloud option eliminates all database management concerns.