{"id":16661016,"url":"https://github.com/agrafix/revenue-sample-app","last_synced_at":"2026-04-28T02:33:01.302Z","repository":{"id":66320110,"uuid":"46945420","full_name":"agrafix/revenue-sample-app","owner":"agrafix","description":"Example Spock Project for f(by)","archived":false,"fork":false,"pushed_at":"2015-11-27T09:21:42.000Z","size":170,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-12T04:06:17.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agrafix.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}},"created_at":"2015-11-26T20:22:01.000Z","updated_at":"2020-01-20T02:10:58.000Z","dependencies_parsed_at":"2023-03-11T01:30:42.496Z","dependency_job_id":null,"html_url":"https://github.com/agrafix/revenue-sample-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agrafix/revenue-sample-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Frevenue-sample-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Frevenue-sample-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Frevenue-sample-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Frevenue-sample-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agrafix","download_url":"https://codeload.github.com/agrafix/revenue-sample-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Frevenue-sample-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32363629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-12T10:33:06.338Z","updated_at":"2026-04-28T02:33:01.283Z","avatar_url":"https://github.com/agrafix.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Revenue Sample App\n\nSmall example demonstrating different features of [Spock](http://www.spock.li).\n\n## Building\n\n```bash\ngit clone https://github.com/agrafix/revenue-sample-app\nstack build --pedantic\n```\n\n## Running\n\n```bash\nstack exec revenue-app\n# on different terminal\nsqlite3 -init sample-data.sql database.sql\n[Ctrl+C]\n```\n\n## Try it out\n\n* Visit http://localhost:3000 in our browser\n* Login with `admin` and `admin1`.\n* Extract the value of the cookie `spockcookie`\n* Try the rest api:\n\n```bash\n# should fail\ncurl -v --cookie \"spockcookie=[COOKIE_VALUE_HERE]\" -d '{\"name\": \"Foo\", \"price\": -1, \"revenue\": 5}' -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST http://localhost:3000/api/item/create\n\n# should succeed\ncurl -v --cookie \"spockcookie=[COOKIE_VALUE_HERE]\" -d '{\"name\": \"FooBar\", \"price\": 5.00, \"revenue\": 0.05}' -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST http://localhost:3000/api/item/create\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrafix%2Frevenue-sample-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagrafix%2Frevenue-sample-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrafix%2Frevenue-sample-app/lists"}