{"id":22561811,"url":"https://github.com/mcsamuelshoko/telko-moment-server","last_synced_at":"2026-03-02T11:01:38.014Z","repository":{"id":117684039,"uuid":"487904465","full_name":"mcsamuelshoko/telko-moment-server","owner":"mcsamuelshoko","description":"Messenger API backend e.g telegram-like -\u003e started as \"college students venturing into the world of web sockets on a nodejs server as they(we) create a server for our chat-app that will be made using dart's flutter framework.\"","archived":false,"fork":false,"pushed_at":"2025-05-16T20:38:23.000Z","size":557,"stargazers_count":2,"open_issues_count":25,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-25T08:05:29.147Z","etag":null,"topics":["fiber-framework","go","golang","layered-architecture","mongodb"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcsamuelshoko.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,"zenodo":null}},"created_at":"2022-05-02T15:56:27.000Z","updated_at":"2025-05-16T20:38:26.000Z","dependencies_parsed_at":"2025-03-16T22:26:01.483Z","dependency_job_id":"e5c636ff-f07e-4265-85b5-89d9582f3b0d","html_url":"https://github.com/mcsamuelshoko/telko-moment-server","commit_stats":null,"previous_names":["mcsamuelshoko/telko-moment-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mcsamuelshoko/telko-moment-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcsamuelshoko%2Ftelko-moment-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcsamuelshoko%2Ftelko-moment-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcsamuelshoko%2Ftelko-moment-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcsamuelshoko%2Ftelko-moment-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcsamuelshoko","download_url":"https://codeload.github.com/mcsamuelshoko/telko-moment-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcsamuelshoko%2Ftelko-moment-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29999217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fiber-framework","go","golang","layered-architecture","mongodb"],"created_at":"2024-12-07T22:10:09.435Z","updated_at":"2026-03-02T11:01:37.414Z","avatar_url":"https://github.com/mcsamuelshoko.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telko-moment-server 🖥\n\n\u003e - Server to a maui mobile app for android chat-app.\n\u003e - The server uses fiber for golang\n\n\n|   | List of topics                      |\n|---|:------------------------------------|\n|  | [System Diagrams](#system-diagrams) |\n|  | [Miscellaneous](#miscellaneous)     |\n| | [Requirements](#requirements) |\n| | [Folder Structure](#folder-structure) |\n\n\n\n## System Diagrams (C4)\n\n\n### System Context\n\n```mermaid\n---\ntitle:\"Main System Overview\"\n---\nflowchart TD\n    User[\"Premium User\n    [Person]\n    \n    A user of the platform that purchased a subscription\"]\n    \n    TS[\"Telko-Momment Service\n    [Software System]\n    \n    Provides an API to use telko-messenger apps\n    \"]\n    \n    User --\" Sends messages, receives messages,\\nand views higlights using\"--\u003e TS\n    \n    classDef person fill:#08427b,stroke:#052e56,color:#ffffff\n    classDef focusSystem fill:#1168bd,stroke:#0b4884,color:#ffffff\n    \n    class User person\n    class TS focusSystem\n```\n\n\n## Miscellaneous \n\n- [\u003chttps://gofiber.io/\u003e]\n  - [\u003chttps://github.com/oapi-codegen/oapi-codegen#impl-fiber\u003e]\n  - Open-API-Extensions [\u003chttps://github.com/oapi-codegen/oapi-codegen?tab=readme-ov-file#openapi-extensions\u003e]\n\n- [\u003chttps://github.com/gofiber/awesome-fiber\u003e]\n- [\u003chttps://docs.gofiber.io/recipes/\u003e]\n- [\u003chttps://swagger.io/docs/specification/v3_0/about/\u003e]\n  - [\u003chttps://medium.com/@fikihalan/a-practical-guide-to-using-oapi-codegen-in-golang-api-development-with-the-fiber-framework-bce2a59380ae\u003e]\n\n---                     \n Tools - [\u003chttps://42crunch.com/\u003e]\n OpenAPI Spec - [\u003chttps://swagger.io/docs/specification/v3_0/basic-structure/\u003e]\n---\n\n- REST APIs [\u003chttps://www.ibm.com/think/topics/rest-apis\u003e]\n- Api Management [\u003chttps://www.ibm.com/think/topics/api-management\u003e]\n\n- JWT\n  - Token Claims [\u003chttps://datatracker.ietf.org/doc/html/rfc7519#section-4.2\u003e]\n\n- Casbin for ABAC : [\u003chttps://casbin.org/\u003e]\n  - Golang Repo: [\u003chttps://github.com/casbin/casbin\u003e]\n  - White paper: [\u003chttps://arxiv.org/abs/1903.09756\u003e]\n  - ABAC : [\u003chttps://casbin.org/docs/abac\u003e]\n    - Mongodb Adapter: [\u003chttps://github.com/casbin/mongodb-adapter/\u003e]\n- ABAC:\n  - [\u003chttps://frontegg.com/guides/abac\u003e]\n  - [\u003chttps://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-overview\u003e]\n  - \n\n- Govaluate \n  - Repo : [\u003chttps://github.com/Knetic/govaluate\u003e]\n---\n\n\n### Running the App\n\n```shell\noapi-codegen -package=api -generate \"types,spec,fiber\" oapi_codegen.yml \u003e api/api.gen.go\n```\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\n\n\u003e **[ ORIGINAL/OLD PLAN ]**\n\n\u003c/summary\u003e\n\n\u003ch2\u003eAbout\u003c/h2\u003e\n\n\u003e - Server to a flutter android chat-app.\n\u003e - The server uses nodejs and frameworks such as ExpressJs, featherJs, stompjs \u0026 Prisma ORM.\n\u003e - it is split into 2 different servers\n\u003e   1. **chat-server** :   for handling chats\n\u003e   2. **media-server** :  for handling media files or basically files\n\u003e - _*more information on this will be found in the documentation folder_\n\u003e - figma links for the designs:\n\u003e   1. **auth maps \u0026 personas:**   \u0026nbsp;\u0026nbsp; [visit 🔗](https://www.figma.com/file/SBMlL6FtJD69ajJFPGJToU/Telko-moment-%7C-auth-map-%26-User-personas?t=eWpYCmGxitRb2tc7-1)\n\u003e   2. **wire frame \u0026 prototype**  \u0026nbsp;\u0026nbsp; [visit 🔗](https://www.figma.com/file/ZuSQwcxKaC3hUuFuSnsCqK/Telko-moment-%7C-wireframe-%26-Prototype?t=eWpYCmGxitRb2tc7-1)\n\n## Requirements\n\n\u003e Most of the server requirements are mostly javascript based and a few are other languages but mostly for supporting architecture.\n\u003e The requirements are as follows:\n\n1. Nodejs \u0026 NPM(Node Package Manager)\n2. ExpressJs\n3. FeathersJs\n4. Stompjs\n5. Prisma\n6. Databases\n    1. Mongodb (server)\n    2. SQLite (mobile)\n7. RabbitMQ\n    - stomp plugin\n\n\u003c/details\u003e\n\n## Folder Structure\n\n    /\n    ├───design/\n    ├───documentation/\n    │   ├───mobile/\n    │   └───server/\n    └───server/\n        ├───bin/\n        ├───cmd/\n        ├───configs/\n        ├───internal/\n        │   ├───audios/\n        │   ├───auth/\n        │   ├───messages/\n        │   ├───pictures/\n        │   ├───users/\n        │   └───videos/\n        ├───pkg/\n        └───test/\n\n---\n\n\u003cbr/\u003e\n\n\u003e## `The conventional Go project structure.`\n\n```plaintext\nchat-app/\n├── cmd/\n│   └── server/\n│       └── main.go           # Application entry point\n├── internal/\n│   ├── models/\n│   │   ├── message.go        # Message data structures\n│   │   └── auth.go          # User data structures\n│   ├── controllers/\n│   │   ├── auth_controller.go          # Authentication controllers\n│   │   ├── message_controller.go       # Message controllers\n│   │   └── websocket_controller.go     # WebSocket connection controller\n│   ├── handlers/\n│   │   ├── auth.go          # Authentication handlers\n│   │   ├── message.go       # Message handling\n│   │   └── websocket.go     # WebSocket connection handling\n│   ├── repository/\n│   │   ├── message_repo.go  # Message database operations\n│   │   └── user_repo.go     # User database operations\n│   └── service/\n│       ├── auth_service.go  # Authentication business logic\n│       └── chat_service.go  # Chat business logic\n├── pkg/\n│   ├── websocket/\n│   │   └── client.go        # WebSocket client implementation\n│   └── utils/\n│       └── validator.go     # Common validation utilities\n├── configs/\n│   └── config.yaml          # Application configuration\n├── api/\n│   └── routes.go           # API route definitions\n├── migrations/\n│   └── schema.sql          # Database migrations\n├── go.mod                  # Go module file\n└── go.sum                  # Go module checksum file\n\n```\n\nEach directory and its purpose:\n\n1. `cmd/`: Contains the main applications of your project\n   - This is where your main.go lives\n   - Each subdirectory should match the name of the executable you want to build\n\n2. `internal/`: Contains private application code\n   - `models/`: Data structures that represent your domain\n   - `controllers/`: route controllers\n   - `handlers/`: HTTP/WebSocket request handlers\n   - `repository/`: Database interaction layer\n   - `service/`: Business logic layer\n\n3. `pkg/`: Contains code that's ok to be used by external applications\n   - Put reusable components here\n   - In your case, websocket handling utilities could go here\n\n4. `configs/`: Configuration files\n   - YAML, JSON, or other config files\n   - Environment variables templates\n\n5. `api/`: API-related definitions\n   - Route setup\n   - API documentation\n   - OpenAPI/Swagger specs if you use them\n\n6. `migrations/`: Database migration files\n\nThis structure follows these key Go principles:\n\n- Separation of concerns\n- Clear dependency direction (dependencies flow inward)\n- Package-by-feature rather than package-by-layer\n- Private application code in `internal/`\n- Shared code in `pkg/`\n\n---\n\n### Packages\n\n- fiberi18n: [\u003chttps://github.com/gofiber/contrib/tree/main/fiberi18n\u003e]\n\n---\n\n### Use of AI\n- AIs have been used in making this app (well; it is 2025 and an extra hand/boost won't hurt) .... although it doesn't control anything or take lead, only for quick questions and some boring but necessary stuff\n    - Claude 3.5 \u0026 3.6 (anthropic) \n    - Grok 3 Beta    \n    - Gemini (google)\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcsamuelshoko%2Ftelko-moment-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcsamuelshoko%2Ftelko-moment-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcsamuelshoko%2Ftelko-moment-server/lists"}