Skip to content

Repository files navigation

๐Ÿข WorkNest Client

Modern Multi-Tenant ERP Frontend for SaaS Companies

A production-ready enterprise workspace built with React, TypeScript, Vite, and Tailwind CSS, designed for modern organizations that require scalable multi-tenant architecture, role-based access control, realtime collaboration, and a beautiful user experience.


๐Ÿš€ One Frontend. Unlimited Companies.

WorkNest Client provides a complete SaaS workspace where every organization operates securely within its own isolated tenant while sharing a single application instance.

Designed with enterprise scalability, modern UI/UX, and clean architecture principles.


โœจ Overview

WorkNest Client is the frontend application of the WorkNest Multi-Tenant ERP Platform.

It delivers a modern workspace where employees, managers, HR teams, tenant administrators, and platform administrators collaborate through a single application while maintaining complete tenant isolation.

Unlike traditional ERP systems that require individual deployments per organization, WorkNest follows a Software-as-a-Service (SaaS) architecture where multiple organizations securely share one platform without exposing each other's data.

The frontend communicates with the Spring Boot backend through secure REST APIs and WebSocket connections, providing real-time collaboration, authentication, analytics, notifications, and business operations.


๐ŸŒŸ Why WorkNest?

Modern businesses require far more than simple employee management.

WorkNest combines all essential workplace operations into one integrated platform.

โœ” Employee Management

โœ” Team Collaboration

โœ” Project Management

โœ” Task Boards

โœ” Attendance Tracking

โœ” Leave Management

โœ” HR Operations

โœ” Internal Announcements

โœ” Real-time Notifications

โœ” Team Chat

โœ” Analytics & Reports

โœ” Multi-Tenant Administration

All while maintaining enterprise-grade security and tenant isolation.


๐Ÿ“ธ Screenshots

Coming Soon

The following screenshots will be added to demonstrate the application's interface.

docs/
โ””โ”€โ”€ screenshots/
    โ”œโ”€โ”€ dashboard.png
    โ”œโ”€โ”€ employees.png
    โ”œโ”€โ”€ projects.png
    โ”œโ”€โ”€ kanban.png
    โ”œโ”€โ”€ announcements.png
    โ”œโ”€โ”€ notifications.png
    โ”œโ”€โ”€ analytics.png
    โ”œโ”€โ”€ reports.png
    โ”œโ”€โ”€ chat.png
    โ”œโ”€โ”€ profile.png
    โ”œโ”€โ”€ settings.png
    โ””โ”€โ”€ mobile.png

๐ŸŽฏ Key Features

๐Ÿ‘ฅ Employee Management

Manage the complete employee lifecycle from onboarding to profile management.

  • Employee Directory
  • Departments
  • Designations
  • Employment Status
  • Profile Management
  • Avatar Uploads
  • Contact Information

๐Ÿ“ Project Management

Manage projects from planning to completion.

  • Create Projects
  • Assign Members
  • Progress Tracking
  • Deadlines
  • Status Management
  • Attachments
  • Project Analytics

โœ… Kanban Task Management

Modern drag-and-drop task boards.

Features include:

  • Backlog
  • Todo
  • In Progress
  • Review
  • Testing
  • Done

Each task supports

  • Priority
  • Assignee
  • Due Dates
  • Attachments
  • Comments
  • Activity Timeline

๐Ÿ’ฌ Realtime Chat

Built-in messaging system.

Supports

  • Team Conversations
  • Direct Messaging
  • Live Delivery
  • Typing Indicators
  • Read Status
  • File Sharing (roadmap)

Powered by STOMP over WebSocket.


๐Ÿ”” Notifications

Receive instant updates for

  • Task Assignments
  • Leave Requests
  • Announcements
  • Team Updates
  • Project Changes
  • Chat Messages
  • System Events

๐Ÿ“ข Announcements

Organization-wide communication.

Supports

  • Rich Content
  • Pinning
  • Scheduling (roadmap)
  • Permission-based Editing
  • Company Visibility

๐Ÿ“Š Analytics

Interactive dashboards including

  • Employee Statistics
  • Attendance Trends
  • Leave Analytics
  • Project Progress
  • Task Completion
  • Organization KPIs

๐Ÿข Multi-Tenant SaaS

Every company operates independently.

Each tenant has

  • Users
  • Employees
  • Teams
  • Projects
  • Tasks
  • Notifications
  • Storage
  • Reports

All isolated from every other organization.


๐Ÿ›  Technology Stack

