Appearance
SalesField Network Project Planning Application - Complete Features Documentation
Application Version: 1.0.0 Documentation Date: February 15, 2026 Purpose: Comprehensive documentation of all application features, capabilities, and interactions
Table of Contents
- Application Overview
- Project & Task Management
- Financial Management
- Calendar & Timeline
- Document & File Management
- Communication & Notifications
- User & Team Management
- Feature Relationships & Integration
- User Roles & Permissions
- Complete Feature Summary
Application Overview
What is This Application?
This is a multi-user collaborative project management platform with comprehensive financial tracking, calendar/timeline management, document storage, and automated communication features. All authenticated users share a single database, making it a collaborative workspace where changes made by one user are visible to all users.
Core Capabilities
- Project Management - Complete project lifecycle tracking from planning to completion
- Task Management - Detailed task tracking with assignments, priorities, and status management
- Financial Management - Invoice generation, expense tracking, client management, subscription monitoring
- Calendar & Timeline - Interactive calendar with drag-and-drop scheduling and milestone tracking
- Document Storage - File upload and management with project/task associations
- Automated Communications - Email integration for invoices and daily manifests
- Team Collaboration - Multi-user access with role-based permissions
Project & Task Management
Project Creation & Management
Creating a New Project
Users can create projects through /dashboard/projects/new with the following capabilities:
Basic Information:
- Project Name (required) - The title of the project
- Description (optional) - Detailed project description
- Project Goal (optional) - Specific objectives or outcomes
- Project Value (optional) - Monetary value in USD for ROI tracking
- Website URL (optional) - Associated website or landing page
Project Classification:
Status Options:
PLANNING(default) - Project in planning phaseIN_PROGRESS- Active development/executionON_HOLD- Temporarily pausedCOMPLETED- Successfully finishedCANCELLED- Discontinued
Priority Levels:
LOW- Can be deferredMEDIUM(default) - Standard priorityHIGH- Important, needs attentionURGENT- Immediate action required
Project Types:
POTENTIAL_CLIENT- Prospect or leadQUALIFIED_CLIENT- Vetted prospectCURRENT_CLIENT- Active client projectPAST_CLIENT- Former clientPERSONAL_PROJECT(default) - Internal/personal workPROFESSIONAL_PROJECT- Professional non-client work
Timeline:
- Start Date (optional) - Project kickoff date
- End Date (optional) - Target completion date (appears on Operations Calendar)
Viewing Projects
Project List View (/dashboard/projects)
Two viewing modes available:
- Table View (default) - Spreadsheet-style with sortable columns
- Card View - Visual grid layout with project cards
Table Features:
- Search - Real-time search by project name
- Sortable Columns:
- Project Name
- Status (with color-coded badges)
- Priority (with color-coded badges)
- Project Type
- Due Date (end date)
- Task Count (number of tasks in project)
- Project Value (USD currency formatting)
- Click Row - Navigate to project detail page
Status Badge Colors:
- PLANNING: Gray outline
- IN_PROGRESS: Blue background
- ON_HOLD: Secondary gray
- COMPLETED: Green background
- CANCELLED: Red/destructive
Priority Badge Colors:
- LOW: Green border
- MEDIUM: Yellow border
- HIGH: Orange border
- URGENT: Red destructive
Project Detail View
Location: /dashboard/projects/[id]
The project detail page serves as the central hub for all project information:
Main Header Section:
- Project title and description
- Project goal
- Project value (displayed with $ icon)
- Status, Priority, and Project Type badges
- Project owner information
- Website link (opens in new tab)
- Creation date, start date, end date
- Last updated timestamp
Action Buttons:
- Edit Project
- Delete Project
- Back to Projects List
Right Sidebar:
- Timeline Progress Chart (visual pie chart of milestone completion)
- Task Counter (total number of tasks)
- "New Task" button
Collapsible Content Sections:
Project Details
- Complete metadata display
- Owner name and email
- Contact count
- All date fields
Timeline Events
- List of all project milestones
- Event date, title, description
- Completion checkbox for each event
- Sort by date or completion status
- Add/edit/delete events
- Mobile card view and desktop table view
Tasks
- All project tasks with status and priority
- Mobile card layout and desktop table
- Sort by status, priority, due date
- Click to edit task
Contacts
- Associated project contacts
- Avatar (generated from initials)
- Name and email display
- Click to edit contact
Documents
- Uploaded project documents
- Document count display
- Upload button to add files
Project Links
- Website URLs related to project
- Link title and URL
- Opens in new tab
- Add/delete links
Editing Projects
Users can edit projects through:
- Edit button on project detail page
- Inline dialog with form
All Editable Fields:
- Name, Description, Goal, Value, Website
- Status, Priority, Type (dropdowns)
- Start Date, End Date (date pickers)
Features:
- Real-time validation
- Timezone-aware date handling
- Null value support for optional fields
- Toast notifications for success/error
Deleting Projects
- Confirmation dialog prevents accidental deletion
- Deletes project and all associated data
- Redirects to project list after deletion
Task Management
Creating Tasks
Tasks are created from the project detail page with the following fields:
Required Fields:
- Title - Task name/description
Optional Fields:
- Description - Detailed task information
- Priority - LOW, MEDIUM (default), HIGH, URGENT
- Status - TODO, IN_PROGRESS, IN_REVIEW, COMPLETED, CANCELLED
- Due Date - Target completion date
- Start Date - When task should begin
- Estimated Hours - Expected time to complete
- Actual Hours - Time actually spent
- Assignee - Team member responsible
- Category - Task classification
Automatic Fields:
- Created At - Timestamp of creation
- Completed At - Automatically set when status changes to COMPLETED
Task Display & Organization
Views:
- Mobile: Card-based layout with key information
- Desktop: Full table with sortable columns
Displayed Information:
- Task title (clickable to edit)
- Status badge (color-coded)
- Priority badge (color-coded)
- Due date (formatted as MM/DD/YYYY)
Sorting Options:
- By Status: TODO → IN_PROGRESS → IN_REVIEW → COMPLETED → CANCELLED
- By Priority: LOW → MEDIUM → HIGH → URGENT
- By Due Date: Nearest dates first
- Toggle ascending/descending
Task Status Colors:
- TODO: Gray
- IN_PROGRESS: Blue
- IN_REVIEW: Yellow
- COMPLETED: Green
- CANCELLED: Red
Task Editing & Management
Edit Task Dialog:
- Click any task to open edit form
- Modify title, description, status, priority
- Update due date and assignee
- Change category
- Delete task button in footer
Features:
- Real-time form updates
- Timezone-aware date handling
- Confirmation before deletion
- Both PATCH and PUT methods supported
Project Contacts
Contact Management
Contact Information Fields:
- Name (required)
- Email (optional)
- Phone (optional)
- Company (optional)
- Title/Role (optional)
- Notes (optional)
Operations:
Add New Contact
- Create contact and link to project simultaneously
- Full contact form in dialog
- Prevents duplicate associations
Edit Contact
- Click contact card to edit
- Modify all contact fields
- Real-time updates
View Contacts
- Grid layout of contact cards
- Avatar with initials
- Name and email display
- Contact count display
Link Existing Contact
- Add pre-existing contacts to projects
- Unique constraint prevents duplicates
Timeline Events
Timeline events represent project milestones and deliverables.
Event Fields:
- Title (required) - Milestone name
- Description (optional) - Milestone details
- Event Date (optional) - Target date
- Is Completed (checkbox) - Completion status
Features:
- Create, edit, delete events
- Mark events as complete/pending
- Sort by date or completion status
- Mobile card view and desktop table view
- Default events created with new projects
- Events appear on Operations Calendar when dated
Timeline Progress Chart:
- Visual pie chart showing completion percentage
- Displays completed vs pending events
- Shows total event count
Project Links
Purpose: Store and organize project-related URLs
Link Fields:
- Title (required) - Description of the link
- URL (required) - Valid web address
Features:
- Add links with title and URL
- Click to open in new tab
- View creation date
- Delete with confirmation
- Mobile and desktop table views
Project Value Tracking
Purpose: Financial tracking and ROI analysis
Features:
- Optional monetary value per project
- USD currency formatting
- Sortable in project list
- Displayed on project detail page
- Used for financial reporting
Financial Management
Invoice Management
Creating Invoices
Location: /dashboard/financials/income/invoices
Invoice Creation Process:
- Click "New Invoice" button
- Select client from dropdown
- Enter invoice amount
- Choose status (DRAFT or PENDING)
- Set issued date and due date
- Submit to create
Automatic Features:
- Unique invoice number generation (format:
INV-{timestamp}) - Association with current user
- Redirect to invoice detail page after creation
Invoice Fields & Data
Core Fields:
- Invoice Number - Auto-generated unique identifier
- Client - Selected from client database
- Amount - Invoice total (automatically calculated from line items)
- Status - DRAFT, PENDING, PAID, OVERDUE
- Issued Date - When invoice was created
- Due Date - Payment deadline
- Line Items - Individual invoice items (one-to-many relationship)
Line Item Fields:
- Date - Item date
- Description - Item description
- Amount - Item cost
Status Badge Colors:
- PAID: Green
- PENDING: Yellow
- OVERDUE: Red
- DRAFT: Gray outline
Viewing Invoices
Invoice List Page (/dashboard/financials/income/invoices)
Summary Cards:
- Total Invoiced (all invoices)
- Paid (PAID status only)
- Pending (PENDING status)
- Overdue (past due date)
Table Features:
- Search by invoice number, client name, status, amount, dates
- Sortable columns: Status, Invoice Number, Client, Amount, Issued Date, Due Date
- Click row to view invoice details
Invoice Detail Page (/dashboard/financials/invoices/[id])
Professional Invoice Display:
- Company branding and logo
- Invoice number and DRAFT watermark (if applicable)
- Company information (SalesField Network details)
- Client "Bill To" section with full address
- Invoice details box (Issue Date, Due Date, Total Due)
- Line items table with alternating row colors
- Subtotal and Total sections
- Payment instructions with company contact info
Action Buttons:
- Edit Invoice
- Send Email
- Download PDF
- Delete Invoice
Editing Invoices
Editable Fields:
- Invoice amount
- Status (DRAFT → PENDING → PAID/OVERDUE)
- Issued date
- Due date
- Line items (add, edit, remove)
Line Item Management:
- Add new items with date, description, amount
- Edit existing items inline
- Remove items with trash icon
- Automatic total recalculation
- Transactional update (invoice + all items together)
PDF Generation
Features:
- Professional invoice layout
- Company logo with aspect ratio preservation
- DRAFT watermark for draft invoices
- Complete client and company information
- Line items table with formatting
- Subtotal and total calculations
- Payment instructions footer
- Automatic page breaks for long invoices
Download Process:
- Click "Download PDF" button
- System fetches invoice data
- PDF generated using jsPDF library
- Browser triggers download
- Filename:
invoice-{invoiceNumber}.pdf
Email Functionality
Invoice Email Dialog:
- To Field - Pre-filled with client email (required)
- CC Field - Optional carbon copy recipients (comma-separated)
- BCC Field - Optional blind carbon copy (comma-separated)
- Subject - Pre-filled: "Invoice {number} from SalesField Network" (editable)
- Message - Customizable email body with template
Email Template Features:
- HTML formatted with company branding
- Green header with SalesField Network branding
- Invoice details (number, amount, due date)
- Professional closing
- Company contact information footer
Sending Process:
- Click "Send Email" button
- Dialog opens with pre-filled data
- Modify recipients, subject, message as needed
- Click "Send Email"
- System validates email addresses
- PDF generated and attached
- Email sent via Gmail API
- Toast confirmation or error display
Email Validation:
- Regex pattern for all email fields
- Multiple email support (comma-separated)
- Required "To" field
Invoice Deletion
- Confirmation dialog required
- Cascade deletes all line items
- Redirects to invoice list
- Toast notification confirms deletion
Expense Tracking
Creating Expenses
Location: /dashboard/financials/expenses
Expense Fields:
- Description (required) - What the expense is for
- Amount (required) - Cost as positive number
- Date (required) - When expense occurred
- Category (required) - Expense classification
- Receipt (optional) - File upload for proof
Expense Categories:
SOFTWARE- Subscriptions, tools, licensesMARKETING- Advertising, promotions, campaignsOFFICE_SUPPLIES- Stationery, equipment, suppliesTRAVEL- Flights, hotels, mileage, transportationOTHER- General/miscellaneous expenses
Creation Process:
- Click "Log Expense" button
- Fill in description and amount
- Select date and category
- Optionally upload receipt file
- Submit
- Two-step process: Create expense, then upload receipt if provided
Viewing Expenses
Expenses Data Table:
- Search by description
- Sort by any column:
- Description
- Category (formatted: "Software", "Marketing", etc.)
- Date
- Amount (currency formatted)
- Color-coded category badges
- Click to select for editing/deletion
- Responsive mobile and desktop design
Managing Expenses
Edit Expense:
- Modify description
- Update amount
- Change category
- Change date
- Receipt management
Delete Expense:
- Confirmation required
- Cascade deletes associated documents/receipts
- Removes from expense list
Client Management
Creating Clients
Location: /dashboard/financials/income/clients
Tabbed Form Interface (3 tabs):
Tab 1: Basic Information
- Client Name (required, minimum 2 characters)
- Bill To (billing contact name, optional)
- Email (optional, validated format)
- Phone (optional)
- Website (optional, valid URL)
- Client Start Date (optional)
- Contract Start Date (optional)
- Contract Term (ONE_MONTH, ONE_TIME, THREE_MONTH, SIX_MONTH, ONE_YEAR)
- Contract Amount (optional, positive number)
- Frequency (e.g., "monthly", "quarterly")
- Notes (optional, large textarea)
Tab 2: Address Information
- Address Line 1
- Address Line 2
- City
- State
- ZIP Code
Tab 3: Contacts
- Multiple contacts per client
- For each contact:
- Name (required)
- Email (optional)
- Phone (optional)
- Note (optional)
- Add/remove contacts dynamically
- Minimum one contact visible
Creation Process:
- Click "Add Client" button
- Fill basic info tab
- Add address information (optional)
- Add contact(s)
- Submit
- Client and all contacts created simultaneously
- Toast notification confirms success
Viewing Clients
Client List Page:
- Display all clients in table
- Show name, email, phone, website
- Click row to view client details
Client Detail Page (/dashboard/financials/income/clients/[id])
- Complete client information
- Associated invoices list
- Contact cards with avatars
- Edit and delete options
Editing Clients
Edit Dialog Features:
- Same tabbed interface as creation
- Pre-filled with existing data
- Manage contacts:
- Create new contacts
- Update existing contacts
- Delete contacts
- Action tracking: create/update/delete
- Null handling for optional fields
- Transactional update (client + contacts together)
Client Deletion
- Confirmation dialog required
- Cascade deletes:
- All ClientContact records
- Does NOT delete invoices (maintains reference)
- Removes from client list
Subscription Tracking
Creating Subscriptions
Subscription Fields:
- Name (required) - Subscription service name (e.g., "Adobe Creative Cloud")
- Amount (required) - Cost per billing cycle
- Billing Cycle (required) - MONTHLY or ANNUALLY
- Due Date (conditional) - Only for annual subscriptions
Features:
- Conditional due date field (only visible for annual billing)
- Default billing cycle: MONTHLY
- Toast notifications for success/error
Viewing Subscriptions
Subscriptions Data Table:
- Display all active subscriptions
- Show name, amount, billing cycle
- Sortable and filterable
- Click to edit or delete
Managing Subscriptions
Edit Subscription:
- Modify name
- Update amount
- Change billing cycle
- Update due date (if annual)
Delete Subscription:
- Confirmation required
- Removes from subscription list
Financial Calculations
In Dashboard:
- Monthly Subscriptions: Calculated as
amount × 12for year-to-date - Annual Subscriptions: Calculated as
amountwith due date tracking - Upcoming Payments: Sum of monthly + annual subscriptions due within 30 days
- YTD Total: Sum of all subscription costs for year-to-date
Financial Reporting & Analytics
Financial Summary Report
Location: /dashboard/financials/reports
Report Features:
- Date Range Picker - Select from and to dates
- Profit & Loss Report:
- Total Income (sum of PAID invoices in range)
- Total Expenses (sum of all expenses in range)
- Net Profit (income minus expenses)
Summary Cards:
- Total Income (green, PAID invoices only)
- Total Expenses (red, all logged expenses)
- Net Profit (gray or red if negative)
Future Features:
- Print report (placeholder button)
- Export as PDF (placeholder button)
Financial Dashboard
Location: /dashboard/financials
Year-to-Date Metrics:
- Total Revenue - Sum of PAID invoices from January 1
- Total Expenses - One-time expenses + subscription costs
- Total Subscriptions YTD - Annualized subscription costs
- Net Income YTD - Revenue - (Revenue × 20% tax) - Expenses
- Taxes Due (20%) - Estimated tax on revenue
- Upcoming Payments (30 days) - Monthly subscriptions + annual due soon
Monthly Breakdown:
- Last Month (previous month data)
- This Month (current month data)
- Next Month (forecasted data)
For each month:
- Income from invoices
- Expenses (one-time + subscriptions)
- Net profit/loss
- Draft/pending invoices (next month)
Financial Trend Chart:
- Line chart showing financial trends over time
- Client-side chart rendering
- Visual representation of income/expense trends
Alert Features:
Overdue Invoices Alert
- Triggered by DRAFT or PENDING invoices past due date
- Red highlight
- Shows count and total amount
Upcoming Subscriptions Alert
- Monthly subscriptions (always included)
- Annual subscriptions due in next 7 days
Low Cash Flow Warning
- Triggered when current month net is negative
- Alerts user to potential cash flow issues
Financial Data Relationships
Invoice → Client
- Every invoice requires client selection
- Client data auto-populated in PDF (address, contact info)
- Invoices appear in client detail view
- Deleting client doesn't delete invoices (orphans them)
Expense → Document
- Expenses can have receipt documents attached
- Multiple documents per expense supported
- Deleting expense cascades to documents
Dashboard Integration
- Pulls data from: Invoices, Expenses, Subscriptions
- Calculates metrics across all three
- Shows status alerts (overdue invoices, upcoming subscriptions)
- Real-time financial health monitoring
Calendar & Timeline
Interactive Calendar System
Calendar Component
Location: /dashboard/operations/calendar
View Modes:
- Month View - 7-column grid showing entire month
- Week View - 7-column layout for current week
- Day View - Single-day detail view
Drag-and-Drop Features:
- Full DnD support using @dnd-kit library
- Touch-enabled for mobile devices
- Visual feedback during drag (opacity change)
- Drop zone highlighting
- Optimistic UI updates
- Error rollback on API failure
Items Displayed on Calendar:
- Projects (shows end date)
- Tasks (shows due date)
- Timeline Events (shows event date, incomplete only)
- Invoices (shows due date, DRAFT/PENDING only)
- Feature Requests (shows due date, active only)
Item Colors:
- Project: Blue
- Task: Green
- Timeline Event: Purple
- Invoice: Orange
- Feature Request: Yellow
View-Specific Features:
- Month View: Shows up to 3 items per day with "+N more" indicator
- Week View: Shows up to 6 items per day
- Day View: Full list format, no drag-and-drop
Navigation:
- Previous/Next buttons to change month/week
- "Today" button to jump to current date
- View mode switcher (Month/Week/Day toggle)
Drag-and-Drop Workflow
How It Works:
- User drags item from source day
- Visual feedback with 0.5 opacity
- Drop on target day
- API update triggered
- Optimistic UI update (immediate visual change)
- If API succeeds → toast confirmation
- If API fails → rollback UI + error toast
Date Field Mapping:
- Projects → updates
endDate - Tasks → updates
dueDate - Timeline Events → updates
eventDate - Invoices → updates
dueDate - Feature Requests → updates
dueDate
API Endpoints Used:
PATCH /api/projects/[id]- Update project end datePUT /api/tasks/[id]- Update task due datePATCH /api/timeline-events/[id]- Update event datePATCH /api/financials/invoices/[id]- Update invoice due datePATCH /api/feature-requests/[id]- Update feature due date
Timeline Event Management
Timeline Events (Project Milestones)
Purpose: Track project milestones and key deliverables
Event Fields:
- Title (required) - Milestone name
- Description (optional) - Milestone details
- Event Date (optional) - Target completion date
- Is Completed (boolean) - Completion status checkbox
Operations:
Create Timeline Event:
- "Add Event" button in project detail page
- Form with title, description, event date, completion status
- Saves to database
- Appears on Operations Calendar if dated
Edit Timeline Event:
- Click event to open edit dialog
- Modify any field
- Real-time updates
- Timezone-aware date handling
Mark Complete/Pending:
- Click checkbox to toggle completion
- Updates in database
- Affects timeline progress chart
Delete Timeline Event:
- Trash icon in actions column
- Confirmation required
- Removes from database and display
Sort Options:
- By Date (ascending/descending)
- By Completion Status
Views:
- Mobile: Card-based layout
- Desktop: Full table with sortable columns
Default Events:
- Projects automatically created with template timeline events
Timeline Progress Chart
Purpose: Visualize milestone completion
Features:
- Pie chart visualization
- Shows completed vs pending events
- Displays completion percentage
- Count of each status
- Custom tooltip on hover
- Color-coded legend (green for completed, gray for pending)
Location: Project detail page sidebar
Monthly Timeline Overview
Location: /dashboard (MonthlyTimeline component)
Features:
- Two-month view: Current month and next month
- Collapsible sections for each month
- Item filtering:
- Only DRAFT/PENDING invoices
- Only active feature requests (not Done/Canceled)
- Only uncompleted timeline events
- All task and project statuses
Item Display:
- Type-specific icons:
- Briefcase (Project)
- CheckCircle (Task)
- Clock (Timeline)
- FileText (Invoice)
- Lightbulb (Feature)
- Color-coded badges for each type
- Interactive links to item detail pages
Daily Items Card
Location: /dashboard/operations (DailyItemsCard component)
Purpose: Quick view of today's and tomorrow's due items
Sections:
- Today - Items due today
- Tomorrow - Items due tomorrow
- Overdue - Items past due (if any)
Grouped By:
- Projects & Tasks
- Financials (Invoices)
Features:
- Type-specific icons and badges
- Priority indicators (for Feature Requests)
- Status indicators (for Invoices)
- Expandable/collapsible sections
Timezone Handling
Implementation:
- All dates stored in database as UTC
- Client adjusts for timezone offset when submitting
- Display uses UTC timezone for consistency
- Formula:
adjustDateForTimezone(dateString)adds timezone offset
Code Pattern:
javascript
// When submitting dates
const adjustDateForTimezone = (dateString) => {
const date = new Date(dateString);
const timezoneOffset = date.getTimezoneOffset() * 60000;
return new Date(date.getTime() + timezoneOffset);
};
// When displaying dates
new Date(eventDate).toLocaleDateString('en-US', { timeZone: 'UTC' })Document & File Management
Three-Tier Document System
The application provides three distinct file management systems:
1. General Documents
Purpose: User-owned files, optionally linked to projects or expenses
Document Fields:
- Title - Document title
- Name - Original filename
- Type - MIME type
- Size - File size in bytes
- Path - Relative file path (e.g., "uploads/filename.pdf")
- User ID - Owner
- Project ID - Optional project link
- Expense ID - Optional expense link
Storage Location:
- Development:
public/uploads/ - Production:
/data/uploads/
Filename Convention: {timestamp}-{random}-{originalName}
2. Project Files
Purpose: Project-specific files with task associations
File Fields:
- Original Name - Original filename
- Filename - Unique safe filename
- Mimetype - MIME type
- Size - File size in bytes
- Path - Full physical path
- Uploader ID - User who uploaded
- Project ID - Associated project (required)
- Task ID - Optional task link
Storage Location: /data/uploads/{projectId}/{filename}
File Validation:
- Allowed MIME types: PDF, Word, Excel, PowerPoint, text, markdown, images, archives
- Allowed extensions:
.pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .txt, .md, .jpg, .jpeg, .png, .gif, .svg, .zip, .rar - Max size: 50MB
3. Financial Documents
Purpose: Invoice/expense receipt management
Fields:
- File Name
- File URL - URL/path to file
- Upload Date
- Category - Document category
- User ID - Owner
- Invoice ID - Optional invoice link
- Expense ID - Optional expense link
File Upload Operations
General Document Upload
Endpoint: POST /api/documents
Process:
- User selects file
- Provides title
- Optionally links to project or expense
- File uploaded and stored
- Database record created
- Relative path stored
Upload Dialog Features:
- Title and file input
- Automatic dialog reset
- Error display
- Loading state with spinner
- Project ID linking support
Project File Upload
Endpoint: POST /api/files
Features:
- Drag-and-drop support
- File type/size validation
- Visual feedback for drag state
- File preview with size display
- Remove selected file button
- MIME type + extension validation
Process:
- Select or drag file
- Validation checks
- Upload to project-specific directory
- Database record created
- Full physical path stored
Security:
- Project ownership/membership verified
- Unique filenames prevent collisions
- Path traversal protection
Logo Upload
Endpoint: POST /api/upload
Purpose: Upload logos and icons for appearance settings
Constraints:
- Image files only
- Max 5MB
- Stores to
public/uploads/or/data/uploads/
File Retrieval & Viewing
View/Download Document
Endpoint: GET /api/documents/view/{id}
Security: User can only access their own documents
Features:
- File stream with proper MIME type headers
- Content-Disposition:
inline(displays in browser) - Graceful error handling for missing files
Download Project File
Endpoint: GET /api/files/{fileId}
Security: Project owner or member access
Features:
- File stream with attachment header
- Proper filename in download
- Error handling for missing files
Get Documents
Endpoint: GET /api/documents?projectId={id}
Features:
- Filter by project (optional)
- Returns user's documents only
- Ordered by creation date (descending)
File Management UI
Documents Table
Location: /dashboard/documents
Features:
- Search by title or filename
- Multi-column sorting:
- Title
- Name
- Type
- Size (formatted: Bytes, KB, MB, GB, TB)
- Upload Date
- Actions menu:
- Open file in new tab
- Delete with confirmation
- Null value handling
- Responsive design
Project Documents Section
Location: Project detail page
Features:
- Documents section (collapsible)
- Document count display
- Upload document button
- Table view with all actions
- Automatic refresh on upload/delete
- Filters to project-specific documents
Document Associations
Documents → Projects
- Upload when viewing project detail page
- Each document stores
projectId - Query filter:
GET /api/documents?projectId={id}
Documents → Expenses
Integration: Expense creation dialog
Process:
- User logs expense (creates Expense record)
- If receipt provided, uploads Document with
expenseId - Two-step process:
- Create expense via
POST /api/financials/expenses - Upload receipt via
POST /api/documentswithexpenseId
- Create expense via
Files → Projects
- Required
projectIdfor all project files - Stored at:
/data/uploads/{projectId}/{filename}
Files → Tasks
- Tasks can have associated files via
File.taskId - Supports project task documentation
- Optional relationship
File Security
Authentication:
- All endpoints require valid session
Authorization:
- Documents: User can only access their own
- Project Files: Only project owner/member access
- File Deletion: Permission verification (owner or uploader)
File Validation:
- MIME type verification
- Extension validation (fallback)
- File size limits enforced
Path Security:
- Unique filenames prevent collisions
- Full paths stored in database (not user input)
path.basename()extracts filename safely
Graceful Error Handling:
- Missing files on disk don't break deletions
- ENOENT errors specifically handled
- User-friendly error messages
Supported File Types
MIME Types:
application/pdfapplication/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.documentapplication/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheetapplication/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentationtext/plain,text/markdownimage/jpeg,image/png,image/gif,image/svg+xmlapplication/zip,application/x-rar-compressed
Size Limits:
- General Documents: Server default
- Project Files: 50MB max
- Logos: 5MB max
Communication & Notifications
Email System
Gmail API Integration
File: src/lib/google-email.ts
Features:
- OAuth2 authentication with refresh tokens
- Secure Gmail API access
- Multiple email functions for different purposes
Environment Variables Required:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRETGOOGLE_REFRESH_TOKENGOOGLE_EMAIL_FROM
Core Email Functions:
1. sendGoogleEmail()
- Basic email sending
- Parameters: to, subject, text, html, from
- Creates MIME multipart messages (plain text + HTML)
- Logs all email activity
- Returns message ID on success
2. sendInvoiceEmail()
- Invoice-specific with PDF attachments
- Parameters: to, subject, htmlBody, pdfBuffer, invoiceNumber, cc, bcc
- Supports CC and BCC headers
- Attaches PDF with proper filename
- Comprehensive error logging
3. sendBatchGoogleEmails()
- Efficient batch email sending
- Processes in batches of 5 (rate limiting)
- 1-second delay between batches
- Returns detailed results (success/failure)
- Uses Promise.allSettled() for resilience
4. testGoogleEmailConfig()
- Configuration validation
- Tests OAuth2 credentials
- Verifies Gmail API access
- Returns success/failure status
Email Message Structure:
- Subject line (customizable)
- From header: "Project Planning App <{email}>"
- CC/BCC support
- MIME-Version 1.0 with base64url encoding
- Plain text and HTML alternatives
Fallback Email System
File: src/lib/email.ts
Dual-Mode Support:
- Primary: Google Gmail API
- Fallback: Nodemailer SMTP
Fallback Variables:
EMAIL_HOSTEMAIL_PORTEMAIL_USEREMAIL_PASS
Features:
- Automatic service selection based on configuration
- HTML and plain text support
- Same interface as Gmail API
Automated Manifest Emails
Daily Morning Manifest
Endpoint: POST/GET /api/cron/send-manifest
Purpose: Send daily morning email with today's operational items
Trigger Methods:
- Cron job (scheduled daily with Bearer token auth)
- Manual trigger ("Send Now" button for logged-in users)
Data Included:
- Projects with end dates matching today
- Tasks due today
- Timeline events scheduled today (incomplete only)
- Invoices due today (DRAFT or PENDING)
- Feature requests due today (active only)
Email Template:
- Personalized greeting with user name
- Organized sections: Projects & Tasks, Financials, Feature Requests
- Color-coded list items (purple accent, light gray background)
- Direct links to each item
- "View Operations Dashboard" CTA button
- Responsive HTML design
- UTC timezone-aware
User Control:
- Database field:
sendDailyManifest(boolean, default: false) - Only sends to users with enabled preference
- Active users with non-null emails only
Daily Afternoon Manifest
Endpoint: POST/GET /api/cron/send-afternoon-manifest
Purpose: Send afternoon email with tomorrow's operational items
Trigger Methods:
- Cron job (scheduled daily with Bearer token auth)
- Manual trigger ("Send Now" button)
Key Differences:
- Shows items due tomorrow instead of today
- Subject: "Your Afternoon Manifest for {tomorrow_date}"
- Help text: "Enjoy your evening!" when no items
- Same data categories as morning manifest
Data Processing:
- Fetches entire month's data
- Filters for tomorrow's date using UTC-aware comparison
- Collaborative model (no owner filtering)
User Control:
- Database field:
sendAfternoonManifest(boolean, default: false) - Controlled via notification settings page
Invoice Emailing
Endpoint: POST /api/financials/invoices/[id]/send-email
Invoice Email Dialog:
Input Fields:
- To: Primary recipient(s) - required, pre-filled with client email
- CC: Optional carbon copy recipients (comma-separated)
- BCC: Optional blind carbon copy (comma-separated)
- Subject: Customizable, pre-filled with "Invoice {number} from SalesField Network"
- Message: Custom email body (textarea, monospace font)
Features:
- Multiple email support (comma-separated)
- Pre-populated with client data
- Template message with invoice details
- Email validation for all fields (regex pattern)
Backend Processing:
- Validate all email fields with Zod schema
- Generate invoice PDF using
generateInvoicePDF() - Create HTML body:
- Company branding header
- User-provided message (newlines to
<br>) - Invoice details box (number, amount, due date)
- Footer with company contact info
- Send via
sendInvoiceEmail()with PDF attachment - Log all recipients (To, CC, BCC)
- Return success/error response
Email Headers:
- Multiple To addresses supported
- CC recipients (visible to all)
- BCC recipients (hidden from others)
- Custom subject lines
- Custom message bodies
In-App Toast Notifications
Implementation: Radix UI Toast Primitives
Features:
- Single toast display limit
- Auto-dismiss timeout: 1,000,000ms (very long)
- Swipe-to-dismiss on mobile
- Action buttons support
- State management via reducer
Toast Hook:
javascript
toast({
title: string,
description: string,
variant: 'default' | 'destructive'
})Variants:
- Default (success/info)
- Destructive (error)
Components:
toast.tsx- Toast primitive wrapperuse-toast.tsx- Hook and state managementtoaster.tsx- Provider and renderer
Closeable Notifications System
Purpose: Persistent, dismissible help mode notifications
Component: CloseableNotification.tsx
Properties:
id- Unique notification identifiermessage- Notification contenttype- info | warning | success | errorisEnabled- Master enable/disable toggleclosedNotifications- Array of dismissed IDsposition- 'below' | 'inside'
Styling by Type:
- Info: Blue with blue border
- Warning: Amber with amber border
- Success: Emerald/green with emerald border
- Error: Red with red border
- All support light and dark mode
Closure Mechanism:
- User clicks X button
- PATCH request to
/api/users/settings - Notification ID added to
closedNotificationsarray - Notification removed from display
- Preference persists across sessions
Hook Functions:
fetchSettings()- Load user preferencesupdateSettings()- Update enable toggleresetNotifications()- Clear all closed IDsrefetchSettings()- Manual refresh
User Notification Preferences
Database Fields:
sendDailyManifest: Boolean (default: false)
sendAfternoonManifest: Boolean (default: false)
enableCloseableNotifications: Boolean (default: true)
closedNotifications: Json (default: [])API Endpoints:
GET /api/users/settings
json
Response: {
"sendDailyManifest": boolean,
"sendAfternoonManifest": boolean,
"enableCloseableNotifications": boolean,
"closedNotifications": string[]
}PATCH /api/users/settings
json
Body: {
"sendDailyManifest"?: boolean,
"sendAfternoonManifest"?: boolean,
"enableCloseableNotifications"?: boolean,
"closedNotifications"?: string[],
"closedNotification"?: string // Add single ID
}Notification Settings Page
Location: /dashboard/settings/notifications
Components:
Daily Morning Manifest Toggle
- Description: "Receive an email every morning with a summary of items due for the day"
- "Send Now" button for manual trigger
- Switch component for enable/disable
Daily Afternoon Manifest Toggle
- Description: "Receive an email every afternoon with a summary of items due for tomorrow"
- "Send Now" button for manual trigger
- Switch component for enable/disable
Enable Help Mode Toggle
- Description: "When enabled, card and graph titles become interactive, providing detailed documentation"
- Switch component
Closed Notifications Counter
- Shows count of dismissed notifications
- "Reset all notifications" button
- Restores all dismissed help notifications
User Actions:
- Toggle switches save immediately
- "Send Now" buttons trigger manual emails
- Real-time toast feedback
- Loading states during async operations
Email Testing & Validation
Endpoint: GET/POST /api/test-email
GET /api/test-email - Test configuration
- Validates Gmail API setup
- Tests refresh token validity
- Sends test email to logged-in user
- Returns detailed configuration status
POST /api/test-email - Test with custom recipient
- Accepts: to, subject, message
- Sends test email to specified address
- Requires authentication
Test Email Template:
- Professional HTML format
- Configuration verification checkmarks
- Sender info and timestamp
- Fallback plain text support
Communication Security
Protection Mechanisms:
- Cron Job Security: Bearer token validation (
CRON_SECRET) - User Settings: NextAuth session validation
- Email Validation: Zod schema with regex patterns
- OAuth2 Security: Refresh tokens in environment variables
- Rate Limiting: Batch processing with 1-second delays
User & Team Management
Authentication System
Authentication Provider
Framework: NextAuth.js
Configuration:
- Session Strategy: JWT-based tokens
- Provider: Credentials (email/password)
- Password Security: bcryptjs hashing (12 salt rounds)
Registration Flow
Endpoint: POST /api/auth/register
Process:
- User provides name, email, password
- Validation checks:
- All fields required
- Password minimum 6 characters
- Email uniqueness verification
- Password hashed with bcryptjs (12 rounds)
- User created with:
isActive: true(default)role: USER(default)
- Returns user data (without password)
Login Flow
Authentication Callback:
- Credentials received
- bcrypt password verification
- Active account check (
isActive: truerequired) - JWT token generation with user metadata
- Session established
Session Data:
user.id- Unique identifieruser.email- Email addressuser.name- Display nameuser.role- User role (ADMIN, USER, VIEWER)user.isActive- Account status
Account Deactivation:
- Users with
isActive: falsecannot log in - Error: "Your account has not been activated"
User Roles & Permissions
Three-Tier Role System:
1. ADMIN
- Create, edit, and delete users
- Enable/disable user accounts (toggle
isActive) - Cannot disable own account (self-protection)
- Edit any user's profile
- Assign roles to new users
- Full system access
2. USER (Default)
- Edit own profile (name, email)
- Cannot edit other users
- Cannot manage user activation
- Cannot assign roles
- Can participate in projects and tasks
- Standard application access
3. VIEWER
- Read-only access
- View projects, tasks, and data
- Limited interaction capabilities
- Cannot modify any data
User Management
User Management Endpoints
POST /api/users - Create New User
- Authentication: Required
- Authorization: Admin only (UI enforced)
- Required Fields: name, email, password, role
- Validations:
- All fields required
- Valid UserRole enum value
- Unique email
- Password hashed
- Defaults:
isActive: true- All notification flags: false
PATCH /api/users/[id] - Update User
- Authentication: Required
- Authorization Rules:
- Name/Email: Users can edit themselves; Admins can edit anyone
- isActive: Admin-only; Admins cannot modify own status
- Payload:json
{ "name"?: string, "email"?: string, "isActive"?: boolean // Admin only }
DELETE /api/users/[id] - Delete User
- Authentication: Required
- Authorization: Admin-only
- Restriction: Cannot delete own account
- Cascade: All user data deleted via Prisma relations
GET /api/users/settings - Get User Settings
- Authentication: Required
- Returns notification preferences
PATCH /api/users/settings - Update User Settings
- Authentication: Required
- Updates notification preferences
Team Management Interface
Location: /dashboard/team
Team Page Features
User Table Display:
- Name
- Role (displayed as badge)
- Status (Active/Inactive badge)
Admin-Only Features:
Enable/Disable Toggle
- Switch for
isActivestatus - Optimistic UI updates
- Prevents admins from disabling themselves
- Immediate visual feedback
- Switch for
Action Buttons
- Edit button (pencil icon)
- Delete button (trash icon)
- Confirmation dialogs
Add User Form
Location: /dashboard/team/AddUserForm
Visibility: Admin only
Fields:
- Full Name (required)
- Email (required, email validation)
- Password (required, minimum 8 characters)
- Role (dropdown: ADMIN, USER, VIEWER)
Validation:
- All fields required client-side
- Password minimum 8 characters enforced
- Email format validation
Success Behavior:
- Toast notification
- Form reset
- Page reload to show new user
Edit User Dialog
Trigger: Pencil icon in user table
Editable Fields:
- Name
Note: Role and active status not editable via this dialog
Success: Page reload to refresh data
Delete User Alert
Trigger: Trash icon in user table
Warning: "This will permanently delete the user and all associated data"
Confirmation Required: Must click "Continue"
Success: User removed immediately
User Settings & Preferences
Settings Pages: /dashboard/settings/
Notification Settings
Location: /dashboard/settings/notifications (default settings page)
Preferences:
Daily Morning Manifest
- Toggle:
sendDailyManifest - Description: Morning email summary
- Manual "Send Now" button
- Toggle:
Daily Afternoon Manifest
- Toggle:
sendAfternoonManifest - Description: Afternoon email summary
- Manual "Send Now" button
- Toggle:
Help Mode (Closeable Notifications)
- Toggle:
enableCloseableNotifications - Description: Interactive card documentation
- Shows count of hidden notifications
- "Reset all notifications" button
- Toggle:
Appearance/Branding Settings
Location: /dashboard/settings/branding
Business Branding:
- Business Name
- Mission Statement
Logo & Icon Management:
- Light Mode Logo (recommended: 496x148px)
- Dark Mode Logo (recommended: 496x148px)
- Light Mode Icon (recommended: 96x96px)
- Dark Mode Icon (recommended: 96x96px)
- Upload endpoint:
/api/upload - Clear/remove functionality
Theme Colors:
- 19 color fields for Light Theme
- 19 color fields for Dark Theme
- Color picker + hex input for each
- Reset to defaults button
- Colors: background, foreground, card, popover, primary, secondary, muted, accent, destructive, border, input, ring
Feature Requests
Location: /dashboard/settings/feature-requests
Features:
- View submitted feature requests
- Status tracking
- Priority levels
- Convert to documentation
- Submission tracking
User Profile Model
Core Fields:
id- Unique identifier (CUID)name- Display name (optional)email- Unique email (optional)emailVerified- Verification timestampimage- Profile image URL (optional)password- Hashed password (optional)
Account Status:
isActive- Account activation (controls login ability)- Schema default: false
- Registration sets: true
Notification Preferences:
sendDailyManifest- Morning digest (default: false)sendAfternoonManifest- Afternoon digest (default: false)enableCloseableNotifications- Help mode (default: true)closedNotifications- JSON array of closed IDs (default: [])
System Fields:
role- ADMIN, USER, or VIEWER (default: USER)createdAt- Account creationupdatedAt- Last update
User Relations:
- Owned projects
- Project memberships
- Assigned tasks
- Comments
- Time entries
- Uploaded files
- Notifications
- Documents
- Clients
- Invoices
- Expenses
- Subscriptions
- Financial documents
- Documentation
Project Collaboration
Project Member Roles
Three-Tier System:
- ADMIN - Full project control
- MEMBER - Can contribute and edit
- VIEWER - Read-only access
ProjectMember Model
Fields:
id- Unique identifierrole- ProjectMemberRolejoinedAt- Membership startupdatedAt- Last changeuserId- User referenceprojectId- Project reference
Constraint: Unique on userId + projectId (prevents duplicates)
Collaboration Features
1. Comments
- Users comment on tasks
- Author and task linkage
- Persistent storage
2. Time Entries
- Track time on tasks
- Includes description, start/end time, duration
- User and task linkage
3. File Sharing
- Upload files to projects/tasks
- Metadata: original name, MIME type, size, path
- User ownership tracking
Security & Permissions
Authentication Security
- Password Hashing: bcryptjs (12 rounds)
- Session Management: JWT tokens
- Server-side Validation: All protected endpoints
- Environment Security: NEXTAUTH_SECRET required
Authorization Checks
Implemented:
- User authentication on all protected endpoints
- Admin-specific operation validation
- Users can only edit own profile (unless Admin)
- Admins cannot modify own
isActive(prevents lockout) - Admins cannot delete own account
Data Cascade: When user deleted, all related data cascades:
- Projects (owned)
- Project memberships
- Tasks, comments, time entries
- Files, documents
- Invoices, expenses
- And all other user-owned entities
Feature Relationships & Integration
Project → Task → Comment Flow
Relationship Chain:
- Project created by user
- Tasks created within project
- Tasks assigned to team members
- Comments added to tasks by users
- Time Entries logged against tasks
- Files attached to tasks
Data Flow:
- Project owns tasks (one-to-many)
- Tasks have assignee (many-to-one with User)
- Tasks have comments (one-to-many)
- Tasks have time entries (one-to-many)
- Tasks have files (one-to-many)
Financial → Project Integration
Invoice → Client → Project:
- Invoices created for clients
- Clients can be linked to projects via project type (POTENTIAL_CLIENT, CURRENT_CLIENT, etc.)
- Project value tracking for ROI analysis
Expense → Project:
- Expenses can be associated with projects
- Receipt documents link to expenses
- Financial dashboard aggregates project-related costs
Calendar → Everything Integration
Calendar as Central Hub:
The Operations Calendar aggregates items from multiple sources:
- Projects (displays end dates)
- Tasks (displays due dates)
- Timeline Events (displays event dates)
- Invoices (displays due dates)
- Feature Requests (displays due dates)
Interactive Features:
- Drag-and-drop to reschedule any item
- Click item to navigate to detail page
- Color-coded by type for easy identification
- Filters show only relevant items (incomplete, active, pending)
Daily Manifest Integration:
- Morning manifest pulls today's calendar items
- Afternoon manifest pulls tomorrow's calendar items
- Email sent to users with preferences enabled
Document → Entity Associations
Documents can be linked to:
- Projects - Project documentation, deliverables
- Expenses - Receipt images and PDFs
- Tasks - Task-specific files (via File model)
Files specifically link to:
- Projects (required) - All project files
- Tasks (optional) - Task attachments
Financial Documents link to:
- Invoices - Invoice attachments
- Expenses - Expense receipts
Notification → User Preferences Integration
User Control:
- Each user controls their notification preferences
enableCloseableNotificationscontrols help modesendDailyManifestcontrols morning emailssendAfternoonManifestcontrols afternoon emailsclosedNotificationstracks dismissed help notifications
System Response:
- Help notifications only shown if enabled and not closed
- Emails only sent if user preference enabled
- Manual "Send Now" available regardless of preference
- Settings persist across sessions
Team → Project → Task Collaboration
Collaboration Flow:
- Team Members added to system by Admin
- Project Created by any user (becomes owner)
- Project Members added with roles (ADMIN, MEMBER, VIEWER)
- Tasks Created within project
- Tasks Assigned to project members
- Comments Added by team members
- Time Logged by assignees
- Files Shared within project
Visibility:
- All users can see all projects (collaborative model)
- Project members have specific roles
- Task assignments direct work
- Comments facilitate discussion
- Time entries track effort
User Roles & Permissions
Role-Based Access Control
ADMIN Capabilities
User Management:
- Create new users with any role
- Edit any user's profile
- Enable/disable user accounts
- Delete users (except own account)
- Cannot disable own account
Project Management:
- Full access to all projects
- Can edit/delete any project
- Can manage project members
Financial Management:
- Full access to all invoices, expenses, clients
- Can create, edit, delete financial records
System Settings:
- Access to appearance/branding settings
- Manage system-wide configurations
USER Capabilities
Profile Management:
- Edit own profile (name, email)
- Manage own notification preferences
- Upload own profile image
Project Participation:
- Create projects (becomes owner)
- Edit own projects
- Participate in assigned projects
- Create tasks
- Comment on tasks
- Log time entries
Financial Operations:
- Create invoices, expenses, clients
- Edit own financial records
- View all financial data (collaborative model)
Document Management:
- Upload documents
- View own documents
- Share files on projects
VIEWER Capabilities
Read-Only Access:
- View projects and tasks
- View financial data
- View documents
- Cannot modify any data
- Cannot create new records
Permission Matrix
| Feature | ADMIN | USER | VIEWER |
|---|---|---|---|
| Create Users | ✅ | ❌ | ❌ |
| Edit Any User | ✅ | ❌ | ❌ |
| Edit Own Profile | ✅ | ✅ | ✅ |
| Delete Users | ✅ | ❌ | ❌ |
| Create Projects | ✅ | ✅ | ❌ |
| Edit Own Projects | ✅ | ✅ | ❌ |
| Edit Any Project | ✅ | ❌ | ❌ |
| View All Projects | ✅ | ✅ | ✅ |
| Create Tasks | ✅ | ✅ | ❌ |
| Edit Tasks | ✅ | ✅ | ❌ |
| Create Invoices | ✅ | ✅ | ❌ |
| Edit Invoices | ✅ | ✅ | ❌ |
| Send Invoice Emails | ✅ | ✅ | ❌ |
| Create Expenses | ✅ | ✅ | ❌ |
| View Financial Data | ✅ | ✅ | ✅ |
| Upload Documents | ✅ | ✅ | ❌ |
| Delete Documents | ✅ | ✅ (own) | ❌ |
| Comment on Tasks | ✅ | ✅ | ❌ |
| Log Time Entries | ✅ | ✅ | ❌ |
| Manage Notifications | ✅ | ✅ | ✅ |
| Access Settings | ✅ | ✅ (limited) | ✅ (limited) |
Complete Feature Summary
Project Management Features
✅ Create projects with comprehensive metadata ✅ Multiple project types and statuses ✅ Priority-based organization ✅ Project value tracking for ROI ✅ Timeline and milestone management ✅ Task creation and assignment ✅ Task status and priority tracking ✅ Contact management per project ✅ Project links and references ✅ Search and filter projects ✅ Sortable project lists ✅ Table and card view modes ✅ Project detail dashboard ✅ Collapsible content sections ✅ Timeline progress visualization
Financial Management Features
✅ Invoice creation and management ✅ Multi-line invoice items ✅ Professional PDF invoice generation ✅ Invoice email with CC/BCC support ✅ Invoice status tracking (DRAFT, PENDING, PAID, OVERDUE) ✅ Client management with full contact details ✅ Multiple contacts per client ✅ Client address management ✅ Expense tracking with categories ✅ Receipt upload for expenses ✅ Subscription tracking (monthly/annual) ✅ Financial reporting with date ranges ✅ Year-to-date financial dashboard ✅ Monthly financial breakdowns ✅ Overdue invoice alerts ✅ Cash flow warnings ✅ Tax calculations (20% estimate)
Calendar & Timeline Features
✅ Interactive month/week/day calendar views ✅ Drag-and-drop scheduling ✅ Project end date display ✅ Task due date display ✅ Timeline event scheduling ✅ Invoice due date tracking ✅ Feature request scheduling ✅ Color-coded item types ✅ Today and tomorrow views ✅ Monthly timeline overview ✅ Timeline progress charts ✅ Milestone completion tracking ✅ Optimistic UI updates ✅ Error rollback on API failures ✅ Touch-enabled mobile drag-and-drop ✅ Timezone-aware date handling
Document & File Management Features
✅ General document uploads ✅ Project-specific file storage ✅ Financial document management ✅ Expense receipt attachments ✅ File type validation ✅ File size limits ✅ Document search and filtering ✅ File preview and download ✅ Drag-and-drop file upload ✅ Multiple file format support ✅ Secure file access control ✅ Document associations (project/task/expense) ✅ File metadata storage ✅ Human-readable file sizes
Communication & Notification Features
✅ Gmail API integration ✅ Invoice email with PDF attachments ✅ Multi-recipient support (To/CC/BCC) ✅ Daily morning manifest emails ✅ Daily afternoon manifest emails ✅ Email customization (subject, body) ✅ Batch email sending ✅ In-app toast notifications ✅ Closeable help notifications ✅ User notification preferences ✅ Manual email triggers ✅ Email validation ✅ Email testing utilities ✅ OAuth2 secure authentication ✅ Rate limiting protection
User & Team Management Features
✅ User registration and authentication ✅ Password hashing (bcryptjs) ✅ JWT-based sessions ✅ Three-tier role system (ADMIN, USER, VIEWER) ✅ User profile management ✅ Team member listing ✅ Add/edit/delete users (Admin) ✅ Enable/disable user accounts ✅ Self-service profile editing ✅ Notification preference management ✅ Appearance/branding settings ✅ Logo and icon uploads ✅ Theme color customization ✅ Project member roles ✅ Task assignments ✅ Collaboration features (comments, time entries) ✅ Role-based permissions ✅ Account activation control
Integration & Automation Features
✅ Cross-feature calendar aggregation ✅ Automated daily email manifests ✅ Invoice-client relationships ✅ Expense-receipt associations ✅ Project-task-comment chains ✅ Document-entity linking ✅ User preference persistence ✅ Real-time UI updates ✅ Optimistic rendering ✅ Error handling and rollback ✅ Toast feedback system ✅ Help mode documentation ✅ Cron job scheduling ✅ API token authentication
Mobile & Responsive Features
✅ Responsive layouts (mobile, tablet, desktop) ✅ Mobile card views ✅ Desktop table views ✅ Touch-enabled drag-and-drop ✅ Mobile-optimized forms ✅ Swipe-to-dismiss notifications ✅ Adaptive navigation ✅ Mobile-friendly buttons ✅ Responsive calendar views ✅ Collapsible sections
Security Features
✅ Session-based authentication ✅ Password encryption ✅ JWT token security ✅ Role-based access control ✅ User ownership validation ✅ File type validation ✅ Email validation ✅ CSRF protection (NextAuth) ✅ SQL injection prevention (Prisma) ✅ XSS protection ✅ Rate limiting (email) ✅ Bearer token authentication (cron) ✅ Secure file storage ✅ Path traversal prevention
Feature Count Summary
Total Major Feature Categories: 6
- Project & Task Management
- Financial Management
- Calendar & Timeline
- Document & File Management
- Communication & Notifications
- User & Team Management
Total Individual Features: 150+
Total API Endpoints: 50+
Total Database Models: 25+
Total UI Components: 100+
Application Benefits
This comprehensive project planning application provides:
- Centralized Project Management - All projects, tasks, and milestones in one place
- Financial Control - Complete invoice, expense, and client management
- Visual Planning - Interactive calendar with drag-and-drop scheduling
- Document Organization - Secure file storage with project/task associations
- Automated Communication - Email integration for invoices and daily summaries
- Team Collaboration - Multi-user access with role-based permissions
- Real-time Updates - Optimistic UI with immediate feedback
- Mobile Accessibility - Responsive design for all devices
- Customization - Appearance settings and notification preferences
- Security - Role-based access control and secure authentication
End of Documentation
This documentation covers all major features and capabilities of the SalesField Network Project Planning Application as of February 15, 2026.