Files
time_to_leave/README.md
T
2026-05-11 19:00:02 +02:00

142 lines
5.8 KiB
Markdown

# TimeToLeave
![TimeToLeave Logo](https://via.placeholder.com/150)
> **TimeToLeave** is a comprehensive time-off management application designed to streamline vacation, sick leave, and work-from-home request handling for both employees and administrators. This tool helps organizations improve transparency and ensure compliance with internal policies.
![GitHub release (latest by date)](https://img.shields.io/github/v/release/fegger/TimeToLeave) ![GitHub issues](https://img.shields.io/github/issues/fegger/TimeToLeave) ![GitHub stars](https://img.shields.io/github/stars/fegger/TimeToLeave) ![GitHub license](https://img.shields.io/github/license/fegger/TimeToLeave)
## 🚀 Getting Started
These instructions will get you a copy of the project running on your local machine for development and testing purposes.
### Prerequisites
* Node.js (version 20.x or higher recommended)
* npm/yarn (version 9.x or higher recommended)
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/fegger/TimeToLeave.git
cd TimeToLeave
```
2. **Install dependencies:**
```bash
npm install
```
3. **Environment variables:**
* For `apps/web` and `apps/mobile`, copy `.env.example` to `.env` in each app directory and update the values as needed.
## 🧱 Project Structure Overview
This project uses a monorepo setup to manage multiple, interconnected parts:
* **`apps/`**: Contains the primary deployable applications.
* `apps/web`: The main web interface for the user, built using Next.js, React, and Tailwind CSS.
* `apps/mobile`: The mobile application client built using React Native and Expo.
* **`packages/`**: Contains reusable, domain-specific logic and shared utilities.
* `packages/core`: Core business logic, domain models, and utilities like date manipulation using date-fns.
* `packages/api-client`: Handles interactions with the backend API, including authentication, request submissions, and calendar integration.
## 🛠 Development & Running the Application
The `package.json` defines several scripts to assist with development:
| Script | Command | Description |
| :--- | :--- | :--- |
| `dev` | `npm run dev -w apps/web` | Starts the development server for the Web application. |
| `dev:mobile` | `npm run start -w apps/mobile` | Starts the mobile client development server. |
| `build` | `npm run build -w apps/web` | Builds the production bundle for the Web application. |
| `test` | `npm run test -w apps/web` | Runs unit and integration tests for the Web application. |
| `lint` | `npm run lint -w apps/web && npm run lint -w apps/mobile` | Runs linting checks across both web and mobile clients. |
### Development Workflow Tip
When working on shared logic, modify files in `packages/core` or `packages/api-client`. Remember to run tests or restart the services to ensure changes are propagated correctly across the consuming apps.
## 📝 Web Application Overview
The web application is built with the following technologies:
* **Framework:** Next.js (version 16.2.6)
* **UI Library:** React (version 19.2.4)
* **Styling:** Tailwind CSS (version 4)
* **Date Manipulation:** date-fns (version 4.1.0)
* **iCalendar Parsing:** node-ical (version 0.26.1)
### Key Features of the Web Client
* Dashboard for requesting and managing time off
* Real-time updates on approval status
* Integration with personal calendars via iCalendar
## 📱 Mobile Application Overview
The mobile application leverages the following technologies:
* **Framework:** React Native (version 0.81.5) via Expo (version 54.0.33)
* **Navigation:** React Navigation (version 7.2.4)
* **Data Persistence:** AsyncStorage (version 3.0.2)
* **Device APIs:** Expo modules for calendar, location, and notifications
### Key Features of the Mobile Client
* Geolocation-based request policies
* Calendar event integration
* Native push notifications for status updates
## 🛡️ Testing & Quality Assurance
The project provides comprehensive scripts for maintaining code quality:
* **Linting:** Use `npm run lint` to catch stylistic and structural errors.
* **Type Checking:** Use `npm run typecheck` to ensure type safety across the codebase.
* **Testing:**
* The web application uses Vitest (version 4.1.5) for unit and integration tests.
* The mobile application uses Jest (version 29.7.0) for testing React Native components.
## 📄 API Documentation
The API client handles all interactions with the backend. The main features include:
* **Authentication:** Secure token management
* **Request Management:** Submitting and updating time-off requests
* **Calendar Integration:** Reading and writing calendar events
* **Policy Checking:** Validating requests against organizational rules
To use the API client, import it into your project:
```typescript
import { createApiClient } from "@timetoleave/api-client";
const apiClient = createApiClient("YOUR_BACKEND_API_URL");
```
[Detailed API documentation](https://example.com/api-documentation) will be available once the backend services are finalized.
## 🤝 Contributing
Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
## 📜 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 📂 File Structure
```text
├── apps/
│ ├── mobile/ # Mobile application using React Native and Expo
│ └── web/ # Web application using Next.js
├── packages/
│ ├── api-client/ # API client utilities
│ └── core/ # Shared core utilities and types
├── node_modules/ # Third-party dependencies
└── README.md # The file you're reading now
```
---
*This README was generated based on the detected monorepo structure and dependencies.*