Layer Technology
Framework React 19
Language TypeScript
Build Tool Vite
Styling Tailwind CSS v4
Routing React Router
State Management Zustand
Data Fetching TanStack Query
HTTP Client Axios
Icons Lucide React
Forms React Hook Form
Validation Zod
Realtime STOMP over WebSocket
Charts Recharts
File Upload Multipart Uploads
Authentication JWT
Storage Supabase (Backend Managed)
Deployment Docker + Nginx + Dokploy
Testing Vitest + Testing Library

๐Ÿ— System Architecture

                   Browser
                       โ”‚
                       โ”‚
                       โ–ผ
             React + TypeScript
                       โ”‚
                       โ”‚
              React Router + Layouts
                       โ”‚
                       โ–ผ
          TanStack Query + Zustand
                       โ”‚
                       โ–ผ
                 Axios Client
                       โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚                             โ”‚
        โ–ผ                             โ–ผ
 REST API Requests            WebSocket (STOMP)
        โ”‚                             โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ–ผ
             Spring Boot Backend
                       โ”‚
                       โ–ผ
              Multi-Tenant MySQL
                       โ”‚
                       โ–ผ
            Supabase Object Storage

๐ŸŽจ Design Philosophy

WorkNest follows several core UI principles.

Modern

A clean interface inspired by today's leading SaaS platforms.


Fast

Lazy-loaded pages and optimized rendering ensure excellent performance.


Consistent

Shared design tokens maintain consistency across every module.


Responsive

Designed for desktops, tablets, and mobile devices.


Accessible

Keyboard navigation, semantic HTML, and accessible components are used wherever possible.


๐Ÿš€ Core Modules

Module Status
Dashboard โœ…
Authentication โœ…
Employees โœ…
Teams โœ…
Projects โœ…
Tasks โœ…
Attendance โœ…
Leave โœ…
Chat โœ…
Notifications โœ…
Announcements โœ…
Reports โœ…
Analytics โœ…
Settings โœ…
Platform Console โœ…

๐Ÿ“ฆ Repository

WorkNest-Client
โ”‚
โ”œโ”€โ”€ React 19
โ”œโ”€โ”€ TypeScript
โ”œโ”€โ”€ Vite
โ”œโ”€โ”€ Tailwind CSS
โ”œโ”€โ”€ Zustand
โ”œโ”€โ”€ TanStack Query
โ”œโ”€โ”€ STOMP WebSocket
โ””โ”€โ”€ Docker Ready

๐Ÿ“‚ Project Structure

WorkNest follows a feature-first architecture that separates business domains from shared infrastructure. Each module owns its own components, pages, services, hooks, and types, making the codebase scalable and easier to maintain.

src
โ”‚
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ layouts/
โ”‚   โ”œโ”€โ”€ providers/
โ”‚   โ”œโ”€โ”€ router/
โ”‚   โ”œโ”€โ”€ guards/
โ”‚   โ””โ”€โ”€ App.tsx
โ”‚
โ”œโ”€โ”€ assets/
โ”‚   โ”œโ”€โ”€ images/
โ”‚   โ”œโ”€โ”€ icons/
โ”‚   โ””โ”€โ”€ illustrations/
โ”‚
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ common/
โ”‚   โ”œโ”€โ”€ layout/
โ”‚   โ”œโ”€โ”€ ui/
โ”‚   โ”œโ”€โ”€ forms/
โ”‚   โ”œโ”€โ”€ feedback/
โ”‚   โ””โ”€โ”€ navigation/
โ”‚
โ”œโ”€โ”€ hooks/
โ”‚
โ”œโ”€โ”€ modules/
โ”‚   โ”œโ”€โ”€ analytics/
โ”‚   โ”œโ”€โ”€ announcements/
โ”‚   โ”œโ”€โ”€ attendance/
โ”‚   โ”œโ”€โ”€ auth/
โ”‚   โ”œโ”€โ”€ chat/
โ”‚   โ”œโ”€โ”€ dashboard/
โ”‚   โ”œโ”€โ”€ employees/
โ”‚   โ”œโ”€โ”€ leave/
โ”‚   โ”œโ”€โ”€ notifications/
โ”‚   โ”œโ”€โ”€ platform/
โ”‚   โ”œโ”€โ”€ profile/
โ”‚   โ”œโ”€โ”€ projects/
โ”‚   โ”œโ”€โ”€ reports/
โ”‚   โ”œโ”€โ”€ settings/
โ”‚   โ”œโ”€โ”€ tasks/
โ”‚   โ””โ”€โ”€ teams/
โ”‚
โ”œโ”€โ”€ services/
โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”œโ”€โ”€ auth/
โ”‚   โ”œโ”€โ”€ realtime/
โ”‚   โ”œโ”€โ”€ uploads/
โ”‚   โ””โ”€โ”€ storage/
โ”‚
โ”œโ”€โ”€ store/
โ”‚
โ”œโ”€โ”€ styles/
โ”‚
โ”œโ”€โ”€ types/
โ”‚
โ”œโ”€โ”€ utils/
โ”‚
โ””โ”€โ”€ main.tsx

