{"id":26093878,"url":"https://github.com/kshitiz-mhto/thaym-api","last_synced_at":"2026-02-21T09:01:22.182Z","repository":{"id":280069149,"uuid":"906784218","full_name":"Kshitiz-Mhto/thaym-api","owner":"Kshitiz-Mhto","description":"Thāyṃ is a robust and scalable e-commerce API built with GoLang, leveraging Hexagonal Architecture. This design pattern ensures that the application is maintainable and adaptable over time, with clear separation of concerns.","archived":false,"fork":false,"pushed_at":"2025-03-01T02:30:09.000Z","size":37486,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-04T02:36:58.226Z","etag":null,"topics":["docker","docker-compose","golang","hexagonal-architecture","jwt-auth","makefile","mysql","restful-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kshitiz-Mhto.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-12-21T22:25:56.000Z","updated_at":"2025-03-01T02:30:13.000Z","dependencies_parsed_at":"2025-03-01T03:34:01.129Z","dependency_job_id":null,"html_url":"https://github.com/Kshitiz-Mhto/thaym-api","commit_stats":null,"previous_names":["kshitiz-mhto/thaym-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kshitiz-Mhto/thaym-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kshitiz-Mhto%2Fthaym-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kshitiz-Mhto%2Fthaym-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kshitiz-Mhto%2Fthaym-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kshitiz-Mhto%2Fthaym-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kshitiz-Mhto","download_url":"https://codeload.github.com/Kshitiz-Mhto/thaym-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kshitiz-Mhto%2Fthaym-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29677881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["docker","docker-compose","golang","hexagonal-architecture","jwt-auth","makefile","mysql","restful-api"],"created_at":"2025-03-09T12:06:00.410Z","updated_at":"2026-02-21T09:01:22.125Z","avatar_url":"https://github.com/Kshitiz-Mhto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./static/logo.png\" alt=\"thaym api Logo\" width=\"280\" \u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eThāyṃ\u003c/strong\u003e is a robust and scalable e-commerce API built with GoLang, leveraging Hexagonal Architecture. This design pattern ensures that the application is maintainable and adaptable over time, with clear separation of concerns. The API provides essential features for managing e-commerce operations, including secure JWT authentication, email confirmation, advanced filtering capabilities, inventory management, role-based access control and sure payment gateway integration. Thāyṃ is designed to support multiple user roles such as Admin, User, and Store Owner, and allows for seamless product management, order tracking, and payment integrations. With its flexible and modular structure, Thāyṃ is ready to power a wide range of e-commerce applications while maintaining high performance and security.\n\u003c/p\u003e\n\n---\n\n## Setup Guide\n\n\n### Environment Setup\n1. Configure Your .env File\n\nCreate and configure a .env file in your project directory with the following variables:\n\n```bash\n# Server\nPUBLIC_HOST=\nPORT=8085\n\n# Database\nDB_USER=root\nDB_PASSWORD=root\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_NAME=ecom\n\n# JWT\nJWT_SECRET=\n\n# SMTP for Gmail\nFROM_EMAIL=\nFROM_EMAIL_PASSWORD= # using passkey\nFROM_EMAIL_SMTP=\"smtp.gmail.com\"\nSMTP_ADDR=\"smtp.gmail.com:587\"\n\n# Stripe\nSECRET_KEY_STRIPE=\nWEBHOOK_SECRET_STRIPE=\n\n#Payment Variable\nORDER_STATUS_PENDING=\"pending\"  \nORDER_STATUS_PROCESSING=\"processing\"  \nORDER_STATUS_SHIPPED=\"shipped\"  \nORDER_STATUS_COMPLETED=\"completed\"  \nORDER_STATUS_CANCELLED=\"cancelled\"  \nORDER_STATUS_REFUNDED=\"refunded\"  \nPAYMENT_STATUS_PENDING=\"pending\"  \nPAYMENT_STATUS_PAID=\"paid\"  \nPAYMENT_STATUS_REFUNDED=\"refunded\" \n```\n\n\n### Using Containerized Environment\n\n1. Build and Run the Project Using Docker Compose\n\n```bash\ndocker-compose up --build\n```\n\nOnce the project is built and the containers are running, you can access the API at:\n\n\u003e API URL: http://localhost:8085\n\n2. Stop Containers\n\n```bash\ndocker-compose down\n```\n\n### Running Locally Using `Make`\n\n\n**Build**\n\nCompile the application and output the binary in the `bin` directory:\n\n```bash\nmake build\n```\n\n**Run**\n\nBuild and run the application:\n\n```bash\nmake run\n```\n\nOnce the project is built and the containers are running, you can access the API at:\n\n\u003e API URL: http://localhost:8085\n\n### Database Migrations\n\n**Generate a new migration file in the `cmd/migrate/migrations` directory:**\n\n```bash\nmake migration \u003cyour_migration_name\u003e\n```\n\n**Apply Migrations**\n\n```bash\nmake migrate-up\n```\n\n**Rollback Migrations**\n\n```bash\nmake migrate-down\n```\n\n--- \n\n## Features\n\n### Authentication and Authorization\n- **JWT Authentication:** Secure authentication using JSON Web Tokens.\n- **Role-based Access Control:** Supports roles such as Admin, User, and Store Owner.\n\n### User Management\n- Email confirmation using custom HTML templates.\n- Complete CRUD (Create, Read, Update, Delete) operations for user accounts.\n\n### E-commerce Functionalities\n- Advanced filtering by tags and categories.\n- Search functionality for products and orders.\n- Inventory management:\n  - Control product quantity\n  - Product stocking\n  - Activation and deactivation of products.\n- Order management:\n  - Seamless integration with payment gateways.\n  - Tracking and updating order statuses.\n\n### Payment Gateway Integration\n- Supports mutliple payment providers (e.g., Stripe, Banks[can be configure])  \n- Secure transaction handling with encryption.\n- Payment successfull Alerting mechanism\n\n---\n\n## Technologies Used\n\n### Core Language and Architecture\n- **Go 1.23.4:** The core programming language.\n- **Hexagonal Architecture:** Ensures separation of concerns and maintainability.\n\n### Dependencies\n- **[go-playground/validator](https://github.com/go-playground/validator):** Input validation.\n- **[go-sql-driver/mysql](https://github.com/go-sql-driver/mysql):** MySQL database driver.\n- **[golang-jwt/jwt](https://github.com/golang-jwt/jwt):** JWT authentication.\n- **[golang-migrate/migrate](https://github.com/golang-migrate/migrate):** Database migrations.\n- **[gorilla/mux](https://github.com/gorilla/mux):** HTTP request router.\n- **[joho/godotenv](https://github.com/joho/godotenv):** Environment variable management.\n- **[stretchr/testify](https://github.com/stretchr/testify):** Testing utilities.\n- **[golang.org/x/crypto](https://pkg.go.dev/golang.org/x/crypto):** Cryptographic functions.\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkshitiz-mhto%2Fthaym-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkshitiz-mhto%2Fthaym-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkshitiz-mhto%2Fthaym-api/lists"}