{"id":25171350,"url":"https://github.com/basemax/softwaremarketgoapi","last_synced_at":"2025-10-04T07:00:25.811Z","repository":{"id":188142446,"uuid":"660375231","full_name":"BaseMax/SoftwareMarketGoAPI","owner":"BaseMax","description":"SoftwareMarketGoAPI is a RESTful API built with Golang that provides endpoints to manage software products in a marketplace. It allows users to perform operations such as creating, retrieving, updating, and deleting software products.","archived":false,"fork":false,"pushed_at":"2025-03-21T23:08:23.000Z","size":87,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T17:08:09.421Z","etag":null,"topics":["api","go","go-api","go-restful","restful","software-market","softwaremarket"],"latest_commit_sha":null,"homepage":"","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/BaseMax.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}},"created_at":"2023-06-29T21:44:11.000Z","updated_at":"2025-03-21T23:08:19.000Z","dependencies_parsed_at":"2023-12-19T09:53:47.287Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/SoftwareMarketGoAPI","commit_stats":null,"previous_names":["basemax/softwaremarketgoapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FSoftwareMarketGoAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FSoftwareMarketGoAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FSoftwareMarketGoAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FSoftwareMarketGoAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/SoftwareMarketGoAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247079289,"owners_count":20880027,"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":["api","go","go-api","go-restful","restful","software-market","softwaremarket"],"created_at":"2025-02-09T09:19:55.205Z","updated_at":"2025-10-04T07:00:20.754Z","avatar_url":"https://github.com/BaseMax.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Software-Market Go API\n\nSoftwareMarketGoAPI is a RESTful API built with Golang that provides endpoints to manage software products in a marketplace. It allows users to perform operations such as creating, retrieving, updating, and deleting software products.\n\n## Features\n\n- User authentication and authorization using JSON Web Tokens (JWT)\n- CRUD operations for blog posts\n- Error handling and response formatting\n- Input validation and data sanitization\n- Logging and request/response middleware\n- Database integration using MYSQL gorm orm\n\n## Installation\n\nMake sure you have Go installed on your system. You can download and install it from the official Go website: https://golang.org\n\nClone the repository:\n\n```shell\ngit clone https://github.com/BaseMax/SoftwareMarketGoAPI.git\n```\n\n\nNavigate to the project directory:\n\n```shell\ncd SoftwareMarketGoAPI\n```\n\nInstall the project dependencies:\n\n```bash\ngo mod download\n```\n\nSet up the environment variables:\n\n- Create a `.env` file in the root directory of the project.\n\n- Define the following environment variables in the `.env` file:\n\n```plaintext\nPORT=8080\nDB_HOST=your_database_host\nDB_PORT=your_database_port\nDB_USER=your_database_user\nDB_PASSWORD=your_database_password\nDB_NAME=your_database_name\nJWT_SECRET=your_jwt_secret\n```\n\nRun the application:\n\n```bash\ngo run main.og\n```\n\nThe API will be accessible at `http://localhost:8080` by default. You can change the port in the .env file if necessary.\n\n## API Endpoints\n\nThe following endpoints are available in the panel:\n\n| Method | \tEndpoint | \tDescription |\n| ---- | -------- | -------- |\n| POST |\t/panel/software/\t| Add new software |\n| PUT |\t/panel/software/:id\t| Update software |\n| DELETE |\t/panel/software/:id\t| Delete software |\n| POST |\t/panel/users/admin\t| Add new admin |\n| POST |\t/panel/users/login\t| Login admin |\n| PUT |\t/panel/users/admin/:id\t| Update admin |\n\nThe following endpoints are available in the api:\n\n| Method | \tEndpoint | \tDescription |\n| ---- | -------- | -------- |\n| GET |\t/api/software/\t| Get all softwares |\n| GET |\t/api/software/:id\t| Get a software by id |\n| GET |\t/api/software/category/:category\t| Get software by category |\n| GET |\t/api/software/search/:query\t| Search softwares |\n| GET |\t/api/software/top-rated\t| Get top rated softwares |\n| GET |\t/api/software/recommended\t| Get recommended softwares |\n| GET |\t/api/software/:id/reviews\t| Get software's reviews |\n| POST |\t/api/software/:id/ratings\t| Add rate to software |\n| POST |\t/api/software/:id/reviews\t| Add reviews to software |\n| GET |\t/api/users/reviews\t| Get user's reviews |\n| GET |\t/api/users/:id/software\t| Get associated software |\n| POST |\t/api/users/login\t| Login user |\n| POST |\t/api/users/register\t| Register uesr |\n\n\n\n## Database Schema\n\nThe application uses a GORM orm MYSQL and have these data modles and use auto migrate:\n\n```go\n\ntype Software struct {\n\tID          uuid.UUID `json:\"id\" gorm:\"primaryKey\"`\n\tName        string    `json:\"name\"`\n\tDescription string    `json:\"description\"`\n\tPrice       float64   `json:\"price\"`\n\tCreator     string    `json:\"creator\"`\n\tVersion     string    `json:\"version\"`\n\tCategory    string    `json:\"category_list\" `\n\tCreatedAt   time.Time `json:\"created_at\"`\n\tUpdatedAt   time.Time `json:\"updated_at\"`\n}\n\ntype Rate struct {\n\tID         uuid.UUID `json:\"id\" gorm:\"primaryKey\"`\n\tValue      uint8     `json:\"value\"` // value can be between 1 and 5\n\tSoftwareId uuid.UUID `json:\"software_id\"`\n\tUserId     uuid.UUID `json:\"user_id\" `\n\tRatedAt    time.Time `json:\"Rated_at\"`\n}\n\ntype Review struct {\n\tID         uuid.UUID `json:\"id\" gorm:\"primaryKey\"`\n\tTitle      string    `json:\"title\"`\n\tContent    string    `json:\"content\"`\n\tSoftwareId uuid.UUID `json:\"software_id\" `\n\tUserId     uuid.UUID `json:\"user_id\" `\n\tCreatedAt  time.Time `json:\"created_at\"`\n\tUpdatedAt  time.Time `json:\"updated_at\"`\n}\n\ntype User struct {\n\tID                 uuid.UUID `json:\"id\" gorm:\"primaryKey\"`\n\tName               string    `json:\"name\"`\n\tEmail              string    `json:\"email\"`\n\tPassword           string    `json:\"password\"`\n\tIsAdmin            bool      `json:\"is_admin\"`\n\tFavoriteCategories string    `json:\"favorite_categories\"`\n\tCreatedAt          time.Time `json:\"created_at\"`\n\tUpdatedAt          time.Time `json:\"updated_at\"`\n}\n\n```\n\n## Dependencies\n\nThe project utilizes the following third-party libraries:\n\n- `go-playground/validator/v10`: Struct field validation\n- `golang-jwt/jwt/v4`: JWT implementation \n- `google/uuid`: UUID generation\n- `joho/godotenv`: Environment variable loading\n- `labstack/echo/v4`: HTTP web framework\n- `x/crypto`: Hashing password library\n- `driver/mysql`: Struct field validation\n- `gorm`: Database orm\n\n\nMake sure to run go mod download as mentioned in the installation steps to fetch these dependencies.\n\n## Contributing\n\nContributions to this project are welcome. Feel free to open issues and submit pull requests.\n\n## License\n\nThis project is licensed under the GPL-3.0 License.\n\n## Postman collection\n\nSoftware-Market-Go-API/software-market.postman_collection.json\n\n## Authors\n\n- AmirAtashghah\n- Max Base\n\nCopyright 2023, Max Base\n\nCopyright 2023, Asrez group\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fsoftwaremarketgoapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fsoftwaremarketgoapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fsoftwaremarketgoapi/lists"}