๐Ÿ› Architecture Overview

The client follows a layered architecture to separate presentation, business logic, infrastructure, and shared utilities.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚        React Pages          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚    Feature Components       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚     Custom Hooks            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Feature Services / Queries  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Axios API Client            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
              โ–ผ
       Spring Boot Backend

Each layer has a single responsibility and communicates only with the layer directly below it.


๐Ÿงฉ Module-Based Development

Instead of grouping files by type, WorkNest groups them by business domain.

Example:

modules/
โ””โ”€โ”€ employees/
    โ”œโ”€โ”€ components/
    โ”œโ”€โ”€ hooks/
    โ”œโ”€โ”€ pages/
    โ”œโ”€โ”€ services/
    โ”œโ”€โ”€ types/
    โ”œโ”€โ”€ utils/
    โ””โ”€โ”€ index.ts

Benefits:

  • High cohesion
  • Better scalability
  • Easier onboarding
  • Independent feature evolution
  • Reduced coupling

๐Ÿ” Authentication

Authentication is handled using JWT access and refresh tokens.

Login Flow

User
 โ”‚
 โ”‚ Login
 โ–ผ
React Form
 โ”‚
 โ–ผ
Axios Client
 โ”‚
 โ–ผ
Spring Boot API
 โ”‚
 โ–ผ
Validate Credentials
 โ”‚
 โ–ผ
Access Token
Refresh Token
User Details
 โ”‚
 โ–ผ
Frontend Session

After authentication:

  • User profile is loaded
  • Permissions are resolved
  • Tenant information is initialized
  • Navigation is generated dynamically

๐Ÿ”„ Session Lifecycle

Application Starts
        โ”‚
        โ–ผ
Check Existing Session
        โ”‚
        โ–ผ
Access Token Valid?
     โ”‚         โ”‚
     โ”‚         โ”‚
    Yes       No
     โ”‚         โ”‚
     โ”‚         โ–ผ
     โ”‚   Refresh Token
     โ”‚         โ”‚
     โ”‚         โ–ผ
     โ”‚  New Access Token
     โ”‚
     โ–ผ
Continue Application

If refresh fails:

Clear Session
        โ”‚
        โ–ผ
Redirect Login

๐Ÿ›ก Authorization

WorkNest uses Permission-Based Authorization instead of relying only on user roles.

Every page, button, menu item, API request, and action is validated against permissions.

User
 โ”‚
 โ–ผ
Permissions
 โ”‚
 โ–ผ
PermissionGuard
 โ”‚
 โ–ผ
Page Visible?
 โ”‚
 โ”œโ”€โ”€ Yes
 โ”‚
 โ””โ”€โ”€ No
        โ”‚
        โ–ผ
Unauthorized Screen

๐Ÿ‘ฅ Supported Roles

Role Description
PLATFORM_ADMIN Platform management
TENANT_ADMIN Company administration
HR Human resource operations
MANAGER Team management
EMPLOYEE Daily workspace access

๐Ÿ”‘ Permission System

Permissions are more granular than roles.

Examples include:

  • Employee.Read

  • Employee.Create

  • Employee.Update

  • Employee.Delete

  • Project.Read

  • Project.Manage

  • Announcement.Manage

  • Team.Manage

  • Attendance.View

This enables flexible tenant-specific access policies.


๐Ÿข Multi-Tenant Architecture

WorkNest is built around complete tenant isolation.

                    WorkNest Platform
                           โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚                  โ”‚                  โ”‚
        โ–ผ                  โ–ผ                  โ–ผ
     Company A         Company B         Company C
        โ”‚                  โ”‚                  โ”‚
 Employees          Employees         Employees
 Projects           Projects          Projects
 Tasks              Tasks             Tasks
 Chat               Chat              Chat
 Reports            Reports           Reports

Each tenant operates independently while sharing the same frontend application.


๐Ÿงญ Routing Architecture

The application is divided into three major route groups.

/
โ”‚
โ”œโ”€โ”€ Public
โ”‚
โ”œโ”€โ”€ Authentication
โ”‚
โ”œโ”€โ”€ Tenant Workspace
โ”‚
โ””โ”€โ”€ Platform Console

Example:

/

/login

/register

/reset-password

/app/dashboard

