Jobley / app · jobley.ai / Sources / JobleyKit / HouseRules.swift
| 1 | import Foundation |
| 2 | |
| 3 | /// What counts as a good job (PRD section 4, the same list as jobley.ai/help/#rules). A person |
| 4 | /// reads every post against it and ticks each rule by hand; nothing here checks a post automatically. |
| 5 | public enum HouseRules { |
| 6 | public struct Rule: Identifiable, Hashable, Sendable { |
| 7 | public let title: String |
| 8 | public let detail: String |
| 9 | public var id: String { title } |
| 10 | } |
| 11 | |
| 12 | public static let all: [Rule] = [ |
| 13 | Rule(title: "A real company, named.", detail: "We can find it: a working website or a public record. A recruiter posting for someone else names who the job is with."), |
| 14 | Rule(title: "Fair pay, shown.", detail: "\(payRule) We show a lowest and a highest figure, and whether it is by the year, month, week, day or hour. “Competitive” is not a number."), |
| 15 | Rule(title: "Honest, paid work.", detail: "No commission-only roles, no multi-level marketing, no unpaid trials, no “pay to apply” and no fees for training, kits or equipment."), |
| 16 | Rule(title: "A clear description.", detail: "It says what you would do, who you would work with, where and when. Not a list of buzzwords."), |
| 17 | Rule(title: "One job per post.", detail: "A real opening that exists today, not a talent pool, an advertisement or a course."), |
| 18 | Rule(title: "Legal and fair.", detail: "Nothing that asks for a photo, age, religion or anything else it is not fair or lawful to ask, and nothing that asks for bank or ID details up front."), |
| 19 | Rule(title: "Reachable.", detail: "A real person’s name and email with the post, so we can introduce candidates. We keep those private.") |
| 20 | ] |
| 21 | |
| 22 | /// The pay floor, in step with MIN_HOURLY_USD and PAY_FLOOR in jobley-site's src/config.js. The server |
| 23 | /// enforces it; the apps only warn early with the same message. A full-time year is 2,080 hours. |
| 24 | public static let minHourlyUSD = 100 |
| 25 | public static let hoursAYear = 2080 |
| 26 | static let periodsAYear: [String: Int] = ["hour": 2080, "day": 260, "week": 52, "month": 12, "year": 1] |
| 27 | public static var payFloorShort: String { "$\(minHourlyUSD) an hour or more, or $\((minHourlyUSD * hoursAYear).formatted()) a year full time" } |
| 28 | public static var payRule: String { |
| 29 | "At least $\(minHourlyUSD) an hour, or $\((minHourlyUSD * hoursAYear).formatted()) a year full time, or the same in local currency. By the hour or salaried, full or part time, with or without benefits." |
| 30 | } |
| 31 | public static var payFloorMessage: String { |
| 32 | "Pay must be at least $\(minHourlyUSD) an hour, or $\((minHourlyUSD * hoursAYear).formatted()) a year full time." |
| 33 | } |
| 34 | /// True when a USD job's lowest pay is under the floor. Other currencies are judged by the person reviewing. |
| 35 | public static func belowPayFloor(min: Int?, period: String, currency: String) -> Bool { |
| 36 | guard let min, currency.uppercased() == "USD", let perYear = periodsAYear[period] else { return false } |
| 37 | return min * perYear < minHourlyUSD * hoursAYear |
| 38 | } |
| 39 | |
| 40 | /// The promise every place that takes a post makes. Only a person's token can publish a job. |
| 41 | public static let guarantee = "Every job you post is reviewed by a real person before it goes live. No AI decides." |
| 42 | |
| 43 | public static let neverPublished = "Never published: scams, adult services, anything unlawful, or a copy of another company's listing without their say." |
| 44 | |
| 45 | public static var text: String { |
| 46 | guarantee + "\n\n" + all.enumerated().map { "\($0.offset + 1). \($0.element.title) \($0.element.detail)" }.joined(separator: "\n") + "\n\n" + neverPublished |
| 47 | } |
| 48 | } |