{"id":23119013,"url":"https://github.com/tusharad/reddit-clone-haskell","last_synced_at":"2025-08-17T00:31:48.262Z","repository":{"id":232192542,"uuid":"783657807","full_name":"tusharad/Reddit-Clone-Haskell","owner":"tusharad","description":"Reddit Clone written in Haskell and Postgres","archived":false,"fork":false,"pushed_at":"2025-05-18T18:19:58.000Z","size":1218,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-18T19:22:44.250Z","etag":null,"topics":["backend","clone","haskell","haskell-application","haskell-learning","hyperbole","postgresql","reddit","servant"],"latest_commit_sha":null,"homepage":"https://haskread-app-461848834131.us-central1.run.app/","language":"Haskell","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/tusharad.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}},"created_at":"2024-04-08T10:16:40.000Z","updated_at":"2025-05-18T18:20:01.000Z","dependencies_parsed_at":"2024-04-24T14:12:17.810Z","dependency_job_id":"02f01d70-ccb8-474a-91df-ba1711856fdd","html_url":"https://github.com/tusharad/Reddit-Clone-Haskell","commit_stats":null,"previous_names":["tusharad/scotty-crud","tusharad/haskread"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tusharad/Reddit-Clone-Haskell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharad%2FReddit-Clone-Haskell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharad%2FReddit-Clone-Haskell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharad%2FReddit-Clone-Haskell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharad%2FReddit-Clone-Haskell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tusharad","download_url":"https://codeload.github.com/tusharad/Reddit-Clone-Haskell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharad%2FReddit-Clone-Haskell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270791255,"owners_count":24645781,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"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":["backend","clone","haskell","haskell-application","haskell-learning","hyperbole","postgresql","reddit","servant"],"created_at":"2024-12-17T05:31:07.477Z","updated_at":"2025-08-17T00:31:48.243Z","avatar_url":"https://github.com/tusharad.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## HaskRead - Reddit clone written in Haskell\n\nHaskRead is a Reddit clone web application build for learning building real world production application in Haskell.\n\n## Setting up local development environment\n\nThe instructions for setting up setting local dev environment is provided in respective frontend and backend projects.\n\n- [Frontend](./haskread-platform-ui/README.md)\n- [Backend](./haskread-platform-be/README.md)\n\n![alt text](image/demo_img.png)\n\n## Tech Stack\n\n### Backend - Haskell ([Servant](https://docs.servant.dev/en/stable/))\n### Frontend - Haskell ([Hyperbole](https://docs.hyperbole.live/simple))\n\n## ER Diagram\n\n![alt text](haskread-platform-be/Wiki/erd.jpeg)\n\n### Key Web application functionalities that has been implemented so far:\n\n#### User Authentication and Authorization\n\n- Login, Register with email OTP, and password reset [here](./haskread-platform-be/src/Platform/Auth/Handler.hs)\n- Implemented Google OAuth2 [here](./haskread-platform-be/haskread-platform-be/src/Platform/Auth/Handler.hs#L347)\n- Access control to specific routes using [AuthResult](https://hackage.haskell.org/package/servant-auth-server-0.4.9.0/docs/Servant-Auth-Server.html#t:AuthResult)\n\n#### Data management\n\n- Database operations: Performed CRUD operations using Servant.\n- Data Validation: Ensure data integrity by applying [sanity checks](./haskread-platform-be/src/Platform/Comment/Handler.hs#L40) before storing data.\n- File Storage: Uploading documents (Image, docx, pdf) in [local storage](./haskread-platform-be/src/Platform/User/Thread/Handler.hs#L117) \n    (In future, It can be uploaded to storage buckets.)\n\n#### API Development\n\n- Restful API: Create endpoints for frontend or third-party applications to interact with the backend (./haskread-platform-be/src/Platform/API.hs).\n- Implemented serveral core logics for the application and divided it in several different modules.\n\n#### Error Handling and Logging\n\n- Gracefully handling errors and returning meaningful responses for e.g [throw400Err](./haskread-platform-be/src/Platform/Common/Utils.hs#L57)\n- Logging: Added Debug, Info, Warn, Error level logging mechanism using [FastLogger](https://hackage.haskell.org/package/fast-logger) [here](./haskread-platform-be/src/Platform/Log.hs)\n\n#### Security\n\n- Input sanitization: Used [Orville](https://github.com/flipstone/orville) postgres ORM to avoid SQL injection and type safety.\n- Encryption: User passwords are encrypted using [Password](https://hackage.haskell.org/package/password).\n- Rate limiting: Rate limiting is yet to be implemented.\n\n#### Performance Optimization\n\n- Caching - caching is partially implemented using [Haxl](https://github.com/facebook/Haxl) but being used.\n- Database Indexing - Necessary fields are indexed.\n\n#### Background Jobs and Task Queues\n\n- Task queues/ Async processing - So far, there is no functionality in application that requires async or task queues.\n\n#### Third party integration:\n\n- Email services: Integrated MailGun API for sending verification emails.\n\n#### Database Migrations and Seeding\n\n- Migration and seeding: Migration and seeding has been implemented for initiating and popluating postgres data for testing with Orville.\n\n#### Testing\n\n- Unit tests with help of tasty-hunit and API testing with the help of tasty-wai has been implemented. [here](./haskread-platform-be/test/TestApp/Thread.hs)\n- Written a bash script to perform testing on UI by fetching html pages using curl and checking if specific elements exist or not.\n\n#### CI\n\n- Github actions is being used to build be and ui, run test cases and deploy to GCP.\n\n#### Scalability\n- Nothing scalability related stuff has been implemented.\n#### Compliance and Legal\n- Nothing Compliance related measures has been taken since it is an application made for learning Haskell and not for real production app.\n#### Analytics and Reporting\n- Nothing related to Analytics has been implemented yet.\n#### Notifications\n- Push Notifications are yet to be implemented\n#### Search Functionality\n- Simple search functionality has been implemented with help of Vector Text search. [here](./haskread-platform-be/src/Platform/User/Thread/Handler.hs)\n#### Versioning\n- API Versioning is done (all apis are prefixed with v1)\n#### Documentation\n- Some Documentation exists in ./haskread-platform-be/Wiki but are unmaintained.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftusharad%2Freddit-clone-haskell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftusharad%2Freddit-clone-haskell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftusharad%2Freddit-clone-haskell/lists"}