/app/employees

/app/projects

/app/tasks

/app/chat

/app/reports

/platform/dashboard

/platform/tenants

/platform/users

๐Ÿšช Route Guards

Routes are protected using dedicated guard components.

Request Route
      โ”‚
      โ–ผ
Authentication Guard
      โ”‚
      โ–ผ
Permission Guard
      โ”‚
      โ–ผ
Tenant Guard
      โ”‚
      โ–ผ
Page

This prevents unauthorized content from rendering.


๐ŸŒ API Communication

All backend communication passes through a centralized Axios client.

Responsibilities include:

  • Base URL configuration
  • JWT injection
  • Tenant header injection
  • Automatic token refresh
  • Error normalization
  • Request retries
  • File uploads
  • Download helpers

๐Ÿ”„ API Flow

React Component
       โ”‚
       โ–ผ
Feature Service
       โ”‚
       โ–ผ
Axios Instance
       โ”‚
       โ–ผ
Request Interceptors
       โ”‚
       โ–ผ
Spring Boot API
       โ”‚
       โ–ผ
Response Interceptors
       โ”‚
       โ–ผ
TanStack Query
       โ”‚
       โ–ผ
React UI

๐Ÿ“ฆ State Management

WorkNest uses Zustand for lightweight global state.

Examples include:

  • Authentication
  • Current User
  • Active Tenant
  • Theme
  • Notifications
  • Sidebar State
  • Preferences

Feature-specific server state is managed with TanStack Query, keeping API data synchronized with the backend.


โšก Data Fetching

TanStack Query provides:

  • Automatic caching
  • Background refetching
  • Loading states
  • Error handling
  • Request deduplication
  • Optimistic updates (where applicable)
  • Mutation management

This significantly reduces boilerplate while improving responsiveness.


๐Ÿง  Custom Hooks

The application exposes reusable hooks for common functionality.

Examples include:

useAuth()

useCurrentUser()

usePermission()

useTheme()

useNotifications()

useRealtime()

useDebounce()

usePagination()

usePageTitle()

These hooks encapsulate reusable logic and keep components focused on rendering.


๐Ÿ“š Design Principles

WorkNest follows these engineering principles throughout the frontend:

  • Feature-first architecture
  • Separation of concerns
  • Composition over inheritance
  • Reusable UI primitives
  • Strong typing with TypeScript
  • Centralized API communication
  • Predictable state management
  • Lazy-loaded modules
  • Permission-driven rendering
  • Clean and maintainable codebase

โšก Realtime Architecture

WorkNest provides a realtime experience for collaboration, communication, and operational awareness.

The frontend communicates with the backend using native WebSockets with the STOMP protocol, allowing instant updates without polling.

Current realtime features include:

  • ๐Ÿ’ฌ Team Chat
  • ๐Ÿ”” Live Notifications
  • ๐Ÿ“ข Announcement Events
  • ๐Ÿ“‹ Task Updates
  • ๐Ÿ‘ฅ Presence (Roadmap)
  • โœ๏ธ Typing Indicators (Roadmap)
  • ๐Ÿ“ Live File Events (Roadmap)

๐Ÿ›ฐ Realtime Architecture

                     Browser
                        โ”‚
                        โ–ผ
              STOMP Client Service
                        โ”‚
                        โ–ผ
                Native WebSocket
                        โ”‚
                        โ–ผ
               Spring Boot Backend
                        โ”‚
              Simple Message Broker
                        โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚               โ”‚                โ”‚
        โ–ผ               โ–ผ                โ–ผ
   Notifications      Chat          Task Events

The client maintains a single WebSocket connection and subscribes to multiple STOMP destinations depending on the authenticated user and active tenant.


๐Ÿ’ฌ Chat System

The chat module enables real-time communication between team members.

Current capabilities include:

  • Team conversations
  • Direct messaging
  • Live message delivery
  • Automatic reconnection
  • Message history
  • Read status
  • Attachment-ready architecture

Future enhancements:

  • Voice messages
  • Emoji reactions
  • Message editing
  • Message deletion synchronization
  • Online presence
  • Typing indicators
  • File previews

Chat Flow

User Types Message
        โ”‚
        โ–ผ
React Component
        โ”‚
        โ–ผ
Chat Service
        โ”‚
        โ–ผ
STOMP SEND
        โ”‚
        โ–ผ
Spring Boot
        โ”‚
        โ–ผ
Broker
        โ”‚
        โ–ผ
Subscribed Clients
        โ”‚
        โ–ผ
React UI Updates

๐Ÿ”” Notification System

Notifications are system-generated events triggered by backend business logic.

