HaskRead is a Reddit clone web application build for learning building real world production application in Haskell.
The instructions for setting up setting local dev environment is provided in respective frontend and backend projects.
Backend - Haskell (Servant)
Frontend - Haskell (Hyperbole)
- Login, Register with email OTP, and password reset here
- Implemented Google OAuth2 here
- Access control to specific routes using AuthResult
- Database operations: Performed CRUD operations using Servant.
- Data Validation: Ensure data integrity by applying sanity checks before storing data.
- File Storage: Uploading documents (Image, docx, pdf) in local storage (In future, It can be uploaded to storage buckets.)
- Restful API: Create endpoints for frontend or third-party applications to interact with the backend (./haskread-platform-be/src/Platform/API.hs).
- Implemented serveral core logics for the application and divided it in several different modules.
- Gracefully handling errors and returning meaningful responses for e.g throw400Err
- Logging: Added Debug, Info, Warn, Error level logging mechanism using FastLogger here
- Input sanitization: Used Orville postgres ORM to avoid SQL injection and type safety.
- Encryption: User passwords are encrypted using Password.
- Rate limiting: Rate limiting is yet to be implemented.
- Caching - caching is partially implemented using Haxl but being used.
- Database Indexing - Necessary fields are indexed.
- Task queues/ Async processing - So far, there is no functionality in application that requires async or task queues.
- Email services: Integrated MailGun API for sending verification emails.
- Migration and seeding: Migration and seeding has been implemented for initiating and popluating postgres data for testing with Orville.
- Unit tests with help of tasty-hunit and API testing with the help of tasty-wai has been implemented. here
- Written a bash script to perform testing on UI by fetching html pages using curl and checking if specific elements exist or not.
- Github actions is being used to build be and ui, run test cases and deploy to GCP.
- Nothing scalability related stuff has been implemented.
- Nothing Compliance related measures has been taken since it is an application made for learning Haskell and not for real production app.
- Nothing related to Analytics has been implemented yet.
- Push Notifications are yet to be implemented
- Simple search functionality has been implemented with help of Vector Text search. here
- API Versioning is done (all apis are prefixed with v1)
- Some Documentation exists in ./haskread-platform-be/Wiki but are unmaintained.