{"id":26533621,"url":"https://github.com/dhar01/meditrust","last_synced_at":"2025-10-29T11:05:27.115Z","repository":{"id":263307238,"uuid":"889945258","full_name":"Dhar01/MediTrust","owner":"Dhar01","description":"A backend system for an online pharmacy, built with love, Go and PostgreSQL","archived":false,"fork":false,"pushed_at":"2025-03-20T19:22:49.000Z","size":339,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T20:49:43.851Z","etag":null,"topics":["backend-api","ecommerce","gin-gonic","go","postgresql","sqlc","swagger"],"latest_commit_sha":null,"homepage":"https://dhar01.github.io/MediTrust/","language":"Go","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/Dhar01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-17T16:31:46.000Z","updated_at":"2025-03-20T19:22:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"dae98fbd-e7e2-4235-a9b7-5a8d4768d2ea","html_url":"https://github.com/Dhar01/MediTrust","commit_stats":null,"previous_names":["dhar01/medicine-app","dhar01/meditrust"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dhar01%2FMediTrust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dhar01%2FMediTrust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dhar01%2FMediTrust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dhar01%2FMediTrust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dhar01","download_url":"https://codeload.github.com/Dhar01/MediTrust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244852683,"owners_count":20521160,"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-api","ecommerce","gin-gonic","go","postgresql","sqlc","swagger"],"created_at":"2025-03-21T19:18:44.871Z","updated_at":"2025-10-29T11:05:22.078Z","avatar_url":"https://github.com/Dhar01.png","language":"Go","readme":"# 🏥 MediTrust\n\nFast and reliable backend for an online pharmacy, powered by Go and PostgreSQL.\n\n## ⚙️ SetUp\n\nThis project uses Go and PostgresSQL. Please ensure to set them up before proceeding.\n\n1. Install Go\n   - Download and install Go from the [official Go website](https://go.dev/dl/).\n   - Verify installation:\n\n    ```bash\n    go version\n    ```\n\n2. Install PostgreSQL\n    - Install PostgreSQL from the [official PostgreSQL website](https://www.postgresql.org/download/).\n    - Verify Installation:\n\n    ```bash\n    psql --version\n    ````\n\n\n## 🔐 Environment Variables\n\nCreate a `.env` file in the root directory with the following variables:\n\n```env\nDB_URL=\"postgres://\u003cusername\u003e:\u003cpassword\u003e@\u003chost\u003e:\u003cport\u003e/\u003cdatabase_name\u003e\"\nSECRET_KEY=\"Your Secret Key here\"\nPLATFORM=\"\u003cenvironment\u003e\"\n\nSMTP_HOST=\"\u003cSMTP server host\u003e\"\nSMTP_PORT=\"\u003cSMTP server port\u003e\"\nSMTP_USER=\"\u003cSMTP username\u003e\"\nSMTP_PASS=\"\u003cSMTP password\u003e\"\n\nEMAIL_FROM=\"example.localhost.com\"\nDOMAIN=\"localhost\"\nPORT=\"\u003cpreferred-port\u003e\"\n```\n- Replace the `DB_URL` values with your database connection string.\n- Currently available platform is `\"deb\"`.\n\nFind `db_migration.sh` in the `scripts` to automate DB migration.\n\n# 📌 API-endpoints\n\n### 💊 Medicine\n\n| name                  | method | route                    | note         |\n| :-------------------- | :----: | :----------------------- | ------------ |\n| create medicine       |  POST  | /api/v1/medicines        | *admin only* |\n| get all medicine      |  GET   | /api/v1/medicines        |\n| get medicine by ID    |  GET   | /api/v1/medicines/:medID |\n| update medicine by ID |  PUT   | /api/v1/medicines/:medID | *admin only* |\n| delete medicine by ID | DELETE | /api/v1/medicines/:medID | *admin only* |\n\n### 👤 Users\n\n| name           | method | route                      | note             |\n| :------------- | :----: | -------------------------- | ---------------- |\n| get user by ID |  GET   | /api/v1/users/:userID      | *admin only*     |\n| signup user    |  POST  | /api/v1/signup             |\n| login user     |  POST  | /api/v1/login              |\n| verify user    |  GET   | /api/v1/verify?token=token | *auto-generated* |\n| update user    |  PUT   | /api/v1/users              |\n| logout user    |  POST  | /api/v1/logout             |\n| delete user    | DELETE | /api/v1/users              |\n| refresh token  |  POST  | /api/v1/refresh            |\n| revoke token   |  POST  | /api/v1/revoke             |\n\n### 🔄 General\n\n| name     | method | route         | note                   |\n| -------- | ------ | ------------- | ---------------------- |\n| reset DB | POST   | /api/v1/reset | *dev* environment only |\n\n\n\n# ✅ To-Do\n\n\u003e Goal is to achieve MVP\n\n### Authentication \u0026 Authorization\n\n- [x] User Signup\n- [x] User Login\n- [x] Email verification\n- [x] User Logout\n- [x] Token Refresh\n- [x] Token Revoke\n- [x] Password Reset (*via email*)\n- [ ] Role-based Access control (*User/Admin*)\n\n### Product Management (Medicines)\n\n- [x] Create medicine (*admin*)\n- [x] Get all medicine\n- [x] Get medicine by ID\n- [x] Update medicine by ID (*admin*)\n- [x] Delete medicine by ID (*admin*)\n- [ ] Medicine categories \u0026 Tags\n- [ ] Search \u0026 Filter medicines\n- [ ] Pagination for large medicine lists\n\n### User Profile \u0026 Management\n\n- [x] Get user by ID (*admin*)\n- [x] Update user profile\n- [x] Delete user\n- [ ] View order history\n\n### Cart \u0026 Wishlist\n\n- [x] Add medicine to cart\n- [x] Get/Fetch cart\n- [x] Remove medicine from cart\n- [x] Remove/Delete the Cart\n\n### Checkout \u0026 Payment\n\n- [ ] Order placement (*store order details*)\n- [ ] Integrate Payment Gateway\n- [ ] Discounts \u0026 Promo codes\n\n### Order Management\n\n- [ ] Order Tracking\n- [ ] Cancel Orders\n- [ ] Return \u0026 Refund System\n\n### Admin Panel\n\n- [x] Manage users (*Get, Delete*)\n- [x] Manage medicines (CRUD)\n- [ ] Manage orders (CRUD)\n- [ ] Generate Reports \u0026 Statistics\n\n### Security \u0026 Compliance\n\n- [ ] implement Rate Limiting \u0026 Throttling\n- [ ] implement Logging \u0026 Monitoring\n- [ ] Ensure GDPR \u0026 Data Protection Compliance\n\n### General\n\n- [x] Reset DB (*DEV environment only*)\n\n\n# 📖 Documentation\n\n\u003e Experimental\n\nRun the project and see the documentation at `http://localhost:8080/api/v1/swagger/index.html`.\u003cbr\u003e\nLive version of github pages hosted [here](https://dhar01.github.io/MediTrust/)\n\n# Entity-Relationship Diagram\n\n![ERD](diagrams/MediTrust.png)\n\n# 🚀 Status\n\n![code coverage badge](https://github.com/Dhar01/medicine-app/actions/workflows/ci.yml/badge.svg)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhar01%2Fmeditrust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhar01%2Fmeditrust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhar01%2Fmeditrust/lists"}