Your favorite shift management application!
docs: update README with enhanced features and deployment instructions
panteLxfd9127a1a247
diff --git a/README.md b/README.mdindex 1f0546e..2e783f1 100644--- a/README.md+++ b/README.md@@ -1,110 +1,225 @@-# BetterShift+<h1 align="center" id="title">BetterShift</h1>+<div align="center">-A modern shift management application built with Next.js and SQLite. BetterShift helps you organize and manage work shifts across multiple calendars with customizable presets, color coding, shift statistics and password protection.++-## Features+[](https://discord.gg/Ma4SnagqwE)+[](https://buymeacoffee.com/pantel)+[](https://github.com/sponsors/pantelx)-- π **Multiple Calendars**: Create, manage and delete multiple shift calendars-- β° **Shift Management**: Add, edit, and delete shifts with start/end times-- π¨ **Color Coding**: Assign colors to calendars for better visualization-- π **Shift Presets**: Create reusable shift templates for faster scheduling-- π **Calendar Notes**: Add custom notes to any day (e.g., "Morning shift because afternoon hairdresser")-- ποΈ **Calendar View**: Interactive monthly calendar with week-based layout-- π **Password Protection**: Secure calendars with optional passwords-- π **Internationalization (i18n)**: Supports multiple languages with automatic detection and manual switching-- π **Shift Statistics**: View statistics for shifts over different time periods-- π **Real-time Synchronization**: Automatic data refresh and offline handling with server-sent events-- πΎ **SQLite Database**: Lightweight, file-based database with Drizzle ORM-- π³ **Docker Support**: Easy deployment with Docker and Docker Compose+</div>-## Prerequisites+> **Note**+>+> BetterShift is a modern shift management application built with Next.js 16 and SQLite. It helps you organize and manage work shifts across multiple calendars with customizable presets, color coding, and password protection. Perfect for anyone managing variable work schedules.-- Node.js 20+ (for local development)-- Docker and Docker Compose (for containerized deployment)+## π Quick Links-## Getting Started+**Demo:** [bettershift.pantelx.com](https://bettershift.pantelx.com)-### Local Development+**Discord Server:** [Join our Discord for community discussions and support](https://discord.gg/Ma4SnagqwE)-1. **Clone the repository**+**Self-Hosting:** [Check out the Deployment Guide](#-deployment-guide)- ```bash- git clone https://github.com/pantelx/bettershift.git- cd bettershift- ```+**Support the Project:** [Buy Me A Coffee](https://www.buymeacoffee.com/pantel) or [Become a GitHub Sponsor](https://github.com/sponsors/pantelx)-2. **Install dependencies**+---- ```bash- npm install- ```+## β¨ Key Features-3. **Set up the database**+### π Calendar & Shift Management- ```bash- # Generate and apply database migrations- npm run db:migrate- ```+- **Multiple Calendars**: Create and manage multiple shift calendars with custom names and colors+- **Interactive Calendar View**: Month-based calendar with week-based layout for easy navigation+- **Quick Shift Toggle**: Left-click any day to toggle shifts using your selected preset+- **Shift Presets**: Create reusable shift templates with custom times, colors, and labels+- **Drag & Drop**: Reorder calendars and presets with intuitive drag-and-drop functionality+- **Calendar Notes**: Right-click any day to add custom notes (e.g., "Morning shift because afternoon hairdresser")-4. **Start the development server**+### π¨ Customization & Organization- ```bash- npm run dev- ```+- **Color Coding**: Assign colors to calendars and presets for better visualization+- **Preset Management**: Create, edit, and delete shift presets with auto-save functionality+- **Custom Shift Times**: Define exact start and end times for each shift+- **Flexible Scheduling**: Easily create one-time shifts or use presets for recurring patterns-5. **Open your browser**- Navigate to [http://localhost:3000](http://localhost:3000)+### π Security & Privacy-### Docker Deployment+- **Password Protection**: Secure individual calendars with optional passwords+- **Local Storage**: Passwords are securely hashed using SHA-256+- **Export Functionality**: Export calendar data for backup or migration-1. **Build and run with Docker Compose**+### π Internationalization- ```bash- docker-compose up -d+- **Multi-Language Support**: Built-in support for German and English+- **Automatic Detection**: Automatically detects browser language preference+- **Manual Switching**: Easy language switcher in the header+- **Cookie-Based Preference**: Your language choice persists across sessions- # Generate and apply database migrations- docker compose exec bettershift npm run db:migrate- ```+### π Statistics & Insights-2. **Access the application**- The application will be available at the port specified in your docker-compose file (default: 3000)+- **Shift Statistics**: View detailed statistics for different time periods+- **Customizable Periods**: Analyze shifts for current month, last 30 days, or custom ranges+- **Real-time Updates**: Statistics automatically refresh when shifts are modified-### Building for Production+### π Real-Time Synchronization++- **Server-Sent Events**: Real-time updates across multiple browser tabs+- **Offline Handling**: Graceful handling of offline scenarios+- **Automatic Refresh**: Data refreshes automatically when changes are detected++### πΎ Modern Tech Stack++- **Next.js 16 App Router**: Latest Next.js with React 19 for optimal performance+- **SQLite with Drizzle ORM**: Lightweight, file-based database with type-safe queries+- **Tailwind CSS 4**: Modern styling with shadcn/ui components+- **Docker Support**: Easy deployment with Docker and Docker Compose++---++## π οΈ Deployment Guide++### π» Local Development++```bash+# Clone the repository+$ git clone https://github.com/pantelx/bettershift.git && cd bettershift++# Install dependencies+$ npm install++# Set up the database+$ npm run db:migrate++# Start the development server+$ npm run dev++# Open your browser at http://localhost:3000+```++### π³ Docker Deployment++Deploy using Docker for easy containerized hosting:++```bash+# Clone the repository+$ git clone https://github.com/pantelx/bettershift.git && cd bettershift++# Build and start the container+$ docker-compose up -d --build++# Apply database migrations+$ docker compose exec bettershift npm run db:migrate++# Access the application at http://localhost:3000 (or your configured port)+```++### ποΈ Production Build```bash# Build the application-npm run build+$ npm run build# Start production server-npm start+$ npm start```-## Database Management+---++## ποΈ Database Management### Available Commands```bash# Generate new migrations after schema changes-npm run db:generate+$ npm run db:generate# Apply migrations to the database-npm run db:migrate--# Push schema changes directly to the database-npm run db:push+$ npm run db:migrate# Open Drizzle Studio (database GUI)-npm run db:studio+$ npm run db:studio```-## Contributing+> **Note**+>+> Never run `npm run db:push` in production. Always use migrations (`db:generate` + `db:migrate`) for safe schema changes.++---++## β Frequently Asked Questions++### What is BetterShift?++BetterShift is a shift management application designed for people with variable work schedules. It allows you to manage multiple calendars, create shift presets, add notes to specific days, and view statistics about your working hours.++### How do I protect a calendar with a password?++1. Open the calendar settings+2. Click "Manage Password"+3. Set a password for the calendar+4. The password will be required for editing or viewing that calendar++### How do I add a shift quickly?++1. Select a preset from the preset selector+2. Click on any day in the calendar+3. The shift will be created automatically with the preset's settings+4. Click the same day again to remove the shift++### How do I add notes to a specific day?++Right-click (or long-press on mobile) on any day in the calendar to open the note dialog. You can add, edit, or delete notes for that day.++### Does BetterShift work offline?++BetterShift requires a server connection to save data. However, it handles offline scenarios gracefully and will attempt to reconnect automatically.++### What languages are supported?++Currently, BetterShift supports:++- German (Deutsch)+- English++The application automatically detects your browser language and uses the appropriate translation.++---++## π Support the Project++Your support helps maintain and improve this project! Please consider:++- [Buy me a coffee](https://www.buymeacoffee.com/pantel)+- [Become a GitHub Sponsor](https://github.com/sponsors/pantelx)+- Join our Discord community for support and updates+- Contribute on GitHub++---++## π€ ContributingContributions are welcome! Please feel free to submit a Pull Request.-## License+1. Fork the repository+2. Create your feature branch (`git checkout -b feature/amazing-feature`)+3. Commit your changes (`git commit -m 'Add some amazing feature'`)+4. Push to the branch (`git push origin feature/amazing-feature`)+5. Open a Pull Request++---++## π Credits++Special thanks to:++- All contributors who have contributed through code, testing, and ideas+- The community for their feedback, support, and patience+- Project supporters who have financially supported this initiative-This project is licensed under the MIT License.+----## Support+## π License-For issues and questions, please open an issue in the repository.+MIT