superapp-productivity

dailytask

78 file · 443.7 KB

Sistem informasi live — dailytask-puce.vercel.appBuka di tab baru

README

DailyTask - Smart Reminder Dashboard

A Next.js web application for managing Google Calendar reminders with a clean, dark-themed dashboard. Features AI-to-AI webhook support for automated calendar management.

Features

  • Google OAuth sign-in with Calendar API integration
  • Create, edit, and delete reminders synced to Google Calendar
  • Priority-based color coding (High/Medium/Normal/Low)
  • Recurring event support (Daily, Weekly, Monthly, Weekdays)
  • JSON Import mode for AI-to-AI integration
  • WIB (Asia/Jakarta) timezone handling
  • Mobile-responsive dark theme

Tech Stack

  • Framework: Next.js 15 (App Router, Server Components)
  • Language: TypeScript (strict mode)
  • Styling: Tailwind CSS 4
  • Auth: NextAuth.js v5 (Google OAuth)
  • Calendar: Google Calendar API (googleapis)
  • Animations: Framer Motion

Prerequisites

  1. Node.js 18+
  2. Google Cloud Console project with:
    • OAuth 2.0 credentials (Web application type)
    • Google Calendar API enabled
    • Authorized redirect URI: http://localhost:3000/api/auth/callback/google

Setup

# Install dependencies
npm install

# Copy env template
cp .env.example .env.local

# Fill in your credentials in .env.local
# - GOOGLE_CLIENT_ID
# - GOOGLE_CLIENT_SECRET
# - AUTH_SECRET (generate with: openssl rand -base64 32)

# Run development server
npm run dev

Google Cloud Console Setup

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable Google Calendar API
  4. Go to Credentials > Create Credentials > OAuth 2.0 Client IDs
  5. Application type: Web application
  6. Add authorized redirect URI: http://localhost:3000/api/auth/callback/google
  7. Copy Client ID and Client Secret to .env.local

API Endpoints

MethodEndpointDescription
GET/api/events?days=7&q=keywordList upcoming events
POST/api/eventsCreate a new event
GET/api/events/[eventId]Get event by ID
PATCH/api/events/[eventId]Update an event
DELETE/api/events/[eventId]?scope=single|following|allDelete an event
POST/api/webhookAI-to-AI JSON endpoint

Webhook (AI-to-AI)

POST to /api/webhook with JSON body:

{
  "action": "create",
  "title": "Meeting PKP",
  "datetime": "2025-03-15T09:00:00",
  "duration_minutes": 60,
  "priority": "high",
  "recurring": "WEEKLY"
}

Supported actions: create, update, delete, list

Deployment (Vercel)

  1. Push to GitHub
  2. Import project in Vercel
  3. Set environment variables in Vercel dashboard
  4. Add production redirect URI to Google Cloud Console
  5. Deploy

File Utama

  • .env.example
  • .gitignore
  • DEPLOYMENT_RULES.md
  • README.md
  • eslint.config.mjs
  • next.config.ts
  • package-lock.json
  • package.json