- Next.js 14 with App Router and TypeScript - Prisma ORM with PostgreSQL database - Event creation with share links - Calendar availability selection - Password-protected analytics dashboard - Stripe-inspired UI design - Docker configuration for deployment
100 lines
2.7 KiB
Markdown
100 lines
2.7 KiB
Markdown
# 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.
|
|
|
|
  
|
|
|
|
## 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 <your-repo-url>
|
|
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
|