KembaliArsip / superapp-productivity / dailytask
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
- Node.js 18+
- 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
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google Calendar API
- Go to Credentials > Create Credentials > OAuth 2.0 Client IDs
- Application type: Web application
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Copy Client ID and Client Secret to
.env.local
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/events?days=7&q=keyword | List upcoming events |
| POST | /api/events | Create 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|all | Delete an event |
| POST | /api/webhook | AI-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)
- Push to GitHub
- Import project in Vercel
- Set environment variables in Vercel dashboard
- Add production redirect URI to Google Cloud Console
- Deploy
File Utama
- .env.example
- .gitignore
- DEPLOYMENT_RULES.md
- README.md
- eslint.config.mjs
- next.config.ts
- package-lock.json
- package.json