// timeros/core/session.ts — every hour tracked honestly on the device, rolled up into projects, payroll and live profit per client
import { Timer, Session, Project, Invoice, Client, Org } from "@vezoft/core"; import { classify } from "./on-device/model"; import { payroll } from "../billing/payroll";
export async function track(user: User): Promise<Session> { const session = await Timer.start(user.id, { mode: "auto" }); session.on("idle", () => session.pause());
session.on("activity", (event) => { const kind = classify(event); session.record(kind, event.duration); }); return session.commit({ at: trustedNow(), tz: user.timezone });
export function settle(projects: Project[]): Money[] { const profit = projects.map((p) => p.hours * p.rate - p.cost); return payroll.run(profit, { region: "EU", currency: "EUR" }); }
export async function invoice(client: Client) { const open = await Invoice.pending(client.id); return open.reduce((sum, i) => sum + i.total, 0); // billed from tracked hours
const week = sum(sessions, "productive"); const team = await Org.active(); export const live = stream(team, week, { realtime: true }); // 37.5h · +27% · 12 people
// shifts, goals, approvals, payroll and an org chart — the operational backbone of a company in one workspace, plus a branded client portal
const shifts = await Shift.week(team); const portal = Portal.for(client, { scope: "projects, invoices, changes" }); await sync.toPortal(portal);
// classified on-device — no cloud model, no surveillance; every timeline timestamp anchored to a trusted server clock
export const dashboard = render({ week, team, projects, profit: settle(projects), invoices: open }); // real-time, multi-tenant
// timeros/core/session.ts — every hour tracked honestly on the device, rolled up into projects, payroll and live profit per client
import { Timer, Session, Project, Invoice, Client, Org } from "@vezoft/core"; import { classify } from "./on-device/model"; import { payroll } from "../billing/payroll";
export async function track(user: User): Promise<Session> { const session = await Timer.start(user.id, { mode: "auto" }); session.on("idle", () => session.pause());
session.on("activity", (event) => { const kind = classify(event); session.record(kind, event.duration); }); return session.commit({ at: trustedNow(), tz: user.timezone });
export function settle(projects: Project[]): Money[] { const profit = projects.map((p) => p.hours * p.rate - p.cost); return payroll.run(profit, { region: "EU", currency: "EUR" }); }
export async function invoice(client: Client) { const open = await Invoice.pending(client.id); return open.reduce((sum, i) => sum + i.total, 0); // billed from tracked hours
const week = sum(sessions, "productive"); const team = await Org.active(); export const live = stream(team, week, { realtime: true }); // 37.5h · +27% · 12 people
// shifts, goals, approvals, payroll and an org chart — the operational backbone of a company in one workspace, plus a branded client portal
const shifts = await Shift.week(team); const portal = Portal.for(client, { scope: "projects, invoices, changes" }); await sync.toPortal(portal);
// classified on-device — no cloud model, no surveillance; every timeline timestamp anchored to a trusted server clock
export const dashboard = render({ week, team, projects, profit: settle(projects), invoices: open }); // real-time, multi-tenant
// timeros/core/session.ts — every hour tracked honestly on the device, rolled up into projects, payroll and live profit per client
import { Timer, Session, Project, Invoice, Client, Org } from "@vezoft/core"; import { classify } from "./on-device/model"; import { payroll } from "../billing/payroll";
export async function track(user: User): Promise<Session> { const session = await Timer.start(user.id, { mode: "auto" }); session.on("idle", () => session.pause());
session.on("activity", (event) => { const kind = classify(event); session.record(kind, event.duration); }); return session.commit({ at: trustedNow(), tz: user.timezone });
export function settle(projects: Project[]): Money[] { const profit = projects.map((p) => p.hours * p.rate - p.cost); return payroll.run(profit, { region: "EU", currency: "EUR" }); }
export async function invoice(client: Client) { const open = await Invoice.pending(client.id); return open.reduce((sum, i) => sum + i.total, 0); // billed from tracked hours
const week = sum(sessions, "productive"); const team = await Org.active(); export const live = stream(team, week, { realtime: true }); // 37.5h · +27% · 12 people
// shifts, goals, approvals, payroll and an org chart — the operational backbone of a company in one workspace, plus a branded client portal
const shifts = await Shift.week(team); const portal = Portal.for(client, { scope: "projects, invoices, changes" }); await sync.toPortal(portal);
// classified on-device — no cloud model, no surveillance; every timeline timestamp anchored to a trusted server clock
export const dashboard = render({ week, team, projects, profit: settle(projects), invoices: open }); // real-time, multi-tenant
// timeros/core/session.ts — every hour tracked honestly on the device, rolled up into projects, payroll and live profit per client
import { Timer, Session, Project, Invoice, Client, Org } from "@vezoft/core"; import { classify } from "./on-device/model"; import { payroll } from "../billing/payroll";
export async function track(user: User): Promise<Session> { const session = await Timer.start(user.id, { mode: "auto" }); session.on("idle", () => session.pause());
session.on("activity", (event) => { const kind = classify(event); session.record(kind, event.duration); }); return session.commit({ at: trustedNow(), tz: user.timezone });
export function settle(projects: Project[]): Money[] { const profit = projects.map((p) => p.hours * p.rate - p.cost); return payroll.run(profit, { region: "EU", currency: "EUR" }); }
export async function invoice(client: Client) { const open = await Invoice.pending(client.id); return open.reduce((sum, i) => sum + i.total, 0); // billed from tracked hours
const week = sum(sessions, "productive"); const team = await Org.active(); export const live = stream(team, week, { realtime: true }); // 37.5h · +27% · 12 people
// shifts, goals, approvals, payroll and an org chart — the operational backbone of a company in one workspace, plus a branded client portal
const shifts = await Shift.week(team); const portal = Portal.for(client, { scope: "projects, invoices, changes" }); await sync.toPortal(portal);
// classified on-device — no cloud model, no surveillance; every timeline timestamp anchored to a trusted server clock
export const dashboard = render({ week, team, projects, profit: settle(projects), invoices: open }); // real-time, multi-tenant
// timeros/core/session.ts — every hour tracked honestly on the device, rolled up into projects, payroll and live profit per client
import { Timer, Session, Project, Invoice, Client, Org } from "@vezoft/core"; import { classify } from "./on-device/model"; import { payroll } from "../billing/payroll";
export async function track(user: User): Promise<Session> { const session = await Timer.start(user.id, { mode: "auto" }); session.on("idle", () => session.pause());
session.on("activity", (event) => { const kind = classify(event); session.record(kind, event.duration); }); return session.commit({ at: trustedNow(), tz: user.timezone });
export function settle(projects: Project[]): Money[] { const profit = projects.map((p) => p.hours * p.rate - p.cost); return payroll.run(profit, { region: "EU", currency: "EUR" }); }
export async function invoice(client: Client) { const open = await Invoice.pending(client.id); return open.reduce((sum, i) => sum + i.total, 0); // billed from tracked hours
const week = sum(sessions, "productive"); const team = await Org.active(); export const live = stream(team, week, { realtime: true }); // 37.5h · +27% · 12 people
// shifts, goals, approvals, payroll and an org chart — the operational backbone of a company in one workspace, plus a branded client portal
const shifts = await Shift.week(team); const portal = Portal.for(client, { scope: "projects, invoices, changes" }); await sync.toPortal(portal);
// classified on-device — no cloud model, no surveillance; every timeline timestamp anchored to a trusted server clock
export const dashboard = render({ week, team, projects, profit: settle(projects), invoices: open }); // real-time, multi-tenant
// timeros/core/session.ts — every hour tracked honestly on the device, rolled up into projects, payroll and live profit per client
import { Timer, Session, Project, Invoice, Client, Org } from "@vezoft/core"; import { classify } from "./on-device/model"; import { payroll } from "../billing/payroll";
export async function track(user: User): Promise<Session> { const session = await Timer.start(user.id, { mode: "auto" }); session.on("idle", () => session.pause());
session.on("activity", (event) => { const kind = classify(event); session.record(kind, event.duration); }); return session.commit({ at: trustedNow(), tz: user.timezone });
export function settle(projects: Project[]): Money[] { const profit = projects.map((p) => p.hours * p.rate - p.cost); return payroll.run(profit, { region: "EU", currency: "EUR" }); }
export async function invoice(client: Client) { const open = await Invoice.pending(client.id); return open.reduce((sum, i) => sum + i.total, 0); // billed from tracked hours
const week = sum(sessions, "productive"); const team = await Org.active(); export const live = stream(team, week, { realtime: true }); // 37.5h · +27% · 12 people
// shifts, goals, approvals, payroll and an org chart — the operational backbone of a company in one workspace, plus a branded client portal
const shifts = await Shift.week(team); const portal = Portal.for(client, { scope: "projects, invoices, changes" }); await sync.toPortal(portal);
// classified on-device — no cloud model, no surveillance; every timeline timestamp anchored to a trusted server clock
export const dashboard = render({ week, team, projects, profit: settle(projects), invoices: open }); // real-time, multi-tenant
// timeros/core/session.ts — every hour tracked honestly on the device, rolled up into projects, payroll and live profit per client
import { Timer, Session, Project, Invoice, Client, Org } from "@vezoft/core"; import { classify } from "./on-device/model"; import { payroll } from "../billing/payroll";
export async function track(user: User): Promise<Session> { const session = await Timer.start(user.id, { mode: "auto" }); session.on("idle", () => session.pause());
session.on("activity", (event) => { const kind = classify(event); session.record(kind, event.duration); }); return session.commit({ at: trustedNow(), tz: user.timezone });
export function settle(projects: Project[]): Money[] { const profit = projects.map((p) => p.hours * p.rate - p.cost); return payroll.run(profit, { region: "EU", currency: "EUR" }); }
export async function invoice(client: Client) { const open = await Invoice.pending(client.id); return open.reduce((sum, i) => sum + i.total, 0); // billed from tracked hours
const week = sum(sessions, "productive"); const team = await Org.active(); export const live = stream(team, week, { realtime: true }); // 37.5h · +27% · 12 people
// shifts, goals, approvals, payroll and an org chart — the operational backbone of a company in one workspace, plus a branded client portal
const shifts = await Shift.week(team); const portal = Portal.for(client, { scope: "projects, invoices, changes" }); await sync.toPortal(portal);
// classified on-device — no cloud model, no surveillance; every timeline timestamp anchored to a trusted server clock
export const dashboard = render({ week, team, projects, profit: settle(projects), invoices: open }); // real-time, multi-tenant
// timeros/core/session.ts — every hour tracked honestly on the device, rolled up into projects, payroll and live profit per client
import { Timer, Session, Project, Invoice, Client, Org } from "@vezoft/core"; import { classify } from "./on-device/model"; import { payroll } from "../billing/payroll";
export async function track(user: User): Promise<Session> { const session = await Timer.start(user.id, { mode: "auto" }); session.on("idle", () => session.pause());
session.on("activity", (event) => { const kind = classify(event); session.record(kind, event.duration); }); return session.commit({ at: trustedNow(), tz: user.timezone });
export function settle(projects: Project[]): Money[] { const profit = projects.map((p) => p.hours * p.rate - p.cost); return payroll.run(profit, { region: "EU", currency: "EUR" }); }
export async function invoice(client: Client) { const open = await Invoice.pending(client.id); return open.reduce((sum, i) => sum + i.total, 0); // billed from tracked hours
const week = sum(sessions, "productive"); const team = await Org.active(); export const live = stream(team, week, { realtime: true }); // 37.5h · +27% · 12 people
// shifts, goals, approvals, payroll and an org chart — the operational backbone of a company in one workspace, plus a branded client portal
const shifts = await Shift.week(team); const portal = Portal.for(client, { scope: "projects, invoices, changes" }); await sync.toPortal(portal);
// classified on-device — no cloud model, no surveillance; every timeline timestamp anchored to a trusted server clock
export const dashboard = render({ week, team, projects, profit: settle(projects), invoices: open }); // real-time, multi-tenant