WorkSight is an employee well-being analytics platform built with Next.js and Supabase. This monorepo contains the web application, documentation, and shared packages.
worksight/
βββ apps/
β βββ web/ # Next.js web application
β βββ docs/ # VitePress documentation
βββ packages/ # Shared packages (future)
βββ .github/ # CI/CD workflows
- Node.js: v18+
- pnpm: v8+ (recommended package manager)
- Git: For version control
# Clone the repository
git clone https://github.com/4sightorg/worksight.git
cd worksight
# Install dependencies
pnpm install
# Set up environment variables
cp apps/web/env.example apps/web/.env.local
# Edit apps/web/.env.local with your Supabase credentials# Start the web application
pnpm dev:web
# Start the documentation site
pnpm dev:docs
# Start both applications
pnpm devOpen:
- Web App: http://localhost:3000
- Documentation: http://localhost:5173
# Development
pnpm dev # Start all applications
pnpm dev:web # Start web app only
pnpm dev:docs # Start docs only
# Building
pnpm build # Build all applications
pnpm build:web # Build web app only
pnpm build:docs # Build docs only
# Testing
pnpm test # Run all tests
pnpm test:web # Run web app tests
pnpm lint # Lint all code
pnpm type-check # TypeScript type checking
# Utilities
pnpm clean # Clean all build outputs
pnpm format # Format code with Prettier# Web application (apps/web)
cd apps/web
pnpm dev # Start development server
pnpm build # Build for production
pnpm start # Start production server
pnpm test # Run tests
pnpm test:watch # Run tests in watch mode
# Documentation (apps/docs)
cd apps/docs
pnpm dev # Start dev server
pnpm build # Build static site
pnpm preview # Preview production build- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS + shadcn/ui
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- State Management: React Server Components + Client Components
- Testing: Jest + React Testing Library
- Deployment: Vercel
- Framework: VitePress
- Language: TypeScript
- Styling: Default VitePress theme
- Deployment: GitHub Pages
- Package Manager: pnpm with workspaces
- Monorepo: Turbo for build orchestration
- Linting: ESLint + Prettier
- Type Checking: TypeScript
- Git Hooks: Husky (optional)
- CI/CD: GitHub Actions
- Web Application: worksight.vercel.app
- Documentation: worksight.github.io
-
Automatic Deployment:
- Push to
mainbranch triggers production deployment - Pull requests create preview deployments (web app only)
- Push to
-
Manual Deployment:
# Trigger GitHub Actions workflow gh workflow run deploy.yml
See Deployment Guide for detailed instructions.
# All tests
pnpm test
# Web application tests
pnpm test:web
# Watch mode
pnpm test:watch
# Coverage report
pnpm test:coveragesrc/__tests__/
βββ components/ # Component tests
βββ integration/ # Integration tests
βββ schemas/ # Schema validation tests
apps/web/src/
βββ app/ # Next.js App Router pages
βββ components/ # Reusable UI components
βββ lib/ # Utility functions
βββ hooks/ # Custom React hooks
βββ types/ # TypeScript definitions
βββ styles/ # Global styles
βββ __tests__/ # Test files
- Dashboard: Employee analytics and insights
- Survey Builder: Create and manage employee surveys
- User Management: Admin panel for user administration
- Authentication: Secure login with multiple providers
- Reports: Generate and view analytics reports
Web application requires these environment variables:
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
NEXT_PUBLIC_APP_NAME=WorkSight
NEXT_PUBLIC_APP_DESCRIPTION=Employee Well-being Analytics Platform- Create a new Supabase project
- Set up authentication providers
- Configure database tables and policies
- Add environment variables to your deployment
- Fork & Clone: Fork the repository and clone locally
- Branch: Create a feature branch from
main - Develop: Make changes and test locally
- Test: Ensure all tests pass
- Commit: Use conventional commit messages
- Pull Request: Submit PR with clear description
- TypeScript: Strict mode enabled
- ESLint: Follow configured rules
- Prettier: Auto-format on save
- Testing: Write tests for new features
- Documentation: Update docs for user-facing changes
feat: add new survey analytics dashboard
fix: resolve authentication redirect issue
docs: update deployment guide
chore: upgrade dependencies
- User Guide: Apps Documentation
- API Reference: API Documentation
- Deployment: Deployment Guide
- Contributing: Contributing Guide
-
Build Failures:
# Clear cache and reinstall pnpm clean rm -rf node_modules pnpm install -
Type Errors:
# Run type checking pnpm type-check -
Test Failures:
# Run tests with verbose output pnpm test --verbose
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Project Documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - React framework
- Supabase - Backend as a Service
- Tailwind CSS - Utility-first CSS
- shadcn/ui - UI component library
- VitePress - Documentation framework
- Turbo - Monorepo build system
WorkSight - Empowering organizations with employee well-being analytics.