Smart Task Planner
An intelligent web application that turns your ambitious goals into actionable, step-by-step plans using the power of Google's Gemini AI.
Live & Demo
Experience the live application and see how your goals are transformed into a manageable project plan in seconds.
Live link: https://goal-planner-liart.vercel.app/
Demo Video: https://drive.google.com/file/d/1SefadZbCxVUL7FB8phFoG5xJ3eoPevrj/view?usp=drive_link
About The Project
Smart Task Planner bridges the gap between vision and execution. It leverages Google's advanced Gemini API to analyze a user's high-level goal and intelligently generate a comprehensive roadmap. The result is a detailed list of tasks, complete with descriptions, time estimates, and dependencies, giving users a clear and actionable path to success.
This project was built to demonstrate a modern, secure, and performant full-stack application using a serverless backend architecture, ensuring both a great user experience and robust security.
Application Screenshots
Core Features & Application Logic
This application integrates several key technical features to deliver a seamless and powerful planning experience.
AI-Powered Plan Generation
- Logic: The core of the application resides in the
/api/generate-plan.tsVercel Edge Function. When a user submits a goal, the frontend sends a request to this secure backend endpoint. The function then constructs a detailed prompt, instructing the Gemini AI to act as an expert project manager. - Structured Output: To ensure a reliable and predictable response from the AI, the backend enforces a strict JSON schema via the
responseSchemaconfiguration. This forces the Gemini model to return a perfectly formatted JSON array of tasks, which the frontend can parse and render without requiring complex data manipulation.
Dynamic Task Dependency System
- Logic: The AI generates a
dependenciesarray for each task (e.g.,["task-1", "task-3"]). On the frontend, theTaskListcomponent maintains aSetof completed task IDs for efficient lookups. - User Experience: Before rendering each task, the application checks if all of its prerequisite tasks have been completed. A task is visually "locked" (greyed out and non-interactive) if any of its dependencies are not yet met. Once all dependencies are finished, the task automatically unlocks, creating an intuitive and logical workflow for the user.
Interactive Progress Tracking
- Logic: The
PlannerViewcomponent uses React'suseMemohook to efficiently calculate progress metrics whenever thetasksarray changes. It counts completed tasks versus the total and sums thedurationInHoursfor all tasks to provide a total project estimate. - User Experience: Users get immediate visual feedback via a dynamic progress bar, a "X / Y Tasks" counter, and a total estimated project duration, keeping them motivated and informed.
Secure Serverless Architecture
- Logic: The frontend never communicates directly with the Gemini API. All API calls are proxied through the
/api/generate-planserverless function. TheAPI_KEYis stored securely as an environment variable on Vercel's servers and is never exposed to the client's browser. This is a critical security best practice that prevents key leakage.
Simulated Authentication Flow
- Logic: The application uses React state to manage a
currentUserobject, simulating a complete login/signup flow. Views are conditionally rendered based on whether a user object exists in the state, protecting the main planner view from unauthenticated access. This demonstrates state management for a typical user-gated application.
Tech Stack
This project is built with a modern web development stack:
- Frontend:
- React: For building the component-based user interface.
- TypeScript: For static typing, improved code quality, and developer experience.
- Tailwind CSS: For rapid, utility-first styling and a responsive design.
- Backend (Serverless):
- Vercel Edge Functions: To create a secure, scalable backend proxy for API calls.
- Core API:
- Google Gemini API: The AI engine for intelligent plan generation.
- Deployment:
- Vercel: For seamless, Git-based deployment and hosting.
Local Development Setup
To get a local copy up and running, follow these steps.
Prerequisites
- Node.js (v18 or later recommended)
- npm, yarn, or pnpm
- A Google Gemini API Key. You can get one for free from Google AI Studio.
Installation & Configuration
-
Clone the repository:
git clone https://github.com/AbhinayManikanti/goal-planner.git cd goal-planner -
Install the Vercel CLI:
npm install -g vercel -
Create an environment file: Create a new file named
.envin the root of your project and add your Gemini API key:API_KEY="YOUR_GEMINI_API_KEY_HERE" -
Run the development server: Use the Vercel CLI to run the project. This is the best method as it correctly serves both the React frontend and the serverless function in the
/apidirectory.vercel dev
Your application should now be running at http://localhost:3000.
Deployment
This application is optimized for deployment on Vercel.
- Push your code to a Git repository (GitHub, GitLab, etc.).
- Import the repository into Vercel.
- Configure the Environment Variable (Crucial Step):
- In your Vercel project settings, navigate to Settings > Environment Variables.
- Add a variable with the name
API_KEYand paste your Gemini API key as the value.
- Deploy. Vercel will automatically handle the build process for both the frontend and the serverless function.
Author
Abhinay Manikanti
- GitHub: @AbhinayManikanti
- LinkedIn: Abhinay Manikanti
- Project Link: https://github.com/AbhinayManikanti/goal-planner