How FuturnFlow fits together: the deployment architecture, the entity-relationship model behind every screen, and the workflows that move work from intake to done.
1 · Deployment architecture
FuturnFlow is four Docker containers on one office server. Teammates' browsers only ever talk to the frontend; integrations talk to the server's REST API.
All four containers restart automatically. Data persists across restarts in the futurnflow_pgdata volume. Both the frontend and the server talk to PostgreSQL directly; the frontend calls the server only to send email.
2 · The chain every piece of work follows
Every screen in the app maps to one link in this chain:
Forms are optional (projects can be created directly) but are the recommended intake path — an approved form converts to a project with its deliverables as starter tasks. Sprints, boards, calendars and timelines are all just views over tasks.
3 · Entity-relationship diagram (core)
The heart of the data model. Every entity belongs to the single Organization; the diagram shows the relationships that shape the app (crow's-foot style: 1—∗ reads "one … has many …").
Simplified: Organization (the single workspace), Department/Team/TeamMember, Notification, Doc, and the four configuration entities (Workflow, CustomField, Template, AutomationRule) are omitted here — see the full data dictionary below.
4 · Full data dictionary
Every table in the PostgreSQL schema (source of truth: database/schema.prisma). Blue lines are relationships.
Organization & people
Organization workspace
name · logoUrl · settings (JSON)
→ has all departments, teams, users, clients, projects, tasks, campaigns, forms, assets, rules, docs, workflows, fields, templates
Department people
name · description
→ Organization · has Users, Teams, Tasks
Team people
name · leadUserId
→ Organization · Department? · lead → User · members via TeamMember
TeamMember people
join table · unique (team, user)
→ Team · User
User people
name · email (unique) · passwordHash
role: Owner | Admin | Project Manager | Team Lead | Team Member | Client Viewer | Guest
View shared work, decide approvals addressed to them
✓
✓
✓
✓
✓
✓
✓
Client Viewers and Guests also get a reduced sidebar: Dashboard, Projects, Campaigns, Approvals, Calendar only.
7 · What happens when you click something
The Next.js frontend owns all business logic via server actions; every mutation is permission-checked, logged to ActivityLog, and triggers in-app notifications. The Express server is used for email delivery, the REST API, and startup bootstrap.