Examples:

  • New task assigned
  • Leave approved
  • Leave rejected
  • Announcement published
  • Project updated
  • Team invitation
  • Password changed
  • Employee onboarded

Notifications are delivered instantly over WebSocket and displayed within the application's notification center.


Notification Flow

Backend Event
      โ”‚
      โ–ผ
Notification Service
      โ”‚
      โ–ผ
STOMP Topic
      โ”‚
      โ–ผ
Frontend Subscription
      โ”‚
      โ–ผ
Notification Store
      โ”‚
      โ–ผ
Notification Center

๐Ÿ“ File Upload System

WorkNest follows a backend-mediated upload architecture.

The browser never communicates directly with object storage.

Instead, uploads flow through the backend to ensure validation, authorization, and centralized storage management.


Upload Architecture

User
 โ”‚
 โ–ผ
Choose File
 โ”‚
 โ–ผ
React Upload Component
 โ”‚
 โ–ผ
Axios Multipart Request
 โ”‚
 โ–ผ
Spring Boot Upload API
 โ”‚
 โ–ผ
Supabase Storage
 โ”‚
 โ–ผ
Metadata Returned
 โ”‚
 โ–ผ
Database Record Updated

Supported upload types include:

  • Profile images
  • Leave documents
  • Project attachments
  • Task attachments
  • Organization logos
  • Future media uploads

๐Ÿชฃ Storage Integration

The frontend is storage-provider agnostic.

It never embeds storage credentials or bucket logic.

Instead, it consumes URLs returned by the backend.

Benefits:

  • Storage provider can change without frontend changes
  • Better security
  • Consistent upload validation
  • Centralized access control
  • Simplified browser code

Current production target:

  • Supabase Storage

Future supported providers:

  • Amazon S3
  • Cloudflare R2
  • MinIO
  • Azure Blob Storage

๐ŸŒ Environment Configuration

WorkNest uses Vite environment variables for runtime configuration.

Example:

VITE_API_BASE_URL=http://localhost:8080

VITE_WS_URL=ws://localhost:8080/ws

VITE_REALTIME_DISABLED=false

VITE_CHAT_TOPICS=/topic/chat.global,/user/queue/chat

VITE_NOTIFICATIONS_TOPICS=/topic/notifications.global,/user/queue/notifications

Production Example

VITE_API_BASE_URL=https://api.worknest.example

VITE_WS_URL=wss://api.worknest.example/ws

VITE_REALTIME_DISABLED=false

Never expose secrets inside VITE_* variables.

The frontend should never contain:

  • Database passwords
  • JWT signing keys
  • SMTP credentials
  • Service-role keys
  • Cloud provider secrets

โš™ Runtime Configuration

The frontend supports runtime configuration without rebuilding Docker images.

Configuration values are injected through a generated runtime configuration file, allowing deployments to update API endpoints and related settings without creating a new frontend build.

Typical runtime settings include:

  • API Base URL
  • WebSocket URL
  • Feature Flags
  • Environment Name

๐Ÿณ Docker Support

The frontend is fully containerized.

Production image stack:

Node.js
     โ”‚
npm build
     โ”‚
Vite Production Build
     โ”‚
Static Assets
     โ”‚
Nginx

Docker Architecture

Docker Build
      โ”‚
      โ–ผ
Node Builder Stage
      โ”‚
      โ–ผ
npm install
      โ”‚
      โ–ผ
npm run build
      โ”‚
      โ–ผ
dist/
      โ”‚
      โ–ผ
Nginx Runtime Image

Benefits:

  • Small production image
  • Fast startup
  • Static asset serving
  • Efficient caching
  • Easy deployment

๐Ÿ–ฅ Local Development

Install dependencies

npm install

Start development server

npm run dev

Default development server:

http://localhost:5173

Production build

npm run build

Preview production build

npm run preview

Lint

npm run lint

Run Tests

npm test

or

npm run test:run

๐Ÿ“ฆ Build Pipeline

Git Pull
    โ”‚
    โ–ผ
npm install
    โ”‚
    โ–ผ
TypeScript Compile
    โ”‚
    โ–ผ
Vite Production Build
    โ”‚
    โ–ผ
Static Assets Generated
    โ”‚
    โ–ผ
Docker Image
    โ”‚
    โ–ผ
Nginx

๐Ÿš€ Deployment Targets

The frontend has been designed to deploy consistently across multiple platforms.

Supported deployment targets include:

Platform Status
Docker โœ…
Dokploy โœ…
Nginx โœ…
Vercel โœ…
Netlify โœ…
Azure Static Web Apps โœ…
GitHub Pages (static only) โœ…

