Demo Website Link: https://ai-taskplanner.vercel.app/
An AI-assisted task planner built with Next.js App Router, Prisma, PostgreSQL, and the OpenAI Responses API. The app demonstrates server-side AI tool calling against real application data with validation, user scoping, audit logging, and a daily planning assistant.
- Task CRUD with status, priority, due date, estimates, tags, and completion tracking.
- Server-side AI chat that can create, list, update, and safely delete tasks.
- AI daily planner that turns open tasks into a concise schedule.
- Request-scoped workspaces using an email-based demo identity.
- Audit log for UI and AI task mutations.
- Shared validation used by dashboard APIs and AI tool execution.
- Unit tests for task validation.
- Frontend: Next.js, React, Tailwind CSS
- Backend: Next.js API Routes
- Database: PostgreSQL
- ORM: Prisma
- AI: OpenAI Responses API
- Tests: Vitest
React UI
-> Next.js API Routes
-> validation + user resolution + audit logging
-> Prisma
-> PostgreSQL
AI Chat / Daily Planner
-> server-only OpenAI Responses calls
-> controlled task tools
-> same Prisma/Postgres data model
The AI never receives database credentials and never runs in the browser. It asks the server to execute explicit tools, and the server validates input before writing to the database.
For this project, a single Next.js full-stack app is the pragmatic choice. It keeps deployment simple, avoids duplicated auth/session plumbing, and lets the AI agent, dashboard, validation, and Prisma data access share one server boundary.
FastAPI would make sense later if the goal is to run a separate Python service, background jobs, or Python-specific AI pipelines. For this project, the simpler and stronger architecture is a clean TypeScript app with safe server-side AI actions.
- Install dependencies:
npm install- Create an environment file:
cp .env.example .env-
Set
DATABASE_URLandOPENAI_API_KEYin.env. -
Apply migrations and generate Prisma client:
npx prisma migrate deploy
npx prisma generate- Run the app:
npm run devnpm run lint
npm run test
npm run build
npm run migrate:deployCreate a task to polish my resume, priority 8, estimate 45 minutes, tag careerList all blocked tasksMark the resume task as doneDelete the task called polish resumeCreate a plan for my day
- The AI uses tool calling instead of directly mutating data.
- Task ownership is scoped by user/workspace.
- Mutations are validated before Prisma writes.
- Ambiguous deletes are handled safely.
- Audit logs make AI actions inspectable.
- The daily planner uses task metadata such as due dates, priority, status, estimates, and tags.