import { db } from "./db";
import type { Client } from "./types";
export async function createProject(client: Client) {
const project = await db.projects.create({
data: {
name: client.name,
domain: client.domain,
plan: "starter",
launchDate: new Date(),
},
});
await sendWelcomeEmail(client.email, project);
return project;
}
export function calculateInvoice(hours: number, rate = 850) {
const subtotal = hours * rate;
const vat = subtotal * 0.25;
return { subtotal, vat, total: subtotal + vat };
}
// Deploy to production
export async function deploy(target: "staging" | "production") {
console.log(`Deploying to ${target}...`);
await build();
await publish(target);
return { status: "success", target };
}
import { db } from "./db";
import type { Client } from "./types";
export async function createProject(client: Client) {
const project = await db.projects.create({
data: {
name: client.name,
domain: client.domain,
plan: "starter",
launchDate: new Date(),
},
});
await sendWelcomeEmail(client.email, project);
return project;
}
export function calculateInvoice(hours: number, rate = 850) {
const subtotal = hours * rate;
const vat = subtotal * 0.25;
return { subtotal, vat, total: subtotal + vat };
}
// Deploy to production
export async function deploy(target: "staging" | "production") {
console.log(`Deploying to ${target}...`);
await build();
await publish(target);
return { status: "success", target };
}
import { db } from "./db";
import type { Client } from "./types";
export async function createProject(client: Client) {
const project = await db.projects.create({
data: {
name: client.name,
domain: client.domain,
plan: "starter",
launchDate: new Date(),
},
});
await sendWelcomeEmail(client.email, project);
return project;
}
export function calculateInvoice(hours: number, rate = 850) {
const subtotal = hours * rate;
const vat = subtotal * 0.25;
return { subtotal, vat, total: subtotal + vat };
}
// Deploy to production
export async function deploy(target: "staging" | "production") {
console.log(`Deploying to ${target}...`);
await build();
await publish(target);
return { status: "success", target };
}
import { db } from "./db";
import type { Client } from "./types";
export async function createProject(client: Client) {
const project = await db.projects.create({
data: {
name: client.name,
domain: client.domain,
plan: "starter",
launchDate: new Date(),
},
});
await sendWelcomeEmail(client.email, project);
return project;
}
export function calculateInvoice(hours: number, rate = 850) {
const subtotal = hours * rate;
const vat = subtotal * 0.25;
return { subtotal, vat, total: subtotal + vat };
}
// Deploy to production
export async function deploy(target: "staging" | "production") {
console.log(`Deploying to ${target}...`);
await build();
await publish(target);
return { status: "success", target };
}
import { db } from "./db";
import type { Client } from "./types";
export async function createProject(client: Client) {
const project = await db.projects.create({
data: {
name: client.name,
domain: client.domain,
plan: "starter",
launchDate: new Date(),
},
});
await sendWelcomeEmail(client.email, project);
return project;
}
export function calculateInvoice(hours: number, rate = 850) {
const subtotal = hours * rate;
const vat = subtotal * 0.25;
return { subtotal, vat, total: subtotal + vat };
}
// Deploy to production
export async function deploy(target: "staging" | "production") {
console.log(`Deploying to ${target}...`);
await build();
await publish(target);
return { status: "success", target };
}
import { db } from "./db";
import type { Client } from "./types";
export async function createProject(client: Client) {
const project = await db.projects.create({
data: {
name: client.name,
domain: client.domain,
plan: "starter",
launchDate: new Date(),
},
});
await sendWelcomeEmail(client.email, project);
return project;
}
export function calculateInvoice(hours: number, rate = 850) {
const subtotal = hours * rate;
const vat = subtotal * 0.25;
return { subtotal, vat, total: subtotal + vat };
}
// Deploy to production
export async function deploy(target: "staging" | "production") {
console.log(`Deploying to ${target}...`);
await build();
await publish(target);
return { status: "success", target };
}
import { db } from "./db";
import type { Client } from "./types";
export async function createProject(client: Client) {
const project = await db.projects.create({
data: {
name: client.name,
domain: client.domain,
plan: "starter",
launchDate: new Date(),
},
});
await sendWelcomeEmail(client.email, project);
return project;
}
export function calculateInvoice(hours: number, rate = 850) {
const subtotal = hours * rate;
const vat = subtotal * 0.25;
return { subtotal, vat, total: subtotal + vat };
}
// Deploy to production
export async function deploy(target: "staging" | "production") {
console.log(`Deploying to ${target}...`);
await build();
await publish(target);
return { status: "success", target };
}
import { db } from "./db";
import type { Client } from "./types";
export async function createProject(client: Client) {
const project = await db.projects.create({
data: {
name: client.name,
domain: client.domain,
plan: "starter",
launchDate: new Date(),
},
});
await sendWelcomeEmail(client.email, project);
return project;
}
export function calculateInvoice(hours: number, rate = 850) {
const subtotal = hours * rate;
const vat = subtotal * 0.25;
return { subtotal, vat, total: subtotal + vat };
}
// Deploy to production
export async function deploy(target: "staging" | "production") {
console.log(`Deploying to ${target}...`);
await build();
await publish(target);
return { status: "success", target };
}