{"id":34182211,"url":"https://github.com/rrraf1/soundshare","last_synced_at":"2026-01-13T20:54:17.405Z","repository":{"id":328799332,"uuid":"846919853","full_name":"rrraf1/soundShare","owner":"rrraf1","description":"This Go API, built with Fiber, provides user registration, login, and music management functionalities, including JWT-based authentication, for practicing API skills.","archived":false,"fork":false,"pushed_at":"2024-09-04T09:04:26.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-18T12:52:48.313Z","etag":null,"topics":["api","backend","backend-api","database","frontend","go","golang","learning-by-doing","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rrraf1.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-24T10:25:25.000Z","updated_at":"2024-10-02T03:39:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rrraf1/soundShare","commit_stats":null,"previous_names":["rrraf1/soundshare"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rrraf1/soundShare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrraf1%2FsoundShare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrraf1%2FsoundShare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrraf1%2FsoundShare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrraf1%2FsoundShare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrraf1","download_url":"https://codeload.github.com/rrraf1/soundShare/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrraf1%2FsoundShare/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"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":["api","backend","backend-api","database","frontend","go","golang","learning-by-doing","rest-api"],"created_at":"2025-12-15T14:02:49.827Z","updated_at":"2026-01-13T20:54:17.400Z","avatar_url":"https://github.com/rrraf1.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\n\n# Music API - A Learning Tool for Frontend Developers\n\nWelcome to the **Music API**! This project is designed to help frontend developers, especially beginners, to practice and enhance their skills in working with REST APIs. The API provides essential features such as user authentication, musics management, and search functionality.\n\n## Features\n\n- **User Authentication**: \n  - Register a new account.\n  - Login to an existing account.\n\n- **Music Management**:\n  - Upload your musics.\n  - Get your uploaded musics.\n  - Edit your uploaded musics.\n  - Delete your musics.\n\n- **Search and Discovery**:\n  - Search for other users by username.\n  - View other users' musics.\n\n## Getting Started\n\n### Prerequisites\n\nMake sure you have the following installed on your system:\n\n- **Go** (latest version recommended)\n- **Git**\n- **PostgreSQL** (or any other database you prefer)\n- **GORM** for database management\n- **JWT** for token-based authentication\n\n### Installation\n\n1. **Clone the repository**:\n\n   ```bash\n   git clone https://github.com/rrraf1/soundshare\n   cd musics-api\n   ```\n\n2. **Create a `.env` file**:\n\n   Create a `.env` file in the root directory of the project and add the following environment variables:\n\n   ```env\n   DB_HOST=localhost\n   DB_PORT=5432\n   DB_USER=your_database_user\n   DB_PASSWORD=your_database_password\n   DB_NAME=your_database_name\n   JWT_SECRET=your_jwt_secret_key\n   ```\n\n3. **Install dependencies**:\n\n   Use `go mod` to install the required dependencies:\n\n   ```bash\n   go mod tidy\n   ```\n\n4. **Setup the database**:\n\n   Ensure your PostgreSQL server is running and create the required database.\n\n   ```sql\n   CREATE DATABASE your_database_name;\n   ```\n\n   Migrate the database using GORM in the Go project.\n\n5. **Run the application**:\n\n   Start the server by running:\n\n   ```bash\n   go run .\n   ```\n\n   The server will start on `http://localhost:3000`.\n\n### API Endpoints\n\nHere’s a quick overview of the available endpoints:\n\n- **Authentication**:\n  - `POST /register` - Register a new user.\n  - `POST /login` - Login an existing user.\n\n- **Music Management (Need a JWT token)**:\n  - `POST /api/musics` - Upload a new music file.\n  - `GET /api/musics` - Get all your uploaded music.\n  - `PUT /api/musics/:id` - Edit a specific musics file.\n  - `DELETE /api/musics/:id` - Delete a specific musics file.\n  - `GET /api/musics/details` - Get a spesific musics.\n  - `GET /api/musics/all/:pages` - Get all musics that uploaded.\n\n- **Search and Discovery**:\n  - `GET /api/users/` - View musics uploaded by a specific user.\n\n### Usage\n\n1. **Register**:\n   \n   Send a `POST` request to `/register` with the key your username and password.\n\n2. **Login**:\n   \n   Send a `POST` request to `/login` to receive a JWT token, with the key your username and password.\n\n3. **Upload Music**:\n\n   Use the JWT token to authenticate and send a `POST` request to `/api/musics` with your musics file. The key is MusicName, artist, genre, and link\n\n4. **Get Your Music**:\n\n   Send a `GET` request to `/api/musics` to retrieve your uploaded musics.\n\n5. **Delete musics**:\n\n   Send a `POST` request to `/api/musics/:id` to delete the music that already posted.\n\n6. **Update musics**:\n\n   Send a `PUT` request to `/api/musics/:id` to update the music detail, the key is MusicName, artist, genre, and link\n\n7. **Search Users**:\n\n   Send a `GET` request to `/api/users` to find other users and their musics. The key is username.\n\n8. **Search Musics**:\n\n   Send a `GET` request to `/api/musics/details` to find the details of the music, the key is MusicName\n\n9. **Get all users music**:\n\n   Send a `GET` request to `/api/musics/all/:pages` to see all the musics that uploaded by all users\n\n### License\n\nThis project is licensed under the MIT License.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrraf1%2Fsoundshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrraf1%2Fsoundshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrraf1%2Fsoundshare/lists"}