{"id":17177270,"url":"https://github.com/lexi-lambda/haskell-rolodex","last_synced_at":"2026-02-15T08:32:41.230Z","repository":{"id":145601319,"uuid":"46960101","full_name":"lexi-lambda/haskell-rolodex","owner":"lexi-lambda","description":null,"archived":false,"fork":false,"pushed_at":"2015-11-28T02:02:51.000Z","size":15,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-09T13:13:30.969Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lexi-lambda.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-27T04:45:14.000Z","updated_at":"2020-01-21T16:00:55.000Z","dependencies_parsed_at":"2023-04-14T09:51:40.318Z","dependency_job_id":null,"html_url":"https://github.com/lexi-lambda/haskell-rolodex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lexi-lambda/haskell-rolodex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexi-lambda%2Fhaskell-rolodex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexi-lambda%2Fhaskell-rolodex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexi-lambda%2Fhaskell-rolodex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexi-lambda%2Fhaskell-rolodex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexi-lambda","download_url":"https://codeload.github.com/lexi-lambda/haskell-rolodex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexi-lambda%2Fhaskell-rolodex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29473718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T06:58:05.414Z","status":"ssl_error","status_checked_at":"2026-02-15T06:58:05.085Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2024-10-15T00:03:15.803Z","updated_at":"2026-02-15T08:32:41.214Z","avatar_url":"https://github.com/lexi-lambda.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# haskell-rolodex [![Stories in Ready](https://badge.waffle.io/lexi-lambda/haskell-rolodex.svg?label=ready\u0026title=Ready)](http://waffle.io/lexi-lambda/haskell-rolodex)\n\nThis is a tiny Haskell web service that provides a REST API to manage contacts in a SQLite database. It is built using [servant][servant].\n\n## Installing and running the server\n\nThis project uses [stack][stack] for build management. Clone this repository, then run `stack build` to install and compile the server.\n\nThe `SQLITE_FILENAME` environment variable must be set in order to run the server, and it will be used to determine where the SQLite database should be on the filesystem. If the file does not exist, it will be created.\n\n```\n$ stack build\n$ env SQLITE_FILENAME=data.sqlite stack exec haskell-rolodex\n```\n\n## API\n\nThe server provides an interface for managing a single resource, *contacts*. Standard CRUD operations are supported, plus a full-text search for looking up contacts by their fields.\n\nEach contact *must* contain at least valid `email` and `phoneNumber` fields, where `email` is a valid email address and `phoneNumber` is a valid U.S. phone number. In addition, each contact supports an arbitrary number of custom metadata fields that can be listed under the `details` key. Here is an example of a valid contact:\n\n```json\n{\n  \"email\": \"user@example.com\",\n  \"phoneNumber\": \"(555) 555-5555\",\n  \"details\": {\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Smith\"\n  }\n}\n```\n\n### Endpoints\n\n#### `GET /contacts`\n\nReturns all contacts in a list. Each contact contains an additional `id` field, which is a unique integral id used for referring to that contact.\n\n#### `POST /contacts`\n\nCreates a new contact. The body of the request must be a valid JSON representation of a contact.\n\n#### `GET /contacts/:id`\n\nGets the contact with the specified id, where `id` is an integer to use for lookup.\n\n#### `PUT /contacts/:id`\n\nUpdates the contact with the specified id, where `id` is an integer to use for lookup. The body must be a *complete* JSON representation of a contact—the contact will be completely overwritten with the new value. All fields not present in the new value will be removed.\n\n#### `DELETE /contacts/:id`\n\nRemoves the contact with the specified id, where `id` is an integer to use for lookup.\n\n#### `GET /contacts/search?query`\n\nPerforms a full-text, case-insensitive search for contacts given a textual `query` to look for. All fields of each contact are searched to see if they contain the query string. Only exact matches are considered, but the match may be partial. An array of all matching contacts is returned.\n\n## Running the test suite\n\nThis project includes a small, incomplete test suite. To run it, just run `stack test`.\n\n[servant]: https://github.com/haskell-servant/servant\n[stack]: https://github.com/commercialhaskell/stack\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexi-lambda%2Fhaskell-rolodex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexi-lambda%2Fhaskell-rolodex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexi-lambda%2Fhaskell-rolodex/lists"}