{"id":17241848,"url":"https://github.com/maciekmm/hackathon-uek-platforma-backend","last_synced_at":"2025-03-26T03:21:02.647Z","repository":{"id":79398632,"uuid":"92631447","full_name":"maciekmm/hackathon-uek-platforma-backend","owner":"maciekmm","description":":speech_balloon: UEK Hackathon Entry Backend","archived":false,"fork":false,"pushed_at":"2017-06-18T16:16:28.000Z","size":342,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T05:16:57.651Z","etag":null,"topics":["hackathon"],"latest_commit_sha":null,"homepage":"","language":"Go","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/maciekmm.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}},"created_at":"2017-05-28T00:28:56.000Z","updated_at":"2017-11-20T10:31:19.000Z","dependencies_parsed_at":"2023-03-09T07:46:14.326Z","dependency_job_id":null,"html_url":"https://github.com/maciekmm/hackathon-uek-platforma-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/maciekmm%2Fhackathon-uek-platforma-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciekmm%2Fhackathon-uek-platforma-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciekmm%2Fhackathon-uek-platforma-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciekmm%2Fhackathon-uek-platforma-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maciekmm","download_url":"https://codeload.github.com/maciekmm/hackathon-uek-platforma-backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245580361,"owners_count":20638783,"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":["hackathon"],"created_at":"2024-10-15T06:11:34.860Z","updated_at":"2025-03-26T03:21:02.624Z","avatar_url":"https://github.com/maciekmm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Bruschetta\n---\n\nUEK Hackathon entry backend codenamed **Bruschetta**. The project is named \"Platforma UEK\"\n\n## Running\n\nIn order to start the **bruschetta** backend you need to have a `docker-compose` and run the following command:\n\n```\ncp ./credentials.env.sample ./credentials.env\nvim ./credentials.env #change values in credentials.env to yours\ndocker-compose up --build\n```\n\n## Endpoints\n\n### POST /accounts/register/\n\nSample request:\n\n```json\n{\n    \"name\": \"Your Name\",\n    \"email\": \"email@example.com\",\n    \"group\": 8801,\n    \"password\": \"your-password\"\n}\n```\n\nSample response:\n\n```json\n{\n    \"token\": \"JWT-token\"\n}\n```\n\nAll future requests have to contain `Authorization: Bearer YOUR-JWT-TOKEN` header. Token is valid for 24h\n\n### POST /accounts/login/\n\n```json\n{\n    \"email\": \"email@example.com\",\n    \"password\": \"your-password\"\n}\n```\n\nSample response:\n\n```json\n{\n    \"token\": \"JWT-token\"\n}\n```\n\n### GET /accounts/token/\n\nUsed to refresh expired token. Pass old token in `Authorization` header and a new one will be returned.\n\nSample response:\n\n```json\n{\n    \"token\": \"new-jwt-token\"\n}\n```\n\n### GET /events/\n\n**Role:** User\n\nLists all events appropriate to a supplied token.\n\nSample response:\n\n```json\n[{\n    \"ID\": 1,\n    \"CreatedAt\": \"2017-06-13T10:02:23.009069Z\",\n    \"UpdatedAt\": \"2017-06-13T10:02:23.012834Z\",\n    \"DeletedAt\": null,\n    \"user_id\": 5,\n    \"name\": \"Test!\",\n    \"description\": \"Another test\",\n    \"message\": \"subtitle test\",\n    \"priority\": 2\n}]\n```\n\n### GET /events/:id/?channel=:campaign\n\n**Role:** User with a specific group or admin\n\nGet specific event.\n\nCampaign parameter is not required and is only used for interactions.\n\nSample response:\n\n```json\n{\n    \"ID\": 1,\n    \"CreatedAt\": \"2017-06-13T10:02:23.009069Z\",\n    \"UpdatedAt\": \"2017-06-13T10:02:23.012834Z\",\n    \"DeletedAt\": null,\n    \"user_id\": 5,\n    \"name\": \"Test!\",\n    \"description\": \"Another test\",\n    \"message\": \"subtitle test\",\n    \"priority\": 2,\n    \"group\": 8801\n}\n```\n\n### GET /events/:id/interactions/\n\nLists all interactions with channel from where the traffic originates.\n\n**Role:** Admin\n\nSample response:\n\n```json\n[\n    {\n        \"id\": 1,\n        \"event_id\": 1,\n        \"timestamp\": \"2017-06-13T19:29:12.106076Z\",\n        \"user_id\": 2,\n        \"channel\": \"messenger\"\n    },\n    {\n        \"id\": 2,\n        \"event_id\": 1,\n        \"timestamp\": \"2017-06-13T19:29:33.841749Z\",\n        \"user_id\": 2\n    }\n]\n```\n\n### POST /events/\n\nPosts an event and sends notifications to all matching students. Specifying `group` parameter limits the message to a specific group only.\n\n**Role:** Admin\n\nSample request:\n\n```json\n{\n  \"name\": \"Test!\",\n  \"description\": \"Another test\",\n  \"image\": \"https://example.com/example.jpg\",\n  \"message\": \"Group Target priority test - 1\",\n  \"priority\": 1,\n  \"group\": 8801\n}\n```\n\n### DELETE /events/:id/\n\nDeletes the event speified by `:id`\n\n**Role:** Admin\n\n### PUT/PATCH /events/:id/\n\nUpdates the event by replacing (PUT) or changing parameters (PATCH)\n\n**Role:** Admin\n\n### GET /subscriptions/\n\nLists all user subscriptions.\n\n**Role:** User\n\n### POST /subscriptions/\n\nAdds user's subscription.\n\n**Role:** User\n\nSample request:\n\n```json\n{\n    \"channel\": \"messenger\",\n    \"channel_id\": \"messenger-page-id\",\n    \"priority\": 2\n}\n```\n### PATCH /subscriptions/:id/\n\nPatches user's subscription\n\n**Role:** User\n\n### DELETE /subscriptions/:id/\n\nDeletes user's subscription\n\n**Role:** User\n\n### GET /timetable/\n\nGets user's timetable.\n\n**Role:** User\n\n### GET /timetable/groups/\n\nGets all category-\u003egroup-\u003eid associations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaciekmm%2Fhackathon-uek-platforma-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaciekmm%2Fhackathon-uek-platforma-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaciekmm%2Fhackathon-uek-platforma-backend/lists"}