# Timepickr A modern event scheduling app that helps groups find the perfect time to meet. Create an event, share a link, and let everyone pick their available dates. ![Timepickr](https://img.shields.io/badge/Next.js-14-black) ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16-blue) ![Docker](https://img.shields.io/badge/Docker-Ready-2496ED) ## Features - 📅 **Easy Event Creation** - Set a date range and get a shareable link instantly - 🗓️ **Visual Calendar** - Guests can click to select their available dates - 📊 **Analytics Dashboard** - See who's available when with a heatmap view - 🔒 **Password Protected** - Only you can access the analytics - 🐳 **Dockerized** - Deploy anywhere with a single command ## Quick Start ### Using Docker (Recommended) ```bash # Clone the repository git clone cd timepickr # Start the application docker-compose up -d # Run migrations docker-compose run --rm migrate # Open http://localhost:3000 ``` ### Local Development ```bash # Install dependencies npm install # Set up environment variables cp .env.example .env # Edit .env with your PostgreSQL database URL # Generate Prisma client npx prisma generate # Run migrations npx prisma migrate dev # Start development server npm run dev # Open http://localhost:3000 ``` ## Tech Stack - **Frontend**: Next.js 14 (App Router), React, CSS - **Backend**: Next.js API Routes - **Database**: PostgreSQL with Prisma ORM - **Containerization**: Docker & Docker Compose ## Project Structure ``` timepickr/ ├── src/ │ ├── app/ │ │ ├── api/events/ # API routes │ │ ├── event/[code]/ # Event & analytics pages │ │ ├── page.tsx # Home page │ │ └── globals.css # Stripe-inspired styles │ ├── components/ # Reusable components │ └── lib/ # Database client ├── prisma/ # Database schema ├── Dockerfile # Production build ├── docker-compose.yml # Container orchestration └── README.md ``` ## Environment Variables | Variable | Description | Default | |----------|-------------|---------| | `DATABASE_URL` | PostgreSQL connection string | - | | `NEXT_PUBLIC_APP_URL` | Public URL of the app | `http://localhost:3000` | ## API Endpoints | Method | Endpoint | Description | |--------|----------|-------------| | `POST` | `/api/events` | Create a new event | | `GET` | `/api/events/:code` | Get event details | | `POST` | `/api/events/:code/responses` | Submit availability | | `GET` | `/api/events/:code/responses` | Get all responses | | `POST` | `/api/events/:code/analytics` | Get analytics (auth required) | ## License MIT