TypeScript
import type { AppState } from "./types";
/** The calendar opens on the week shown in the design, with Tue Nov 10 selected. */
export const DESIGN_DATE = "2026-11-10";
/** Used only for server rendering; the browser swaps in the real date on hydration. */
export const SERVER_TODAY = "2026-10-26";
export const STATE_VERSION = 3;
const h = (hours: number, minutes = 0) => hours * 60 + minutes;
export function createSeed(): AppState {
return {
version: STATE_VERSION,
workspaceId: "ws-main",
workspaces: [
{ id: "ws-main", name: "Kargul Workspace" },
{ id: "ws-acme", name: "Acme Studio" },
{ id: "ws-personal", name: "Personal" },
],
events: [
{ id: "ev-1", title: "Time off", date: "2026-11-09", start: 0, end: 1440, allDay: true, color: "green", requestId: "rq-5" },
{ id: "ev-2", title: "Personal matters", date: "2026-11-08", start: h(11), end: h(12), allDay: false, color: "cyan" },
{
id: "ev-3",
title: "Personal appointment",
date: "2026-11-10",
start: h(7),
end: h(9),
allDay: false,
color: "orange",
note: "Pending",
requestId: "rq-6",
},
{
id: "ev-4",
title: "Extra leave",
date: "2026-11-10",
start: h(11),
end: h(13),
allDay: false,
color: "pink",
note: "From carryover days",
},
{ id: "ev-5", title: "Submit medical certificate", date: "2026-11-11", start: h(10), end: h(11), allDay: false, color: "blue" },
{ id: "ev-6", title: "Update time tracking", date: "2026-11-12", start: h(7, 30), end: h(8), allDay: false, color: "cyan" },
{ id: "ev-7", title: "Benefits review", date: "2026-11-12", start: h(12), end: h(13), allDay: false, color: "blue" },
{
id: "ev-8",
title: "Half-day leave",
date: "2026-11-13",
start: h(8),
end: h(12),
allDay: false,
color: "green",
note: "Approved",
requestId: "rq-7",
},
{ id: "ev-9", title: "Team sync", date: "2026-10-26", start: h(9, 30), end: h(10), allDay: false, color: "blue" },
{ id: "ev-10", title: "Design review", date: "2026-10-27", start: h(14), end: h(15, 30), allDay: false, color: "purple" },
{ id: "ev-11", title: "Payroll cut-off", date: "2026-10-30", start: 0, end: 1440, allDay: true, color: "orange" },
{ id: "ev-12", title: "1:1 with manager", date: "2026-11-04", start: h(11), end: h(11, 30), allDay: false, color: "cyan" },
{ id: "ev-13", title: "Time off", date: "2026-12-23", start: 0, end: 1440, allDay: true, color: "green", requestId: "rq-8" },
{ id: "ev-14", title: "Time off", date: "2026-12-24", start: h(8), end: h(12), allDay: false, color: "green", note: "Approved", requestId: "rq-8" },
{ id: "ev-15", title: "Time off", date: "2026-12-28", start: h(9), end: h(15), allDay: false, color: "green", note: "Pending", requestId: "rq-9" },
],
requests: [
{
id: "rq-1",
status: "approved",
type: "Time off",
duration: "2 days 4 hours",
days: 2.5,
from: "2026-04-19",
to: "2026-04-22",
allDay: true,
notes: "Family vacation, including a half-day leave on April 19",
submittedAt: "2026-04-02T09:12:00.000Z",
},
{
id: "rq-2",
status: "declined",
type: "Sick",
duration: "1 days, 2 hour",
days: 1.25,
from: "2026-04-17",
to: "2026-04-19",
allDay: true,
notes: "Request submitted without medical certificate",
submittedAt: "2026-03-30T08:40:00.000Z",
},
{
id: "rq-3",
status: "approved",
type: "Time off",
duration: "2 days, 7 hour",
days: 1.5,
from: "2026-04-12",
to: "2026-04-16",
allDay: true,
notes: "Traveling out of town for personal matters",
submittedAt: "2026-03-24T15:05:00.000Z",
},
{
id: "rq-4",
status: "approved",
type: "Time off",
duration: "1 days, 10 hour",
days: 1,
from: "2026-04-08",
to: "2026-04-14",
allDay: true,
notes: "Personal appointment during working hours",
submittedAt: "2026-03-18T11:30:00.000Z",
},
{
id: "rq-5",
status: "approved",
type: "Time off",
duration: "1 day",
days: 1,
from: "2026-11-09",
to: "2026-11-09",
allDay: true,
notes: "Long weekend",
submittedAt: "2026-03-10T10:00:00.000Z",
},
{
id: "rq-6",
status: "pending",
type: "Personal",
duration: "2 hours",
days: 0.25,
from: "2026-11-10",
to: "2026-11-10",
allDay: false,
start: h(7),
end: h(9),
notes: "Personal appointment",
submittedAt: "2026-03-08T10:00:00.000Z",
},
{
id: "rq-7",
status: "approved",
type: "Half-day leave",
duration: "4 hours",
days: 0.5,
from: "2026-11-13",
to: "2026-11-13",
allDay: false,
start: h(8),
end: h(12),
notes: "Half-day leave",
submittedAt: "2026-03-05T10:00:00.000Z",
},
{
id: "rq-8",
status: "approved",
type: "Time off",
duration: "1 day 4 hours",
days: 1.5,
from: "2026-12-23",
to: "2026-12-24",
allDay: true,
notes: "Holiday travel",
submittedAt: "2026-02-20T10:00:00.000Z",
},
{
id: "rq-9",
status: "pending",
type: "Time off",
duration: "6 hours",
days: 0.75,
from: "2026-12-28",
to: "2026-12-28",
allDay: false,
start: h(9),
end: h(15),
notes: "Moving apartments",
submittedAt: "2026-02-12T10:00:00.000Z",
},
],
holidays: [
{ id: "ho-1", date: "2026-01-01", name: "New Year's Day" },
{ id: "ho-2", date: "2026-01-26", name: "Republic Day" },
{ id: "ho-3", date: "2026-03-04", name: "Holi" },
{ id: "ho-4", date: "2026-04-03", name: "Good Friday" },
{ id: "ho-5", date: "2026-05-01", name: "Labour Day" },
{ id: "ho-6", date: "2026-06-26", name: "Muharram" },
{ id: "ho-7", date: "2026-08-15", name: "Independence Day" },
{ id: "ho-8", date: "2026-10-02", name: "Gandhi Jayanti" },
{ id: "ho-9", date: "2026-10-20", name: "Dussehra" },
{ id: "ho-10", date: "2026-11-14", name: "Diwali" },
{ id: "ho-11", date: "2026-11-24", name: "Guru Nanak Jayanti" },
{ id: "ho-12", date: "2026-12-25", name: "Christmas Day" },
],
profile: {
name: "Harry Potter",
email: "[email protected]",
initials: "EX",
phone: "+44 20 7946 0958",
jobTitle: "Product Designer",
department: "Design",
manager: "Minerva McGonagall",
location: "London, UK",
startDate: "2023-09-01",
birthday: "1980-07-31",
address: "4 Privet Drive, Little Whinging, Surrey",
emergencyContact: "Ron Weasley · +44 20 7946 0101",
bio: "Designs calm, fast interfaces for the people team.",
},
settings: {
weekStartsOn: 0,
timeFormat: "24h",
dayStartHour: 6,
contractDays: 12,
carryoverDays: 4,
showWeekends: true,
emailNotifications: true,
pushNotifications: false,
weeklyDigest: true,
},
notifications: [
{
id: "no-1",
title: "Half-day leave approved",
body: "Your half-day leave on Nov 13 was approved by Minerva.",
createdAt: "2026-10-25T16:20:00.000Z",
read: true,
href: "/time-off",
},
{
id: "no-2",
title: "Medical certificate due",
body: "Upload your certificate before Nov 11 to keep your sick leave valid.",
createdAt: "2026-10-24T09:00:00.000Z",
read: true,
href: "/documents",
},
{
id: "no-3",
title: "Benefits review scheduled",
body: "A benefits review was added to your calendar for Nov 12.",
createdAt: "2026-10-21T13:45:00.000Z",
read: true,
href: "/benefits",
},
],
documents: [
{ id: "doc-1", name: "Employment contract.pdf", category: "Contract", size: 482_311, uploadedAt: "2023-08-21T10:00:00.000Z", starred: true },
{ id: "doc-2", name: "Payslip – September 2026.pdf", category: "Payslip", size: 121_004, uploadedAt: "2026-09-30T10:00:00.000Z" },
{ id: "doc-3", name: "Payslip – August 2026.pdf", category: "Payslip", size: 119_662, uploadedAt: "2026-08-31T10:00:00.000Z" },
{ id: "doc-4", name: "Leave policy 2026.pdf", category: "Policy", size: 248_120, uploadedAt: "2026-01-04T10:00:00.000Z" },
{ id: "doc-5", name: "P60 – 2025.pdf", category: "Tax", size: 88_430, uploadedAt: "2026-05-12T10:00:00.000Z" },
{ id: "doc-6", name: "Remote work agreement.pdf", category: "Contract", size: 201_877, uploadedAt: "2025-02-17T10:00:00.000Z" },
],
timeEntries: [
{ id: "te-1", date: "2026-10-26", project: "Calendar app", task: "Week view polish", minutes: 150, billable: true },
{ id: "te-2", date: "2026-10-23", project: "Calendar app", task: "Event drag & drop", minutes: 240, billable: true },
{ id: "te-3", date: "2026-10-23", project: "Internal", task: "Team sync", minutes: 30, billable: false },
{ id: "te-4", date: "2026-10-22", project: "Design system", task: "Token audit", minutes: 300, billable: true },
{ id: "te-5", date: "2026-10-21", project: "Calendar app", task: "Request flow", minutes: 360, billable: true },
{ id: "te-6", date: "2026-10-20", project: "Internal", task: "Planning", minutes: 90, billable: false },
{ id: "te-7", date: "2026-10-20", project: "Design system", task: "Icon review", minutes: 210, billable: true },
],
timer: { running: false, startedAt: null, project: "Calendar app", task: "" },
invoices: [
{
id: "in-1",
number: "INV-2026-014",
client: "Acme Studio",
issueDate: "2026-10-01",
dueDate: "2026-10-31",
status: "sent",
currency: "USD",
notes: "Thank you for your business.",
items: [
{ id: "it-1", description: "Product design — October", quantity: 80, rate: 65 },
{ id: "it-2", description: "Design system maintenance", quantity: 12, rate: 65 },
],
},
{
id: "in-2",
number: "INV-2026-013",
client: "Acme Studio",
issueDate: "2026-09-01",
dueDate: "2026-09-30",
status: "paid",
currency: "USD",
notes: "",
items: [{ id: "it-3", description: "Product design — September", quantity: 76, rate: 65 }],
},
{
id: "in-3",
number: "INV-2026-012",
client: "Northwind Labs",
issueDate: "2026-08-14",
dueDate: "2026-09-13",
status: "overdue",
currency: "USD",
notes: "Second reminder sent.",
items: [{ id: "it-4", description: "UX audit", quantity: 1, rate: 2400 }],
},
],
withdrawalMethods: [
{
id: "wm-1",
kind: "bank",
label: "Barclays Current",
holder: "Harry Potter",
last4: "4821",
currency: "GBP",
isDefault: true,
addedAt: "2024-01-12T10:00:00.000Z",
},
{
id: "wm-2",
kind: "paypal",
label: "PayPal",
holder: "[email protected]",
last4: "",
currency: "USD",
isDefault: false,
addedAt: "2025-06-02T10:00:00.000Z",
},
],
benefits: [
{
id: "be-1",
name: "Private health insurance",
provider: "Bupa",
category: "Health",
description: "Comprehensive cover including outpatient, dental and optical.",
budget: 0,
used: 0,
enrolled: true,
renewsOn: "2027-01-01",
},
{
id: "be-2",
name: "Learning budget",
provider: "Company",
category: "Learning",
description: "Courses, books and conferences that help you grow.",
budget: 1500,
used: 420,
enrolled: true,
renewsOn: "2027-01-01",
},
{
id: "be-3",
name: "Wellness allowance",
provider: "ClassPass",
category: "Wellness",
description: "Gym, yoga and mental-health apps every month.",
budget: 600,
used: 275,
enrolled: true,
renewsOn: "2027-01-01",
},
{
id: "be-4",
name: "Pension matching",
provider: "Aviva",
category: "Financial",
description: "We match contributions up to 5% of your salary.",
budget: 0,
used: 0,
enrolled: false,
renewsOn: "2027-04-06",
},
{
id: "be-5",
name: "Home office stipend",
provider: "Company",
category: "Lifestyle",
description: "Desk, chair, monitor — whatever makes home work better.",
budget: 800,
used: 0,
enrolled: false,
renewsOn: "2027-01-01",
},
],
};
}