{"id":28972601,"url":"https://github.com/blackmann/logsff","last_synced_at":"2025-06-24T11:07:11.838Z","repository":{"id":291329757,"uuid":"976787607","full_name":"blackmann/logsff","owner":"blackmann","description":"Follow server logs","archived":false,"fork":false,"pushed_at":"2025-05-25T17:07:26.000Z","size":775,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-25T18:24:12.142Z","etag":null,"topics":["backend-services","observability","remix-run"],"latest_commit_sha":null,"homepage":"https://degreat.co.uk/logsff","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blackmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-02T18:47:13.000Z","updated_at":"2025-05-25T17:44:00.000Z","dependencies_parsed_at":"2025-05-03T23:17:45.253Z","dependency_job_id":"39c361ca-2207-494e-90e1-bc04ac759f8a","html_url":"https://github.com/blackmann/logsff","commit_stats":null,"previous_names":["blackmann/logsff"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blackmann/logsff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackmann%2Flogsff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackmann%2Flogsff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackmann%2Flogsff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackmann%2Flogsff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blackmann","download_url":"https://codeload.github.com/blackmann/logsff/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackmann%2Flogsff/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261658588,"owners_count":23191088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend-services","observability","remix-run"],"created_at":"2025-06-24T11:07:09.435Z","updated_at":"2025-06-24T11:07:11.823Z","avatar_url":"https://github.com/blackmann.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logsff\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"public/assets/sc-dashboard.png\" style=\"border-radius: 1rem\" width=\"500\"/\u003e\u003c/p\u003e\n\nThis is a simple to use, simple to deploy observability for backend applications. You can simply deploy this application with vercel.\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fblackmann%2Flogsff\u0026env=COOKIE_SECRET\u0026integration-ids=oac_3sK3gnG06emjIEVL09jjntDD)\n\n## Development\n\nProject uses `yarn`. Run `yarn install` afer cloning the project. You'll need a postgres database either locally installed or from some online provider.\n\n## Env variables\n\nThe env variables required are:\n\n```sh\nDATABASE_URL=\"postgresql://postgres@127.0.0.1:5432/logsff?schema=public\"\nCOOKIE_SECRET=secret1,secret2\nAPP_TOKEN=somerandomtoken\n```\n\nFor a live version of your app, you can use [Neon](https://neon.tech) database.\n\n## Usage\n\nTo record a log, make a POST request to `/logs` with the following format:\n\n```ts\ntype Log = {\n  type: \"request\",\n  appId: string,\n  method: string,\n  path: string,\n  status: number,\n  timestamp: number,\n  duration: number,\n  sessionId?: string,\n  meta?: Record\u003cstring, any\u003e,\n} | {\n  type: \"app\"\n  appId: string,\n  level: \"info\" | \"error\" | \"warn\",\n  message: string,\n  timestamp: number,\n  meta?: Record\u003cstring, any\u003e,\n}\n\n```\n\n`appId` is the slug of the app. This can be set when creating an app from the dashboard.\n\n`sessionId` is an optional field that can be used to group logs by a session. This is useful for logging requests that are part of a single user session.\n\n`meta` is an optional field that can be used to add any additional data to the log.\n\n## Client\n\nThere's a ready-to-use client implemented at [/logsff-client.ts](/logsff-client.ts) that you can copy and paste into your Typescript project. However, you can implement your own client in any language or format you want. You can use the `logsff-client.ts` as a reference implementation.\n\n```ts\nimport { send } from \"./logsff-client\";\n\nsend({\n  type: \"request\",\n  appId: \"my-app\",\n  method: \"GET\",\n  path: \"/\",\n  status: 200,\n  timestamp: Date.now(),\n  duration: 100,\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackmann%2Flogsff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackmann%2Flogsff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackmann%2Flogsff/lists"}