AUTHOR: YD (Mentor)
DATE: 2026-03-08
RE: FlowState // Project Direction

FlowState Project Direction

Your demo proved your frontend skills. The next challenge is not UI. It is architecture: how data flows, how scheduling logic works, and how to ship a real product. This document gives you the big picture. We will fill in details together as we go.

The Four Phases

This is the order of priority. Each phase builds on the one before it. Do not skip ahead.

  1. Requirements & Data Modeling Decide what tables you need. Draw relationships between schedules, tasks, energy profiles, and logs. Get the schema right before writing any feature code. This is the foundation everything else depends on.
  2. Scheduling Algorithm Build a rule-based engine that takes your schedule, energy curve, and task list as inputs and produces a conflict-free, energy-aware daily plan as output. No ML. Well-written rules are the goal.
  3. Data Pipeline & Dashboard Track real usage (task start/completion times), aggregate it, and display it. Replace demo hardcoded data with your own. The LLM insight layer goes here too, but it is the lowest priority item in the entire project.
  4. Deploy & Report Ship it to Vercel. Write the final report. A deployed app you can share via link is the finish line.

Key Decisions

You asked good questions in your proposal. Here are the answers.

[Q1] How to handle cold start with no user data? :::

Your instinct is correct. Here is the concrete approach:

  1. The schedule itself is data. Consecutive classes automatically flag low energy. Before 8am and after 10pm flag low energy
  2. Add a template selector (early bird / night owl) and you have a usable initial model
  3. v1 is rule-based. That is fine. Well-written rules beat force-fitted ML every time.
[Q2] Seven separate energy curves too complex? :::

Yes. Simplify to two curves: class-day vs free-day. A student's energy pattern has exactly two modes.

Onboarding in three steps: pick template → import schedule → manual tweak. Done.

[Q3] Which LLM? :::

Claude API or Gemini API. Pick one, move on. You have a Claude subscription, so start there. Gemini free tier also works.

  • Do not self-host Ollama. It adds complexity for zero product value
  • This is the lowest-priority feature in the entire project. One API call plus a prompt template. Do not spend more than one day on it
  • The skill is not "which LLM to pick". It is "how to write a prompt template that produces stable, useful output"
[Q4] Where does the Mentor focus? :::

Scheduling engine + data modeling. These are the two areas where architecture decisions matter most and where I can add the most value.

  • Your frontend is already strong. You own that
  • LLM integration is one API call. Deployment is a button
  • We will whiteboard scheduling edge cases and review your schema together. Everything else, you drive

Data Model Reference

This is a starting point, not the answer. Your homework is to draw your own version. Think about what columns each table needs and how they connect.

schedules
─────────────────
id           PK
user_id      FK
day_of_week
start_time
end_time
course_name
tasks
─────────────────
id           PK
user_id      FK
title
duration_min
priority
deadline
category
energy_profiles
─────────────────
id           PK
user_id      FK
profile_type enum
  class_day | free_day
hour         0-23
energy       0-100
task_logs
─────────────────
id           PK
task_id      FK → tasks
scheduled_start
actual_start
actual_end
completed    bool
Relationships
─────────────
user  1 ──< N  schedules        one user, many class slots
user  1 ──< N  tasks            one user, many tasks
user  1 ──< N  energy_profiles  two curves x 24 hours = 48 rows
tasks 1 ──< N  task_logs        one task, many schedule attempts

Your First Step

[HOMEWORK] :::

Before our next meeting, complete these three items. Write in your own words.

  1. Pick your frontend framework. Vanilla JS or React. Write your choice and one sentence explaining why
  2. Draw an ER diagram. At least four tables: schedules tasks energy_profiles task_logs. Label columns and relationships
  3. List three scheduling edge cases. Think of three "what if..." scenarios that your engine needs to handle

© 2026 ydhuang. All rights reserved.