IntakeFlow is a full-stack client intake application for creating multi-page workflows, collecting client information, and reviewing submissions.
I started this project to get more experience building a complete application from the database to the frontend. I wanted to build something more realistic than a basic CRUD app, so IntakeFlow includes authentication, different user roles, configurable workflows, submission validation, status tracking, and deployment.
Frontend:
https://intakeflow-workflows.vercel.app
API:
https://intakeflow-api-w3xt.onrender.com
There are two main types of users: clients and administrators.
- Create, rename, and delete workflows
- Add pages to a workflow
- Rename, reorder, and delete pages
- Add and edit fields inside each page
- Make fields required or optional
- Add placeholders and help text
- Review client submissions
- Change submission status
- View submission activity history
- Register and log in
- View available workflows
- Complete a workflow one page at a time
- Move between pages before submitting
- See their progress through the form
- Submit their answers
- View their previous submissions
- Check the status of a submission
Clients can only access their own submissions.
| Area | Technology |
|---|---|
| Frontend | Next.js, React, TypeScript |
| Styling | Tailwind CSS |
| Backend | Node.js, Express, TypeScript |
| Database | PostgreSQL |
| ORM | Prisma |
| Validation | Zod |
| Authentication | JWT |
| Password hashing | Argon2 |
| Database hosting | Neon |
| Frontend hosting | Vercel |
| API hosting | Render |
A workflow contains pages, and each page contains fields.
For example:
Client Intake
│
├── Personal Information
│ ├── First Name
│ ├── Last Name
│ └── Date of Birth
│
├── Contact Information
│ ├── Email
│ └── Phone
│
└── Additional Information
└── Notes
The current data model supports fields such as:
TEXT
TEXTAREA
NUMBER
DATE
EMAIL
PHONE
RADIO
SELECT
CHECKBOX
The client form is still being improved so every field type has its own rendering and validation behavior.
When a client opens a workflow, the frontend loads the pages and fields from the API.
The client completes the form page by page:
Choose Workflow
↓
Page 1
↓
Page 2
↓
Final Page
↓
Submit
The frontend sends the answers to the backend using field IDs.
The backend then checks that:
- the workflow exists
- the submitted fields belong to that workflow
- required fields are present
- required values are not blank
- invalid field IDs are rejected
- the user creating the submission is the authenticated user
The backend does not trust a user ID sent from the browser. The client identity comes from the verified JWT.
Creating a submission requires several related database operations.
The backend uses a Prisma transaction to create:
Submission
+
Submission Answers
+
Submission Activity
This prevents a submission from being partially created if one of those operations fails.
Status changes are also recorded in the activity history.
Users register with their name, email, and password.
Passwords are hashed with Argon2 before they are stored.
After login, the API returns a JWT containing the authenticated user's ID and role.
Protected requests send the token using:
Authorization: Bearer <token>
The backend uses requireAuth to verify the token and requireAdmin to protect administrator routes.
The frontend also redirects users based on their role, but the backend middleware is the real security check.
For this version of the project, the JWT is stored in localStorage.
| Method | Route | Purpose |
|---|---|---|
| POST | /auth/register |
Register a client |
| POST | /auth/login |
Log in and receive a JWT |
| GET | /auth/test |
Test authentication |
| Method | Route | Purpose |
|---|---|---|
| GET | /workflows |
List workflows |
| GET | /workflows/:id |
Get one workflow with its pages and fields |
| POST | /workflows |
Create a workflow |
| PATCH | /workflows/:id |
Update a workflow |
| DELETE | /workflows/:id |
Delete a workflow |
| Method | Route | Purpose |
|---|---|---|
| POST | /workflows/:workflowId/pages |
Add a page |
| PATCH | /workflows/:workflowId/pages/:pageId |
Update a page |
| PATCH | /workflows/:workflowId/pages/:pageId/move |
Move a page |
| DELETE | /workflows/:workflowId/pages/:pageId |
Delete a page |
| Method | Route | Purpose |
|---|---|---|
| POST | /workflows/:workflowId/pages/:pageId/fields |
Add a field |
| PATCH | /workflows/:workflowId/pages/:pageId/fields/:fieldId |
Update a field |
| DELETE | /workflows/:workflowId/pages/:pageId/fields/:fieldId |
Delete a field |
| Method | Route | Purpose |
|---|---|---|
| POST | /submissions |
Create a submission |
| GET | /submissions |
Get the logged-in client's submissions |
| GET | /submissions/:id |
Get one client submission |
| GET | /admin/submissions |
Get all submissions as an admin |
| GET | /admin/submissions/:id |
Get submission details as an admin |
| PATCH | /submissions/:id/status |
Update submission status |
| Route | Purpose |
|---|---|
/ |
Home page |
/register |
Client registration |
/login |
Login |
/portal/start |
Choose a workflow |
/submit/[workflowId] |
Complete a workflow |
/my_submissions/[submissionId] |
View a client submission |
/admin/workflows |
Manage workflows |
/admin/workflows/[id] |
Manage pages and fields |
/admin/submissions |
Review submissions |
/admin/submissions/[submissionId] |
Review one submission |
Fullstack-project/
│
├── api/
│ ├── prisma/
│ │ ├── schema.prisma
│ │ └── migrations/
│ ├── src/
│ │ └── index.ts
│ └── package.json
│
├── web/
│ ├── app/
│ │ ├── admin/
│ │ ├── login/
│ │ ├── register/
│ │ ├── portal/
│ │ ├── submit/
│ │ └── my_submissions/
│ ├── components/
│ └── package.json
│
└── README.md
cd api
npm install
npx prisma migrate dev
npx prisma generate
npm run devCreate an api/.env file with values similar to:
DATABASE_URL="postgresql://<username>:<password>@localhost:5432/intakeflow"
JWT_SECRET="<your-secret>"
PORT=4000The API runs at:
http://localhost:4000
To inspect the database with Prisma Studio:
npx prisma studiocd web
npm install
npm run devCreate web/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:4000The frontend runs at:
http://localhost:3000
I have manually tested the API using PowerShell requests.
Some of the cases tested include:
- invalid registration data
- duplicate email registration
- successful login
- missing or invalid JWTs
- clients trying to access admin routes
- clients trying to access another client's submission
- missing required fields
- blank required values
- invalid field IDs
- fields belonging to another workflow
- successful submission creation
- submission status updates
I plan to add automated tests as the project continues.
Building IntakeFlow has helped me get more comfortable with:
- designing REST APIs
- authentication and authorization
- PostgreSQL database design
- Prisma relationships and migrations
- validating API input with Zod
- password hashing with Argon2
- JWT authentication
- role-based access
- database transactions
- multi-page form design
- connecting a Next.js frontend to an Express API
- deploying the frontend, backend, and database separately
- debugging differences between local and production environments
One of the biggest changes in the project was moving from a simple step-based workflow structure to a page-and-field model. That made the form builder more flexible and also required changes to the submission and answer models.
Some features I want to add next are:
- specialized rendering for all field types
- field reordering
- better validation messages
- draft submissions
- autosave
- workflow preview
- conditional fields and pages
- submission search and filtering
- automated API and end-to-end tests
- rate limiting
- email verification
- password reset
- stronger production authentication using HttpOnly cookies
IntakeFlow is still a work in progress, and I continue to add features as I learn and improve the architecture.