๐Ÿ”ง Recommended Development Tools

For the best development experience, the following tools are recommended:

Tool Purpose
Visual Studio Code Editor
Node.js 20+ Runtime
npm Package Manager
Docker Desktop Containers
Postman API Testing
Chrome DevTools Debugging
React Developer Tools Component Inspection

๐Ÿ“ˆ Development Workflow

Feature Branch
      โ”‚
      โ–ผ
Development
      โ”‚
      โ–ผ
Code Review
      โ”‚
      โ–ผ
Testing
      โ”‚
      โ–ผ
Production Build
      โ”‚
      โ–ผ
Docker Image
      โ”‚
      โ–ผ
Dokploy Deployment

๐Ÿ’ก Engineering Goals

The frontend is designed around the following engineering principles:

  • Clean Architecture
  • Component Reusability
  • Feature Isolation
  • Strong Type Safety
  • Responsive UI
  • Accessibility
  • Maintainability
  • Scalability
  • Performance
  • Enterprise Readiness

๐Ÿš€ Production Deployment

WorkNest Client is designed to be deployed as a stateless frontend application behind a reverse proxy.

The recommended production stack is:

                 Internet
                     โ”‚
                     โ–ผ
              Traefik / Nginx
                     โ”‚
                     โ–ผ
              WorkNest Client
             (React + Nginx)
                     โ”‚
        HTTPS REST & WebSocket
                     โ”‚
                     โ–ผ
          WorkNest Spring Backend
                     โ”‚
                     โ–ผ
            Multi-Tenant MySQL

The frontend does not communicate directly with the database or object storage. Every request flows through the backend API.


๐Ÿณ Docker Deployment

The application is distributed as a lightweight Docker container.

Production container:

Node.js
     โ”‚
     โ–ผ
npm install
     โ”‚
     โ–ผ
npm run build
     โ”‚
     โ–ผ
Static Assets
     โ”‚
     โ–ผ
Nginx

The final runtime image only contains static files and Nginx.

No Node.js runtime is required in production.


๐Ÿ“ฆ Production Build

Generate an optimized production bundle.

npm install

npm run build

Preview locally:

npm run preview

Output:

dist/

This directory is copied into the production Nginx image.


๐ŸŒ Deployment Platforms

WorkNest Client has been designed to run on multiple hosting platforms.

Platform Supported
Dokploy โœ…
Docker โœ…
Nginx โœ…
Vercel โœ…
Netlify โœ…
Azure Static Web Apps โœ…
GitHub Pages* โœ…

GitHub Pages is suitable only for static deployments and requires API endpoints to be publicly accessible.


๐Ÿšข Dokploy Deployment

Recommended production deployment:

GitHub Repository
        โ”‚
        โ–ผ
Dokploy
        โ”‚
        โ–ผ
Docker Build
        โ”‚
        โ–ผ
Nginx Container
        โ”‚
        โ–ผ
Traefik
        โ”‚
        โ–ผ
HTTPS

Typical deployment process:

  1. Connect the GitHub repository.
  2. Configure environment variables.
  3. Deploy the application.
  4. Assign a domain.
  5. Enable HTTPS.
  6. Verify runtime configuration.

๐ŸŒ Runtime Environment

Instead of rebuilding for every environment, WorkNest supports runtime configuration.

Typical production configuration:

VITE_API_BASE_URL=https://api.worknest.com

VITE_WS_URL=wss://api.worknest.com/ws

VITE_REALTIME_DISABLED=false

The frontend reads these values during startup, allowing the same Docker image to be reused across environments.


๐Ÿ”„ Request Lifecycle

Browser
   โ”‚
   โ–ผ
React Component
   โ”‚
   โ–ผ
Axios Client
   โ”‚
   โ–ผ
JWT Interceptor
   โ”‚
   โ–ผ
HTTPS Request
   โ”‚
   โ–ผ
Spring Boot API
   โ”‚
   โ–ผ
JSON Response
   โ”‚
   โ–ผ
TanStack Query Cache
   โ”‚
   โ–ผ
React UI

๐Ÿ” Security

Security is built into every layer of the frontend.

Authentication

โœ” JWT Authentication

โœ” Automatic Session Restoration

โœ” Token Refresh

โœ” Route Protection


Authorization

Permission-based UI rendering.

Every page validates:

  • Authentication
  • Active Tenant
  • Permissions
  • Feature Access

Unauthorized pages never render protected content.


API Protection

The frontend automatically:

  • Attaches Bearer Tokens
  • Adds Tenant Headers
  • Refreshes expired sessions
  • Handles unauthorized responses
  • Normalizes API errors

