{"id":19661130,"url":"https://github.com/sundeepk/anon-message-board","last_synced_at":"2026-05-13T18:17:02.039Z","repository":{"id":233482763,"uuid":"636342104","full_name":"SundeepK/anon-message-board","owner":"SundeepK","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-05T17:54:01.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T01:44:44.114Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/SundeepK.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}},"created_at":"2023-05-04T16:29:23.000Z","updated_at":"2023-05-05T17:58:37.000Z","dependencies_parsed_at":"2024-04-16T11:24:53.809Z","dependency_job_id":"21d673ab-28e3-492f-8c18-bc846cb79e73","html_url":"https://github.com/SundeepK/anon-message-board","commit_stats":null,"previous_names":["sundeepk/anon-message-board"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SundeepK%2Fanon-message-board","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SundeepK%2Fanon-message-board/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SundeepK%2Fanon-message-board/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SundeepK%2Fanon-message-board/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SundeepK","download_url":"https://codeload.github.com/SundeepK/anon-message-board/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240970214,"owners_count":19886526,"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-11T16:06:26.035Z","updated_at":"2026-05-13T18:16:56.995Z","avatar_url":"https://github.com/SundeepK.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Anon board\n\nThere exists some simple paths to GET,POST messages for the messages api and also replys to messages:\n\n```\nGET http://localhost:3000/api/messages\n[\n    {\n        \"title\": \"test message reply\",\n        \"name\": \"bob\",\n        \"body\": \"my first reply 2\",\n        \"parentId\": \"0c214e3b-4456-4547-875f-9f1f609e3175\",\n        \"rootId\": \"49be26c6-08c4-497b-887f-05bbd6d67297\",\n        \"dateTime\": \"2023-05-05T17:18:41.138Z\",\n        \"id\": \"23361a57-a45f-480a-857d-265e9aa16f47\"\n    }\n]\n\nPOST http://localhost:3000/api/messages\n{\n    \"title\": \"test message reply\",\n    \"name\": \"bob\",\n    \"body\": \"My message\"\n}\n\nResponse\n{\n    \"title\": \"test message reply\",\n    \"name\": \"bob\",\n    \"body\": \"My message\",\n    \"parentId\": \"0c214e3b-4456-4547-875f-9f1f609e3175\",\n    \"rootId\": \"49be26c6-08c4-497b-887f-05bbd6d67297\",\n    \"dateTime\": \"2023-05-05T17:18:41.138Z\",\n    \"id\": \"23361a57-a45f-480a-857d-265e9aa16f47\"\n}\n\nPOST http://localhost:3000/api/messages/23361a57-a45f-480a-857d-265e9aa16f47/reply\n{\n    \"title\": \"test message reply\",\n    \"name\": \"bob\",\n    \"body\": \"My first reply 2\",\n}\n\nResponse\n{\n    \"title\": \"test message reply\",\n    \"name\": \"bob\",\n    \"body\": \"My first reply 2\",\n    \"id\": \"49be26c6-08c4-497b-887f-05bbd6d67297\",\n    \"parentId\": \"23361a57-a45f-480a-857d-265e9aa16f47\",\n    \"rootId\": \"23361a57-a45f-480a-857d-265e9aa16f47\",\n}\n```\n\n\n## Building and running Docker container\n\n## Building DockerFile\n```bash\ndocker build -t anon-board .\n```\n\n### Running container\n```bash\ndocker run -it --expose 3000 -p 3000:3000 anon-board\n```\n\n### \nStarting the api without using docker\n```\nnpm run start\n```\n\n### Running cucumber tests using docker compose\nYou can run the cucumber tests shipped in the project by running the below command:\n```bash\ndocker-compose up --build  --abort-on-container-exit --exit-code-from cucumber\n```\nIt will attempt to build the api server and cucumber tests container, then it will run the cucumber tests that interact with the api server.\nThen it will exit the tests and return the last status code of the cucumber container.\n\n## Trade-offs\n1. In order to complete the project in a timely manner, I opted to simply store messages in memory using a list rather than a DB.\nThis isn't ideal as the messages disappear once the server is shutdown.\n2. No API docs for the project such as swagger.\n3. More robust Cucumber tests.\n4. DockerFiles are not optimised as they simply copy all files during building.\n5. No pagination when requesting messages, this would be troublesome in a prod env.\n6. No endpoint to fetch a single message/reply.\n7. Better validation for types and length of fields.\n8. No user system.\n9. Api versioning.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsundeepk%2Fanon-message-board","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsundeepk%2Fanon-message-board","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsundeepk%2Fanon-message-board/lists"}