{"id":15067784,"url":"https://github.com/1995parham-teaching/song_cloud","last_synced_at":"2026-03-18T00:02:16.270Z","repository":{"id":113152352,"uuid":"439601708","full_name":"1995parham-teaching/song_cloud","owner":"1995parham-teaching","description":"Minimal Soundcloud just for having fun with databases","archived":false,"fork":false,"pushed_at":"2025-12-15T23:05:48.000Z","size":305,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-19T07:33:44.813Z","etag":null,"topics":["golang","golang-examples","sql"],"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/1995parham-teaching.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":"2021-12-18T11:50:01.000Z","updated_at":"2025-12-15T23:05:45.000Z","dependencies_parsed_at":"2024-02-27T06:24:35.044Z","dependency_job_id":"d6c6ad0b-4c92-4499-92fd-5cf054616d7e","html_url":"https://github.com/1995parham-teaching/song_cloud","commit_stats":{"total_commits":174,"total_committers":5,"mean_commits":34.8,"dds":0.5862068965517242,"last_synced_commit":"e4f6c71321737a92713baf9f7586f89114aca7b2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1995parham-teaching/song_cloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham-teaching%2Fsong_cloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham-teaching%2Fsong_cloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham-teaching%2Fsong_cloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham-teaching%2Fsong_cloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1995parham-teaching","download_url":"https://codeload.github.com/1995parham-teaching/song_cloud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham-teaching%2Fsong_cloud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30636651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T23:56:54.546Z","status":"ssl_error","status_checked_at":"2026-03-17T23:56:28.952Z","response_time":56,"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":["golang","golang-examples","sql"],"created_at":"2024-09-25T01:27:16.650Z","updated_at":"2026-03-18T00:02:16.245Z","avatar_url":"https://github.com/1995parham-teaching.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Song Cloud 🎶\n\n## Introduction\n\nMinimal sound cloud, written by Elahe Dastan just for having fun with SQL-based databases.\nUsers can have free or premium accounts. They can listen to musics, and we track they playlist.\nMusics have categories which are predefined. Users can buy musics or like them.\n\nThis project is solely written for demonstration, and it has many performance issues.\n\n## Requests\n\nPassword validation failed on database side:\n\n```bash\ncurl -d '{ \"username\": \"elahe\", \"first_name\": \"Elahe\", \"last_name\": \"Dastan\", \"email\": \"elahe.dstn@gmail.com\", \"password\": \"1234\" }' -H 'Content-Type: application/json' 127.0.0.1:8080/api/signup\n```\n\nUser creation completed:\n\n```bash\ncurl -d '{ \"username\": \"elahe\", \"first_name\": \"Elahe\", \"last_name\": \"Dastan\", \"email\": \"elahe.dstn@gmail.com\", \"password\": \"123456abc\" }' -H 'Content-Type: application/json' 127.0.0.1:8080/api/signup\n```\n\nExtend premium period:\n\n```bash\ncurl -d '{ \"username\": \"elahe\", \"duration\": 100000000000 }' -H 'Content-Type: application/json' 127.0.0.1:8080/api/extend\n```\n\nCreate new free song:\n\n```bash\ncurl -d '{ \"name\": \"elahe\", \"file\": \"elahe.mp3\", \"production_year\": 2021, \"explanation\": \"new awesome song\" }' -H 'Content-Type: application/json' 127.0.0.1:8080/api/song\n```\n\nCreate new paid song:\n\n```bash\ncurl -d '{ \"name\": \"elahe-p\", \"file\": \"elahe.mp3\", \"production_year\": 2021, \"explanation\": \"new awesome song\", \"price\": 100 }' -H 'Content-Type: application/json' 127.0.0.1:8080/api/song\n```\n\nPlay a song:\n\n```bash\ncurl -d '{ \"id\": 2, \"username\": \"elahe\" }' -H 'Content-Type: application/json' 127.0.0.1:8080/api/play\n```\n\nCreate a category:\n\n```bash\ncurl 127.0.0.1:8080/api/category/pop\n```\n\nAssig a song to a category:\n\n```bash\ncurl -d '{ \"id\": 2, \"category\": 1 }' -H 'Content-Type: application/json' 127.0.0.1:8080/api/category\n```\n\nBuy a song:\n\n```bash\ncurl -d '{ \"username\": \"elahe\", \"song\": 1 }' -H 'Content-Type: application/json' 127.0.0.1:8080/api/buy\n```\n\nlike a song:\n\n```bash\ncurl -d '{ \"username\": \"elahe\", \"id\": 1 }' -H 'Content-Type: application/json' 127.0.0.1:8080/api/like\n```\n\n## Reports\n\nSum of the users transactions:\n\n```sql\nselect username,sum(purchased_price) from purchase group by purchase.username;\n```\n\nPurchased logs from last 3 hours:\n\n```sql\nselect * from log where log_message like '%purchased%' and time \u003e now() - interval '3 hours';\n```\n\nUsers that introduce 2 or more users:\n\n```sql\nselect introducer from introduce group by introducer having count(*) \u003e= 2;\n```\n\nLast year sells:\n\n```sql\nselect sum(purchased_price) from purchase where extract(year from purchased_date) = 2021;\n```\n\nLast year bestseller song:\n\n```sql\nselect * from song where id = (select song_id from purchase where extract(year from purchased_date) = 2021 group by song_id order by count(*) limit 1);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1995parham-teaching%2Fsong_cloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1995parham-teaching%2Fsong_cloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1995parham-teaching%2Fsong_cloud/lists"}