Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartTeams: High-Performance Workspace Intelligence

🚀 Introduction

SmartTeams is a state-of-the-art, cloud-native Task Management system designed for high-performance teams. Built with a focus on Real-time Synchronicity and AI-Driven Analytics, it provides a seamless interface for Administrators to manage workflows and Employees to track their daily productivity.


image

🛠️ Technology Stack

The application leverages a modern, scalable stack to ensure sub-second latency and a premium user experience:

  • Frontend Core: React 18 with TypeScript for type-safe, component-driven development.
  • Styling Engine: Tailwind CSS with custom HSL color tokens for a deep-glassmorphic aesthetic.
  • Backend & Database: Supabase (PostgreSQL) for RLS-secured data storage and Real-time Postgres Changes.
  • AI Intelligence: Google Gemini 1.5 Flash (v1beta) via the Generative Language API.
  • Icons & Visuals: Lucide-React for consistent, high-fidelity iconography.
  • Date Handling: Date-fns for precise time-zone aware scheduling.

🎨 UI/UX Design Rationale

The "Glassmorphic" Approach

We implemented a Glassmorphic Design System to create a sense of depth and hierarchy.

  • Visual Clarity: Using backdrop-blur-2xl and bg-white/10 allows for an "Information Density" layout that doesn't feel cluttered.
  • Dynamic Interaction: Every button includes active:scale-[0.98] and hover:scale-[1.02] transforms to provide immediate haptic-like visual feedback.
  • Color Psychology: The palette uses a high-contrast Mint Green (Success) and Deep Orange (Action) to guide the user's attention to critical tasks (overdue/urgent).

🔐 Secure-by-Default Landing Logic

When published on Render, the application is designed to land users directly on the Authentication Page. This is a deliberate security implementation using React Router Guards and Supabase Auth. Upon initial load, the system checks for an active session; if unauthenticated, it triggers an immediate redirect to /login. This "Auth-First" architecture ensures that sensitive workspace intelligence and team analytics are never exposed to unauthorized visitors, maintaining professional-grade security for the entire SmartTeams ecosystem.


🏗️ System Design & Software Engineering (SE)

Architectural Patterns

  1. Observer Pattern (Real-time): Using Supabase PostgreSQL Channels to broadcast changes instantly to all connected clients without polling.
  2. Singleton Pattern: The Supabase client is instantiated as a singleton in lib/supabase.ts to manage connection pooling efficiently.
  3. Role-Based Access Control (RBAC): Strict permission guards in Dashboard.tsx and MyTasks.tsx ensure that only owners or Admins can modify sensitive task data.

Function & Method Logic

  • All core logic (Auth, Task Fetching, AI processing) is encapsulated in dedicated hooks or library files.
  • Comments & Docstrings: Every major function follows the /** ... */ JSDoc standard to facilitate developer onboarding and maintainability.

📊 New Implementations & Features

  • Zyricon AI Co-pilot: A real-time context-aware chatbot that "sees" your workspace data to provide instant progress reports.
  • Work Session Tracker: A persistent, localStorage-backed timer that continues tracking work even after a browser refresh.
  • Circular Analytics Hub: A custom SVG-driven progress ring that provides visual completion metrics.
  • Onboarding Success Modal: A professional "Waiting for Approval" flow that secures the workspace from unauthorized access.

🗄️ Database Schema

The database uses a relational PostgreSQL schema with specific focus on data integrity:

  • Profiles Table: Extends Auth metadata with role, avatar_url (Base64), and is_approved flags.
  • Tasks Table: Linked via assigned_to and created_by foreign keys, secured with RLS policies to prevent data leakage between users.

🧪 Testing & Verification

Manual & Unit Verification

  • DevTools Debugging: Verified React state transitions and component re-renders using React Developer Tools.
  • Network Validation: Monitored Supabase WebSocket frames in the Network tab to ensure real-time sync latency is below 100ms.
  • Role Validation: Successfully tested "Admin-only" delete and approval features by switching between restricted and elevated user profiles.
  • Unit Logic: Verified the isBefore date logic for the "Urgent Task" notification triggers.
image

🧩 Technical Challenges & Solutions

1. Single Page Application (SPA) Routing Persistence

  • The Problem: Users encountered 404 errors when refreshing sub-pages (like /login or /dashboard) on Render/Vercel because the server looked for physical files instead of directing to index.html.
  • The Solution: Implemented Infrastructure as Code (IaC) by adding render.yaml and vercel.json with explicit rewrite rules (/*/index.html), ensuring the React Router handles all sub-paths seamlessly.

2. Strict Production Build Compliance

  • The Problem: Deployment pipelines (Vercel/Render) failed build steps due to strict TypeScript linting of unused declarations (TS6133).
  • The Solution: Performed a comprehensive code sanitization pass, removing over 25+ unused imports and variables, resulting in a zero-warning, 100% compliant production bundle.

3. Real-time Analytics Engine

  • The Problem: Traditional polling created unnecessary network overhead and delayed data visualization.
  • The Solution: Designed a WebSocket-driven listener system that binds Supabase Postgres changes directly to custom SVG progress rings, enabling instant dashboard updates without page reloads.

4. Cross-Refresh Work Persistence

  • The Problem: Session timers were resetting to zero upon browser refresh, leading to inaccurate work logs.
  • The Solution: Engineered a "Timestamp Resume" logic. Instead of saving raw seconds, we store the start unix-timestamp in localStorage. On mount, the application calculates Date.now() - startTime to resume the timer with millisecond precision.

📦 Versioning

  • Current Version: 1.0.0-Stable
  • Deployment: Automated via render.yaml and vercel.json.
  • Stability: Verified Build & Runtime (0 Errors).

About

SmartTeams is a state-of-the-art, cloud-native Task Management system designed for high-performance teams. Built with a focus on Real-time Synchronicity and AI-Driven Analytics, it provides a seamless interface for Administrators to manage workflows and Employees to track their daily productivity.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages