Skip to content

Worksense-Inc/main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Worksense Scheduling App

Overview

Worksense is a small workplace scheduling application providing shift management, time off requests, and shift swap capabilities.

This repository contains:

  1. frontend/ – React + TypeScript front-end client (Vite)
  2. server/ – Express + TypeScript API server

Database Setup (Minimal)

The database schema is defined in server/migrations/20231110_initial.sql.

To set up the database:

  1. Create a Supabase or Postgres database
  2. Open the SQL Editor (Supabase Dashboard → SQL Editor, or use psql)
  3. Copy and paste the contents of server/migrations/20231110_initial.sql
  4. Run the SQL to create tables

Database Schema

Tables:

Table Purpose
users Employee and manager accounts (with role)
shifts Individual work shifts; may be unassigned (assigned_to NULL)
time_off_requests Employee time off periods with approval workflow
shift_swap_requests Requests to swap assigned shifts

Important constraints:

  • Unique users.email
  • Validated role via CHECK constraint
  • end_time > start_time for shifts
  • end_date >= start_date for time off

Server Setup

  1. Install dependencies (inside server/):
    cd server
    npm install
  2. Configure environment variables by copying .env.example to .env and updating values:
    cp .env.example .env
  3. Start development server:
    npm run dev

Frontend Setup

  1. Install dependencies (inside Frontend/):
    cd Frontend
    npm install
  2. Configure environment variables by copying .env.example to .env:
    cp .env.example .env
  3. Start development server:
    npm run dev
  4. Build for production:
    npm run build

Contributing

Create feature branches (e.g. database, auth, shifts-ui) and open PRs for review.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •