{"id":18450054,"url":"https://github.com/quiode/website-chris-backend","last_synced_at":"2025-04-18T00:22:55.507Z","repository":{"id":132942852,"uuid":"462847140","full_name":"quiode/website-chris-backend","owner":"quiode","description":"The Backend of the Website for Christoph Anton-Cornelius Bärtsch","archived":false,"fork":false,"pushed_at":"2023-06-14T20:57:34.000Z","size":6922,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T13:44:24.283Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quiode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2022-02-23T17:54:08.000Z","updated_at":"2022-03-13T10:50:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"0306a52d-a355-422a-947a-6ca3a49de5a0","html_url":"https://github.com/quiode/website-chris-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiode%2Fwebsite-chris-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiode%2Fwebsite-chris-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiode%2Fwebsite-chris-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiode%2Fwebsite-chris-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quiode","download_url":"https://codeload.github.com/quiode/website-chris-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167445,"owners_count":21223506,"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":[],"created_at":"2024-11-06T07:23:14.317Z","updated_at":"2025-04-15T23:00:18.805Z","avatar_url":"https://github.com/quiode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backend for the Website of Christoph Anton-Cornelius Bärtsch\n\n## Setup\n\n- install ffmpeg (https://www.ffmpeg.org/download.html)\n- fill the `ormconfig.env` file with your database connection\n- create admin account with signup api (only possible of prod = false) \u003c!-- TODO: replace with env var --\u003e\n- run `typeorm schema:sync` once to sync the database with the schema (should be done automatically via TYPEORM_SYNCHRONIZE = true)\n\n## API Documentation\n\n### Authentication\n\nCurrently, there is only one admin user. This user can upload and delete files.  \nThe user is authenticated by a JWT token. The token is generated by the server and sent to the client.  \nIt will be valid for 15 minutes.\n\n#### POST\n\n`https://domain:3000/auth/login` _returns the token, it requires the following body:_\n\n```json\n{\n  \"username\": \"...\",\n  \"password\": \"...\"\n}\n```\n\nResponse:\n\n```json\n{\n  \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImRvbWluaWsiLCJzdWIiOjEsImlhdCI6MTY0NTkwNjc5NywiZXhwIjoxNjQ1OTA3Njk3fQ.ayFmmlOSEY6pTxcLATgSO7wf7pWvkpM5lNrYk4WhFdY\"\n}\n```\n\n### Stills\n\n#### GET\n\n`https://domain:3000/stills/uuid` _returns the still as stream, metadata is encoded in headers_\n\n`https://domain:3000/stills/uuid/thumbnail` _returns the thumbnail of the still as stream, metadata is encoded in headers_\n\n`https://domain:3000/stills/` _returns a list of all stills_\n\nExample Response:\n\n```json\n[\n  {\n    \"id\": \"83f51b91-b66e-49f0-8773-b06b6f613d15\",\n    \"hash\": \"7d3ee0c0bc4fe041b63360ca2bfef583f28f460d2e8ca6f01f357baa2c7d1bcb\",\n    \"position\": 0\n  },\n  {\n    \"id\": \"84522e61-4294-401c-afda-d27f04512d09\",\n    \"hash\": \"eac318afddd47fc4d8cf6de3579d4cfe28316173dbac3c6906d652fe991d9b38\",\n    \"position\": 1\n  },\n  {\n    \"id\": \"1d11878c-b31b-4332-aeff-ff2bd43bf269\",\n    \"hash\": \"f7f471ccf608f5868002cb8fb14d557fb03e62ba247c10d177ac68214a4869d9\",\n    \"position\": 2\n  },\n  {\n    \"id\": \"768c3805-163b-4c96-b18d-a56d92eb5151\",\n    \"hash\": \"5d3d47eb829a7394e5c1e44597397b083e18e7ee14f4dfba289168f5cdb09179\",\n    \"position\": 3\n  }\n]\n```\n\n`https://domain:3000/stills/amount/` _returns the amount of stills_\n\n`https://domain:3000/stills/amount/amount` _returns `amount` stills, starting at position 0 up to `amount-1`_\n\n`https://domain:3000/stills/amount/from/to` _returns `amount` stills, starting at position `from` up to `to`_\n\n#### POST\n\n`https://domain:3000/stills` _uploads a still, the body contains the file, form field label is `file`_\n\n#### DELETE\n\n`https://domain:3000/stills/uuid` _deletes the still with the given uuid_\n\n#### PATCH\n\n\u003c!-- `https://domain:3000/stills/uuid` _inserts still into new position (position has to be a json body)_\n`https://domain:3000/stills/uuid1/uuid2` _replaces two positions with each other_ --\u003e\n\u003c!-- TODO --\u003e\n\n`https://doimain:3000/stills/replace`\n\n### Videos\n\n#### GET\n\n`https://domain:3000/videos/uuid` _returns the video as stream_\n`https://domain:3000/videos` _returns a list of all videos_\n\n#### POST\n\n`https://domain:3000/videos` _uploads a video in a from, form fields: video, picture1, picture2, picture3, metadata: {url, line1, line2}_\n\n#### DELETE\n\n\u003c!-- TODO --\u003e\n\n#### PATCH\n\n\u003c!-- TODO --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquiode%2Fwebsite-chris-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquiode%2Fwebsite-chris-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquiode%2Fwebsite-chris-backend/lists"}