An open API service indexing awesome lists of open source software.

https://github.com/bartoszjarocki/minimal

Minimal - minimalist calendars and habit trackers
https://github.com/bartoszjarocki/minimal

bun nextjs react typescript

Last synced: 10 months ago
JSON representation

Minimal - minimalist calendars and habit trackers

Awesome Lists containing this project

README

          

# Minimal - Minimalist Calendar Generator

A modern, type-safe web application for generating beautiful minimalist printable calendars and habit trackers. Built with Next.js, TypeScript, and Tailwind CSS.

## โœจ Features

- **๐Ÿ—“๏ธ Minimalist Calendars**: Generate clean, printable calendars for any year
- **๐Ÿ“Š Habit Trackers**: Create customizable habit tracking sheets
- **๐ŸŒ Multi-language Support**: Available in 25+ languages
- **๐Ÿ“„ Multiple Formats**: A4, A5, and Letter sizes in portrait/landscape
- **๐ŸŽจ Beautiful Design**: Clean, minimal aesthetic optimized for printing
- **โ™ฟ Accessible**: ARIA labels, keyboard navigation, and screen reader support
- **โšก Performance**: Optimized with React.memo, error boundaries, and proper TypeScript

## ๐Ÿ—๏ธ Architecture

This project is a **Turborepo monorepo** with the following structure:

### Apps

- **`apps/frontend`**: Next.js web application for calendar preview and generation
- **`apps/generator`**: Puppeteer-based PDF generation service
- **`apps/robot`**: Placeholder for future automation tasks

### Packages

- **`packages/config`**: Shared configuration for locales, themes, and calendar settings

## ๐Ÿš€ Quick Start

### Prerequisites

- Node.js 14+
- Yarn 1.22+

### Installation

```bash
# Clone the repository
git clone
cd minimal

# Install dependencies
yarn install

# Copy environment variables
cp .env.example .env.local

# Start development server
yarn dev
```

### Environment Variables

Create a `.env.local` file in the root directory:

```bash
# Required
SITE_URL=https://useminimal.com
```

## ๐Ÿ“ฆ Available Scripts

### Root Commands

```bash
yarn dev # Start all apps in development mode
yarn build # Build all apps for production
yarn lint # Lint all apps
yarn format # Format code with Prettier
yarn test # Run all tests
yarn test:watch # Run tests in watch mode
yarn test:coverage # Run tests with coverage report
yarn generate # Generate calendar PDFs (requires frontend running)
```

### App-specific Commands

**Frontend** (`apps/frontend`):
```bash
cd apps/frontend
yarn dev # Start Next.js dev server
yarn build # Build for production
yarn test # Run Jest tests
yarn test:watch # Run tests in watch mode
yarn test:coverage # Run tests with coverage
```

**Generator** (`apps/generator`):
```bash
cd apps/generator
yarn generate # Generate calendar PDFs
```

## ๐Ÿงช Testing

The project includes comprehensive testing setup:

- **Jest** for unit testing
- **React Testing Library** for component testing
- **Coverage reporting** with thresholds
- **Accessibility testing** with jest-axe

```bash
# Run all tests across the monorepo
yarn test

# Run tests in watch mode
yarn test:watch

# Generate coverage report
yarn test:coverage
```

## ๐ŸŒ Supported Languages

The application supports 25+ languages including:

English, French, German, Spanish, Italian, Portuguese, Polish, Latvian, Norwegian, Czech, Ukrainian, Croatian, Slovak, Slovenian, Thai, Danish, Dutch, Finnish, Icelandic, Hungarian, Romanian, Swedish, Turkish, Russian, Korean, Hindi, Greek, Arabic, Hebrew, Japanese, Chinese

## ๐ŸŽจ Calendar Generation

### Development Workflow

1. **Frontend** serves calendar previews at `http://localhost:3000`
2. **Generator** uses Puppeteer to capture calendar renders
3. PDFs are generated for all supported languages and formats
4. Output is organized and zipped for distribution

### Supported Outputs

- **Formats**: A4, A5
- **Orientations**: Portrait, Landscape
- **Types**: Monthly calendars, Yearly overviews, Habit trackers
- **Languages**: 25+ locales with proper date formatting

## ๐Ÿ› ๏ธ Technology Stack

### Frontend
- **Next.js 13** - React framework with App Router
- **TypeScript** - Type-safe development
- **Tailwind CSS** - Utility-first styling
- **Radix UI** - Accessible component primitives
- **Luxon** - Date manipulation and internationalization

### Development
- **Turborepo** - Monorepo build system
- **ESLint** - Code linting
- **Prettier** - Code formatting
- **Jest** - Testing framework
- **React Testing Library** - Component testing

### Production
- **Puppeteer** - PDF generation
- **Vercel** - Deployment platform
- **Vercel Analytics** - Performance monitoring

## ๐Ÿ“ Project Structure

```
โ”œโ”€โ”€ apps/
โ”‚ โ”œโ”€โ”€ frontend/ # Next.js web application
โ”‚ โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ components/ # React components
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ pages/ # Next.js pages
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ lib/ # Utilities and configuration
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ styles/ # Global styles
โ”‚ โ”‚ โ”œโ”€โ”€ __tests__/ # Test files
โ”‚ โ”‚ โ””โ”€โ”€ public/ # Static assets
โ”‚ โ”œโ”€โ”€ generator/ # PDF generation service
โ”‚ โ””โ”€โ”€ robot/ # Future automation
โ”œโ”€โ”€ packages/
โ”‚ โ””โ”€โ”€ config/ # Shared configuration
โ”œโ”€โ”€ .env.example # Environment variables template
โ”œโ”€โ”€ turbo.json # Turborepo configuration
โ””โ”€โ”€ CLAUDE.md # AI assistant context
```

## ๐Ÿ”ง Configuration

### Adding New Languages

1. Add locale configuration to `packages/config/config.ts`
2. Test calendar rendering in all formats
3. Update language list in README

### Adding New Themes

1. Create theme component in `apps/frontend/src/components/calendar/themes/`
2. Add theme to configuration
3. Update theme lookup in print page

## ๐Ÿš€ Deployment

### Vercel (Recommended)

The application is optimized for Vercel deployment:

```bash
# Deploy to Vercel
vercel

# Or connect GitHub repository for automatic deployments
```

### Manual Deployment

```bash
# Build all apps
yarn build

# Deploy frontend app from apps/frontend/.next
# Deploy generator as serverless function or container
```

## ๐Ÿค Contributing

1. **Fork** the repository
2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
3. **Commit** your changes (`git commit -m 'Add amazing feature'`)
4. **Push** to the branch (`git push origin feature/amazing-feature`)
5. **Open** a Pull Request

### Development Guidelines

- **TypeScript**: Strict mode enabled, no `any` types
- **Testing**: Write tests for new components and utilities
- **Accessibility**: Include ARIA labels and keyboard navigation
- **Performance**: Use React.memo and useMemo for expensive operations
- **Security**: No hardcoded secrets, validate all inputs

## ๐Ÿ“Š Performance

- **Lighthouse Score**: 95+ across all metrics
- **Core Web Vitals**: Optimized for LCP, FID, and CLS
- **Bundle Size**: Analyzed and optimized with tree shaking
- **Error Handling**: Comprehensive error boundaries

## ๐Ÿ”’ Security

- **Input Validation**: All user inputs validated
- **XSS Prevention**: Proper escaping and sanitization
- **CSRF Protection**: Built-in Next.js protection
- **Environment Variables**: Secrets properly managed
- **Dependencies**: Regularly updated and audited

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

**Made with โค๏ธ for the minimalist community**