You describe the data your product needs. AIWA helps turn those requirements into a working database-backed application.
What is a database?
A database is where your application stores structured information. Imagine you’re building a CRM. Your application might need to remember:- Leads
- Customers
- Team members
- Deals
- Follow-ups
- Notes
- Activities
AIWA uses Neon Postgres
AIWA uses Neon Postgres as the database infrastructure for your project. Postgres is a relational database, which means your application can store structured information and create relationships between different types of data. For example, a CRM might have:- Users
- Leads
- Properties
- Deals
- Follow-ups
Your project gets its own database
When an AIWA project requires persistent application data, AIWA can provision the Neon database infrastructure for that project. This keeps the application’s data associated with the project you’re building. You don’t need to begin by:- Creating a Neon project manually
- Creating database tables yourself
- Configuring a database server
- Wiring the database into your application
- Writing SQL before you can start building
Build a lead management system where agents can create leads, assign them to team members, update their status, add notes, and schedule follow-ups.AIWA can determine what data structures are needed to support that experience.
AIWA handles the database infrastructure required by supported projects, allowing you to focus primarily on your application’s data and behavior rather than initial database configuration.
From your prompt to your database
You don’t need to describe your database using technical terminology. Suppose you tell AIWA:Add lead management to the application. Each lead should have a name, email, phone number, source, status, assigned agent, budget, property interest, and notes.From that product requirement, AIWA can determine that the application needs a Lead data structure containing information similar to:
Data persists
Database-backed information persists beyond the current page view. For example, imagine an agent creates:- Customer profiles
- Bookings
- Orders
- Tasks
- Messages
- Properties
- Projects
- Settings
- Other dynamic application data
Tables organize your data
Relational databases organize information into structures commonly called tables. For example, an agency application might have:- Customers
- Projects
- Tasks
- Invoices
Your data can have relationships
Real applications rarely contain completely isolated data. A project might belong to a customer. A task might belong to a project. An order might belong to a customer. A deal might connect a lead with a property. These are relationships. For example:Describe relationships naturally
You don’t have to say:Create a foreign key between these database tables.You can describe the product behavior instead. For example:
Every project should belong to a customer, and a customer should be able to have multiple projects.Or:
Each deal should be connected to a lead, a property, and the agent responsible for the deal.Or:
A customer should be able to place multiple orders, and every order should show which customer placed it.These requirements tell AIWA how the information in your product relates. AIWA can translate that intent into the underlying implementation.
Your database evolves with your application
Your first database structure doesn’t have to represent every feature you’ll ever build. Suppose your first version has:- Customers
- Projects
Add tasks to projects.Your application now needs another type of data:
Allow users to comment on tasks.Now the application evolves again:
Adding fields later
You can also extend existing data. Suppose your Lead records currently contain:- Name
- Phone
- Status
Add source, budget, assigned agent, and property interest to leads. Update the create and edit forms and show the new information on the lead detail page.AIWA can update the application around the expanded data requirements. For significant database changes, consider using Plan Mode first so the impact can be reviewed before implementation.
Changing existing data structures
Some database changes are more significant than simply adding a field. For example:Allow projects to belong to multiple customers instead of one customer.Or:
Convert the existing single-user data model into workspace-based data where every record belongs to an organization.These changes can affect:
- Existing records
- Relationships
- APIs
- Permissions
- Application logic
- User interfaces
Your interface talks to your database
The database usually works behind the scenes. Users interact with your application’s interface. For example, when someone completes:Database actions
Most database-backed applications rely on four fundamental types of operations. Create Add new information.Create a lead.Read Retrieve existing information.
Show all active leads.Update Change existing information.
Change this lead’s status to Qualified.Delete Remove information.
Delete this lead.Developers often refer to these operations collectively as CRUD. You don’t need to use that terminology when prompting AIWA. Simply describe what users should be able to do.
Filtering and searching your data
Once your application contains data, users often need ways to find the right records. For example:Add search to the Leads page so users can search by name, email, or phone number.Or:
Allow agents to filter leads by status, source, and assigned agent.Or:
Show only bookings scheduled for today.AIWA can build interfaces and application logic around the information stored in your database.
Dashboards can use real data
Database-backed applications can calculate metrics from stored information. For example, a sales dashboard might show:Show the total value of all deals that haven’t been won or lost.Or:
Show how many new leads were created this month compared with last month.AIWA can build the required data logic around the request.
Keep private data private
Database credentials and sensitive connection information should not be exposed in client-side interfaces or hard-coded into public application code. AIWA’s application architecture should keep sensitive database operations in the appropriate server-side environment. If a workflow requires credentials or secrets, use the appropriate secure configuration or connector flow provided by AIWA.Database vs authentication
Your database and authentication solve different problems. Database Stores application information. Examples:- Customers
- Projects
- Orders
- Bookings
- Deals
- Leon is signed in
- Sarah is signed in
- Marcus is signed in
Show each user only the projects that belong to their account.Authentication tells the application who the user is. The database contains the projects and their ownership information. Application logic determines which records that user should be allowed to access. We’ll cover authentication on the next page.
Database vs application logic
The database stores information, but it doesn’t define the entire product experience. Suppose you have:When a deal moves to Closed Won, record the completion date and add its value to the won revenue metric.The database stores the information. The application logic determines what should happen. AIWA can work across both.
You can be technical if you want
AIWA allows you to describe requirements at the level you’re comfortable with. A non-technical user might say:Every customer should be able to have multiple projects.A developer might provide more explicit requirements about:
- Data relationships
- Field types
- Validation
- Indexes
- Constraints
- Queries
- API behavior
- Migration requirements
Example prompts
Here are some examples of natural-language requests that require database functionality. Booking applicationCustomers should be able to book appointments. Store the customer, service, staff member, appointment date, time, and booking status.CRM
Add leads with name, email, phone, company, source, status, assigned agent, estimated value, and notes.Project management
Each workspace should have projects. Projects should contain tasks, and tasks can be assigned to workspace members.E-commerce
Store products, customers, orders, and order items. Customers should be able to view their previous orders after signing in.Property platform
Allow agents to create property listings with title, location, price, property type, bedrooms, bathrooms, description, and listing status.You describe the product requirement. AIWA handles the database-backed implementation required to support it.
The principle
You shouldn’t have to start product development by designing database tables. Start with:What information does my product need?Then:
How should that information relate?Then:
What should users be able to do with it?AIWA can help translate those answers into a working Neon-backed application.
Next: Authentication
Your database gives your application persistent information. But many applications also need to know: Who is using the application? Next, we’ll look at Authentication: how AIWA can add Google and email/password sign-in, protect application areas, and build experiences around authenticated users.Authentication
Add Google and email/password sign-in and protect application areas.
