Prompt
How do I build a web app for internal teams with drag and drop?
Latest observation
To build a web app for internal teams with drag and drop, think in terms of three parts:
- The UI: pages, forms, lists, boards
- The drag-and-drop behavior: moving cards/items between columns or containers
- The backend: saving changes, permissions, audit logs, and team data
1) Pick the right app structure
For internal tools, the most common patterns are:
- Kanban board: tasks/cards dragged across columns
- List + detail editor: drag to reorder rows or assign items
- Workflow builder: drag steps/nodes onto a canvas
- Form builder: drag fields into a form layout
If you’re building for internal teams, a Kanban-style board is often the easiest to start with.
2) Choose a frontend stack
A practical, common setup:
- React + TypeScript
- Next.js for app structure and auth/routing
- Tailwind CSS or MUI/Chakra for UI
- dnd-kit or react-beautiful-dnd for drag-and-drop
Recommended:
- dnd-kit if you want a modern, flexible solution
- react-beautiful-dnd if you want simpler Kanban-style behavior, though it’s less actively maintained
3) Build the core data model
Example for a task board:
type Task = {
id: string;
title: string;
status: "todo" | "in_progress" | "done";
order: number;
};
type Column = {
id: string;
title: string;
taskIds: string[];
};
Or normalize data more cleanly:
{
tasks: {
"task-1": { id: "task-1", title: "Fix bug", status: "todo", order: 1 }
},
columns: {
"todo": { id: "todo", title: "To Do", taskIds: ["task-1"] }
}
}
This makes reordering and moving items easier.
4) Implement drag and drop
At a high level, you need to handle:
- drag start
- drag over / hover
- drop
- update state
- persist to backend
If using dnd-kit, the flow is:
- wrap your board in
DndContext - define draggable items with
useDraggable - define drop zones with
useDroppable - on drag end, update state and save
For a Kanban board, the main logic is:
- if dropped in same column: reorder
- if dropped in different column: move card and update status
5) Save changes to the backend
Don’t rely only on frontend state. Persist the result in a database.
Typical backend needs:
- update item order
- update item status/column
- permission checks
- activity logging
Example API call after drop:
await fetch(`/api/tasks/${taskId}`, {
method: "PATCH",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
status: newStatus,
order: newOrder,
}),
});
For the database, store:
idtitlestatusorderteam_idupdated_at
6) Add authentication and team permissions
Internal apps usually need:
- SSO / Google login / Microsoft login
- role-based access
- team-specific data access
Common roles:
- Admin: manage users, settings
- Manager: edit workflows, assign work
- Member: update assigned items
- Viewer: read-only
7) Make it usable for teams
Internal apps succeed when they’re simple and fast. Add:
- search and filters
- activity history
- comments/notes
- notifications
- audit trail
- keyboard shortcuts
- optimistic updates
For drag and drop, also consider:
- auto-scroll in long lists
- touch support
- mobile responsiveness
- clear drop indicators
8) Backend options
If you want to move fast, good choices are:
- Supabase: auth + database + storage
- Firebase: fast real-time apps
- Postgres + Prisma + Next.js API routes
- Hasura if you want GraphQL quickly
For internal tools, Supabase + Next.js is a very common fast path.
9) Example architecture
A simple production-friendly setup:
- Frontend: Next.js + React + Tailwind + dnd-kit
- Auth: Clerk, Auth0, or Supabase Auth
- DB: Postgres
- ORM: Prisma
- Hosting: Vercel
- Observability: Sentry + basic analytics
10) Recommended build order
Start small:
- Create login
- Build one board page
- Render columns and cards
- Add drag-and-drop reordering
- Persist changes to DB
- Add roles/permissions
- Add comments, filters, and notifications
- Improve UX and auditability
11) If you want the fastest possible route
If the app is mostly for internal teams, you can also use:
- Retool
- Appsmith
- ToolJet
- Budibase
These let you build internal tools quickly with some drag-and-drop UI building. If you need a custom product experience, build it yourself with React.
12) Best practical recommendation
If you’re starting from scratch, I’d suggest:
- Next.js
- TypeScript
- Tailwind
- dnd-kit
- Supabase
- Prisma if you want a more structured backend layer
That gives you a scalable internal app with drag-and-drop support and a good developer experience.
If you want, I can also give you:
- a starter project structure
- a drag-and-drop Kanban example in React
- a database schema for internal teams
- a full stack architecture for internal tools