Skip to content

Assist small buisiness owners to create and manage work schedule.

Notifications You must be signed in to change notification settings

MorphZG/work_schedule_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Work Schedule Application

A full-stack web application for managing employee work schedules, built with modern web technologies.

Tech Stack

Frontend

  • React 18
  • Vite
  • TailwindCSS
  • Axios for API communication

Backend

  • Node.js
  • Express
  • MongoDB with Mongoose
  • CORS enabled for frontend communication

Features

  • Create and manage weekly/monthly work schedules
  • Randomize schedule generation
  • Set employee preferences (e.g., preferred days off, specific working hours)
  • Track working hours statistics
  • View employee-specific statistics (e.g., number of specific weekdays worked)
  • Automated schedule generation with fair weekend shift distribution
  • Real-time updates through REST API

Getting Started

Prerequisites

  • Node.js (Latest LTS version recommended)
  • MongoDB (Local installation or MongoDB Atlas account)
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/MorphZG/work_schedule_app.git
cd work_schedule_app
  1. Install backend dependencies:
cd backend
npm install
  1. Install frontend dependencies:
cd ../frontend/vite-project
npm install
  1. Set up environment variables: In both backend and frontend directories create .env file with environment variables. There is .env.example with example data.
  • Backend variables
PORT=5000
MONGO_URI="mongodb+srv://<username>:<password>@<cluster_url>/db_name"
LOCALHOST="mongodb://127.0.0.1:<port_number>/<db_name>"
  • Frontend variables
API_URL=<empty_string>

Running the Application

  1. Start the backend server:
cd backend
npm run dev
  1. Start the frontend development server:
cd frontend/vite-project
npm run dev

The application will be available at:

API Endpoints

Schedules

  • GET /schedule/:period - Get schedule for specific period
  • POST /schedule - Create new schedule
  • PUT /schedule/:id - Update existing schedule

Employee Preferences

  • PUT /preferences/:employeeId - Update employee preferences
  • GET /preferences/:employeeId - Get employee preferences

Statistics

  • GET /statistics/:employeeId - Get employee work statistics
  • GET /statistics/team - Get team-wide statistics

Development

Code Quality

The project uses:

  • ESLint for code linting
  • Prettier for code formatting
  • Vitest for testing

Run quality checks:

npm run lint    # Check code style
npm run format  # Format code
npm run test    # Run tests

Project Structure

For detailed information about the project structure, see dir_structure.md

API Documentation

Contributing

See CONTRIBUTE.md for details on our code of conduct and the process for submitting pull requests.

About

Assist small buisiness owners to create and manage work schedule.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published