Storage Security

Uploads are always backend-mediated.

The frontend never contains:

โŒ Database Passwords

โŒ SMTP Credentials

โŒ JWT Signing Keys

โŒ Storage Service Role Keys

Only public runtime configuration belongs inside the browser bundle.


โšก Performance Optimizations

WorkNest is optimized for enterprise-scale applications.

Current optimizations include:

โœ… Route-based code splitting

โœ… Lazy-loaded modules

โœ… Dynamic imports

โœ… Shared component reuse

โœ… React.memo where appropriate

โœ… Efficient state updates

โœ… TanStack Query caching

โœ… Request deduplication

โœ… Background refetching

โœ… Optimized production builds


๐Ÿ“ˆ Bundle Strategy

Application
      โ”‚
      โ–ผ
Route Splitting
      โ”‚
      โ–ผ
Lazy Components
      โ”‚
      โ–ผ
Shared Vendor Chunks
      โ”‚
      โ–ผ
Browser Cache

Only required JavaScript is downloaded when a page is visited.


๐Ÿง  Caching Strategy

The frontend uses TanStack Query to reduce unnecessary API requests.

Benefits include:

  • Automatic caching
  • Background synchronization
  • Optimistic updates
  • Request deduplication
  • Automatic retries
  • Cache invalidation

๐Ÿ“ฑ Responsive Design

WorkNest is responsive across modern devices.

Supported layouts:

Device Supported
Desktop โœ…
Laptop โœ…
Tablet โœ…
Mobile โœ…

Responsive techniques include:

  • CSS Grid
  • Flexbox
  • Responsive breakpoints
  • Adaptive navigation
  • Mobile-friendly layouts

๐ŸŒ Browser Support

Browser Status
Chrome โœ…
Edge โœ…
Firefox โœ…
Safari โœ…

Modern evergreen browsers are fully supported.


โ™ฟ Accessibility

WorkNest aims to provide an accessible user experience.

Features include:

  • Semantic HTML
  • Keyboard navigation
  • Visible focus indicators
  • Accessible form controls
  • Responsive typography
  • ARIA attributes where appropriate

Accessibility improvements will continue as the platform evolves.


๐ŸŽจ UI & UX Principles

The interface is designed around modern SaaS best practices.

Core principles:

  • Minimal visual clutter
  • Consistent spacing
  • Predictable navigation
  • Fast interactions
  • Responsive layouts
  • Smooth animations
  • Reusable design system
  • User-centered workflows

๐Ÿ“Š Monitoring & Error Handling

The frontend includes centralized error handling.

Capabilities:

  • API error normalization
  • Loading states
  • Empty states
  • Retry handling
  • Graceful fallbacks
  • Toast notifications
  • Authentication failure recovery

๐Ÿ”ฎ Future Enhancements

Planned improvements include:

  • Offline support
  • Progressive Web App (PWA)
  • Push Notifications
  • Theme customization
  • Multi-language support
  • Calendar integration
  • AI-powered insights
  • Advanced analytics
  • Real-time collaboration enhancements

๐Ÿ›ก Production Checklist

Before deploying to production, verify:

  • Environment variables configured
  • API endpoint uses HTTPS
  • WebSocket endpoint uses WSS
  • Production build succeeds
  • Runtime configuration verified
  • Backend is reachable
  • HTTPS certificate configured
  • Docker image built successfully
  • Health checks pass
  • Browser console is free of errors

๐Ÿงช Testing

WorkNest Client includes a modern testing setup to ensure application reliability and maintainability.

Testing Stack

Tool Purpose
Vitest Unit Testing
Testing Library Component Testing
jsdom Browser Environment
ESLint Static Analysis
TypeScript Type Safety

Running Tests

Run all tests:

npm test

Run tests once:

npm run test:run

Watch mode:

npm run test

Linting

Run ESLint:

npm run lint

Production Build Verification

Before every deployment:

npm install

npm run lint

npm run test:run

npm run build

The production build should complete without warnings or errors.


๐Ÿ“‹ Recommended Development Workflow

Issue
   โ”‚
   โ–ผ
Create Feature Branch
   โ”‚
   โ–ผ
Development
   โ”‚
   โ–ผ
Testing
   โ”‚
   โ–ผ
Code Review
   โ”‚
   โ–ผ
Merge
   โ”‚
   โ–ผ
Production Build
   โ”‚
   โ–ผ
Docker Image
   โ”‚
   โ–ผ
Deployment

๐ŸŒฑ Branch Strategy

Recommended Git workflow:

main
โ”‚
โ”œโ”€โ”€ develop
โ”‚
โ”œโ”€โ”€ feature/auth
โ”‚
โ”œโ”€โ”€ feature/chat
โ”‚
โ”œโ”€โ”€ feature/tasks
โ”‚
โ”œโ”€โ”€ feature/dashboard
โ”‚
โ””โ”€โ”€ hotfix/*

๐Ÿ“ฆ Release Strategy

Recommended versioning:

v1.0.0

v1.1.0

v1.2.0

v2.0.0

Semantic Versioning:

  • MAJOR โ€“ Breaking changes
  • MINOR โ€“ New features
  • PATCH โ€“ Bug fixes

๐Ÿ›ฃ Roadmap

The following improvements are planned for future releases.

User Experience

  • Personalized dashboards
  • Calendar integration
  • Drag-and-drop dashboard widgets
  • Dark mode enhancements
  • Theme customization
  • Multi-language support

Collaboration

  • Typing indicators
  • Voice messages
  • Video meetings
  • File previews
  • Presence indicators
  • Message reactions

Productivity

  • Calendar module
  • Meeting scheduling
  • Notes
  • Personal reminders
  • Recurring tasks
  • Task templates

Reporting

  • Interactive reports
  • Scheduled reports
  • PDF exports
  • Excel exports
  • Dashboard widgets
  • KPI customization

HR

  • Recruitment portal
  • Performance reviews
  • Training management
  • Asset management
  • Payroll integration
  • Employee onboarding wizard

Platform

  • Marketplace
  • Plugin system
  • Audit dashboards
  • API keys
  • Webhooks
  • Public APIs

๐Ÿค Contributing

Contributions are welcome.

If you would like to improve WorkNest:

  1. Fork the repository.
  2. Create a feature branch.
git checkout -b feature/new-feature
  1. Commit your changes.
git commit -m "Add new feature"
  1. Push your branch.
git push origin feature/new-feature
  1. Open a Pull Request.

Please ensure that:

  • Code is formatted consistently.
  • Tests pass.
  • The project builds successfully.
  • Documentation is updated when necessary.

๐Ÿ“– Documentation

Additional documentation may include:

docs/

โ”œโ”€โ”€ architecture/
โ”œโ”€โ”€ deployment/
โ”œโ”€โ”€ api/
โ”œโ”€โ”€ screenshots/
โ”œโ”€โ”€ assets/
โ”œโ”€โ”€ diagrams/
โ”œโ”€โ”€ contributing.md
โ”œโ”€โ”€ coding-standards.md
โ””โ”€โ”€ changelog.md

๐Ÿ“ท Screenshots

The following screenshots are recommended for this repository:

docs/screenshots/

dashboard.png

employees.png

projects.png

tasks.png

kanban.png

chat.png

notifications.png

analytics.png

reports.png

attendance.png

leave.png

settings.png

profile.png

platform-dashboard.png

tenant-management.png

mobile-dashboard.png

๐Ÿ“š Learning Resources

Useful technologies used in this project:

  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • Zustand
  • TanStack Query
  • Axios
  • WebSocket
  • STOMP
  • Docker
  • Nginx

๐Ÿ›ก Security Policy

If you discover a security vulnerability, please avoid opening a public issue.

Instead:

  • Contact the maintainers privately.
  • Include reproduction steps.
  • Provide logs if available.
  • Allow time for remediation before public disclosure.

๐Ÿ“„ License

This project is licensed under the MIT License.

See the LICENSE file for details.


๐Ÿ™ Acknowledgements

WorkNest is built using several outstanding open-source technologies.

Special thanks to the communities behind:

  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • TanStack Query
  • Zustand
  • Lucide
  • Axios
  • Docker
  • Nginx
  • Spring Boot
  • MySQL
  • Supabase

Without these projects, WorkNest would not be possible.


โญ Support the Project

If you find this project useful:

  • โญ Star the repository
  • ๐Ÿ› Report issues
  • ๐Ÿ’ก Suggest improvements
  • ๐Ÿ”€ Submit pull requests
  • ๐Ÿ“ข Share the project

Every contribution helps make WorkNest better.


๐Ÿ“ฌ Contact

For questions, feature requests, or collaboration:

  • Create a GitHub Issue
  • Open a GitHub Discussion
  • Submit a Pull Request

๐Ÿข WorkNest Client

Modern Multi-Tenant ERP Frontend

Built with โค๏ธ using

React โ€ข TypeScript โ€ข Vite โ€ข Tailwind CSS โ€ข Zustand โ€ข TanStack Query


Designed for scalable SaaS platforms with enterprise-grade architecture.

โญ If you like this project, consider giving it a star!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages